Verify API: multi-channel user verification
Verify that a user can access a phone number, email inbox or enrolled authenticator. SMS, email and voice use the send/check API; TOTP uses separate factor endpoints. Push, WhatsApp and Silent Network Auth are not available for sending today. Successful verification costs $0.03; activation requires a positive credit balance.
How it works
For SMS, email and voice, your server starts the verification, your UI collects the code, and your server checks it. Message.com generates the code and stores its hash. Do not log codes, place API keys in browser code or treat contact access as proof of a legal identity.
POST /api/v1/verify with a destination and a channel. Message.com generates a code, stores only its hash, and dispatches it over the requested channel.POST /api/v1/verify/check with the verification id and the code the user typed. We consume the code atomically and return verified: true or a reason it failed.Try it
Real endpoints, real shapes. Every request needs a Bearer API key with the verify scope (mk_...). See Get started with Verify for where to find your key.
Start a verification
curl -X POST https://app.message.com/api/v1/verify \
-H 'Authorization: Bearer mk_live_...' \
-H 'Content-Type: application/json' \
-d '{
"to": "[email protected]",
"channel": "email"
}'const res = await fetch('https://app.message.com/api/v1/verify', {
method: 'POST',
headers: {
Authorization: 'Bearer mk_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({ to: '[email protected]', channel: 'email' }),
});
const verification = await res.json();
// { id, status: 'pending', channel: 'email', hint, dispatch: 'sent', expiresAt }import requests
res = requests.post(
"https://app.message.com/api/v1/verify",
headers={"Authorization": "Bearer mk_live_..."},
json={"to": "[email protected]", "channel": "email"},
)
verification = res.json()
# { "id": ..., "status": "pending", "channel": "email", "hint": ..., "dispatch": "sent", "expiresAt": ... }Every successful start returns 201 with a flat body: id, status (always pending at creation), channel, a masked hint of the destination, an expiresAt timestamp, and dispatch, which tells you what actually happened on the wire: sent, pending_provisioning (the channel exists but is not wired to a live carrier yet), or error (a real send failure). Creating a verification is never billed, win or lose. The full field list lives in the Verify API reference.
Check the code
curl -X POST https://app.message.com/api/v1/verify/check \
-H 'Authorization: Bearer mk_live_...' \
-H 'Content-Type: application/json' \
-d '{
"id": "1f6a2e4c-...",
"code": "482913"
}'const res = await fetch('https://app.message.com/api/v1/verify/check', {
method: 'POST',
headers: {
Authorization: 'Bearer mk_live_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({ id: verification.id, code: userSubmittedCode }),
});
const result = await res.json();
// { id, verified: true }res = requests.post(
"https://app.message.com/api/v1/verify/check",
headers={"Authorization": "Bearer mk_live_..."},
json={"id": verification["id"], "code": user_submitted_code},
)
result = res.json()
# { "id": ..., "verified": true }A correct code returns 200 with { id, verified: true } and is the only event that bills, at $0.03. An incorrect or expired code returns { id, verified: false, reason } with a machine-readable reason (bad_code, expired, too_many_attempts, already_used). The full error table is in the Verify API error codes reference.
Verifications are never free to probe: sends are throttled per destination and per IP, checks are capped at five attempts, and a consumed or expired code can never be replayed. Full fraud-control detail is in Prevent SMS fraud with Verify.
Channels
SMS, email and voice delivery depends on your active service, available credits, allowed destinations and configured delivery route. Check the dispatch result; a created verification does not prove delivery. TOTP enrollment and checks use the factor endpoints. Disabled channels have no committed activation date.
Current channel availability and prerequisites: see Verify channel availability.
Reference and guides
/api/v1/verify, /api/v1/verify/check, rate-limit semantics, and Verify Services.Channel status legend
Livedispatches today. Planned API shape shipped, dispatch not wired to a live carrier yet.
Sending one-time codes with Verify is a different path from running your own registered SMS campaign: Verify provides dispatch and fraud controls for approved verification use cases. If you're instead sending your own A2P traffic (order notifications, marketing, support) over US local numbers you manage directly, that requires separate A2P 10DLC brand and campaign registration; see what A2P 10DLC is and why carriers require it.
Next steps
- Get started with Verify: activate Verify, create a service, mint a key, send your first code.
- Verify channel availability: availability and delivery prerequisites to go live and what is available today.
- Authentication: how
mk_API keys and scopes work platform-wide.