CI and end-to-end tests
Create an isolated address per test, wait without fragile sleeps, and assert the exact verification artifact.
- Idempotent create
- Long-poll claim
- Stable request IDs
Create a short-lived inbox, describe the sender or artifact you expect, and let SpotMail return the matched code or link with evidence. The inbox still expires on schedule.
Run created
checkout-smoke-1842
Inbox waiting
verify-7f2c@spotmail.app
Message matched
auth@sample.test
Artifact returned
code · 482 901
Inbox expires
24 hours maximum
One primitive, three jobs
Create an isolated address per test, wait without fragile sleeps, and assert the exact verification artifact.
Freeze one human-approved verification Profile into each Key, then let the agent invoke it without rewriting the sender or result policy.
Route accepted mail to signed webhooks, replay a failed delivery, and inspect current usage from the account.
The contract
Project Keys create and inspect work. A run-scoped token claims, completes, or cancels one task. No operation sends email.
/api/verification-runs/usage
Confirm capability and current headroom
/api/verification-runs
Create or replay one task
/api/verification-runs/{id}
Inspect task state
/api/verification-runs/{id}/claim
Wait for a matched artifact
/api/verification-runs/{id}/complete
Record the caller verdict
/api/verification-runs/{id}
End work early
TypeScript SDK
Preflight catches the wrong Key, changed Profile, or a credential that expires before the Run can finish. The same fingerprint stays on the Run and Activity record.
BETA package contract · REST remains the source of truth
import { SpotMailClient } from '@spotmail/sdk';
const spotmail = new SpotMailClient({
apiKey: process.env.SPOTMAIL_API_KEY!,
environment: 'staging',
});
await spotmail.verificationRuns.preflight({
profile: 'signup-code',
contractFingerprint: process.env.SPOTMAIL_PROFILE_FINGERPRINT,
});
const run = await spotmail.verificationRuns.create(
{
profile: 'signup-code',
context: { clientReference: 'signup-e2e-1842' },
},
{ idempotencyKey: 'signup-e2e-1842' },
);
const claim = await run.wait({ maxWaitSeconds: 120 });
if (claim.result?.artifact.kind === 'code') {
console.log(claim.result.artifact.value);
}BETA boundaries
SpotMail does not send mail, manage threads, or become an agent identity.
6 creates per minute, 50 Verification Runs per UTC day per account, and a configurable daily budget for each Key.
Seven-day transport records keep request ID, operation, normalized client, status, duration, and stable error—never the mail body or credential.
Run inboxes expire within 24 hours. Idempotency tombstones outlive content only long enough to make retries safe.
Start from the source
Machine-readable REST contract and stable error shapes.
Open specificationFreeze one Profile into a scoped Key, copy its contract fingerprint, rotate it, and inspect activity.
Manage keysReceive signed events, inspect delivery attempts, and replay failures.
Configure webhooksSee enforced creation allowance separately from observed inbound mail.
View usageStart with the REST contract or create a Project Key and run the first task from your test suite or agent.