OTP API

Send a code to a phone. SEED delivers via WhatsApp (SMS fallback). You verify with challenge_id.

POST /v1/otp/send · POST /v1/otp/verify · GET /v1/otp/{id}

Scopes: otp:send · otp:verify (sms:send also works)

Request

torequiredE.164 phone
codeoptional4-8 digits; omit to auto-generate
referenceoptionalyour correlation id
delivery_modeoptionalauto (default) | whatsapp | sms

Advanced: template_name / template_language only if you override the account auth template. Not needed for standard use.

Response

challenge_idfor verify + poll
channelwhatsapp | sms
fallback_usedtrue if SMS after WhatsApp fail
statussent | delivered | verified | expired | failed
expires_atdefault TTL 10 min
provideralways seed

Status

sentaccepted
deliveredreceipt received
verifiedcode OK
expiredTTL or attempts
failedsend/verify failed

Examples

SEED generates code

1curl -X POST https://api-messages.seed.tg/v1/otp/send \
2  -H "X-API-Key: lks_live_xxx" -H "Content-Type: application/json" \
3  -d '{"to":"+22890000000","reference":"login-1","request_messaging_consent":false}'

You supply code

1curl -X POST https://api-messages.seed.tg/v1/otp/send \
2  -H "X-API-Key: lks_live_xxx" -H "Content-Type: application/json" \
3  -d '{"to":"+22890000000","code":"482917","reference":"login-1","request_messaging_consent":false}'

Verify

1curl -X POST https://api-messages.seed.tg/v1/otp/verify \
2  -H "X-API-Key: lks_live_xxx" -H "Content-Type: application/json" \
3  -d '{"challenge_id":"otp_123","code":"482917"}'

Status

1curl https://api-messages.seed.tg/v1/otp/otp_123 -H "X-API-Key: lks_live_xxx"

WhatsApp only (no SMS fallback)

1curl -X POST https://api-messages.seed.tg/v1/whatsapp/otp/send \
2  -H "X-API-Key: lks_live_xxx" -H "Content-Type: application/json" \
3  -d '{"to":"+22890000000","code":"482917"}'