跳转到主要内容
POST
curl
Didit 电话验证 API 可以将待处理的验证移至下一渠道,无需等待备用计时器。如需直接跳转到指定渠道,请发送 channel。验证 ID 和过期时间保持不变,但新渠道投递的验证码可能与之前发送的不同:只有重试能保证使用相同的验证码。请检查 HTTP 200 响应中的 status。发送成功时返回 pending。如果投递被阻止,验证将结束,响应返回 blocked 及 reason。 要在最后一个渠道上重新发送,请重试验证。已结束的验证返回 409 already_final。没有剩余渠道的订单返回 409 no_next_channel,验证不允许使用的渠道返回 400 channel_not_allowed。发送窗口已关闭时返回 410 expired。达到三次发送上限时返回 429 max_sends_reached,达到每小时重新发送上限时返回 429 velocity_limit。只有您的应用通过发送发起的验证才能修改:托管验证会话中的电话步骤为只读,此处调用会返回 404 not_found。当同一号码的另一次发送正在占用其发送轮次,而本次发送无法及时获得该轮次时,返回 409 verification_in_progress;如果 Didit 无法判断是否有另一次发送正在进行,则返回 503 phone_send_unavailable,且不会发送任何内容,请稍后再试。

授权

x-api-key
string
header
必填

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

请求头

Idempotency-Key
string

Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.

Required string length: 1 - 255

路径参数

verification_id
string<uuid>
必填

The verification.

示例:

"c9b18621-9f8f-4590-a3b4-f8ebea4baa7d"

请求体

application/json

The channel to jump to; left out, the next one in the order.

The channel to move to.

channel
enum<string>

Jump to this channel instead of the next one.

可用选项:
silent,
sms,
whatsapp,
telegram,
voice,
rcs,
viber,
zalo,
email,
push,
totp,
passkey
示例:

"sms"

响应

Inspect status. A successful send returns pending. A blocked attempt ends the verification and returns blocked with a reason.

verification_id
string<uuid>
必填

The verification.

示例:

"c9b18621-9f8f-4590-a3b4-f8ebea4baa7d"

channel
enum<string>
必填

The channel trying now.

可用选项:
silent,
sms,
whatsapp,
telegram,
voice,
rcs,
viber,
zalo,
email,
push,
totp,
passkey
示例:

"sms"

status
enum<string>
必填

A successful send remains pending. A blocked send ends the verification.

可用选项:
pending,
blocked
示例:

"pending"

reason
string | null

Returned on a blocked send. May be null when no reason is available.

示例:

"suspicious"

最后修改于 2026年11月24日