Phone call#
Use the phone call delivery method to place a call that reads a one-time code aloud. The user enters the code in your application, and your application reports it to the Verification API. This method is useful when SMS is unavailable or for landline numbers.
Note
In API requests, the phone call delivery method is identified by the value callout.
How it works#
You start a verification with
delivery_methodset tocallout, optionally choosing the announcement language.The Verification API places a call to the destination and reads a newly generated numeric code aloud in the selected language.
The user enters the code they heard in your application.
Your application reports the
codeto the report endpoint.If the code matches, the verification status becomes
verified.
Start a phone call verification#
Set delivery_method to callout. Use the optional callout object to choose the
announcement language.
The following example uses HTTP Basic authentication to start a phone call verification:
http
POST /api/v1/verifications HTTP/1.1
Host: verification.didww.com
Content-Type: application/json
Accept: application/json
Authorization: Basic eW91cl9hcHBfa2V5OnlvdXJfYXBwX3NlY3JldA==
{
"data": {
"destination": "+4915112345678",
"delivery_method": "callout",
"callout": {
"languages": ["de-DE"]
}
}
}
curl
curl -i -X POST https://verification.didww.com/api/v1/verifications -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"data": {"callout": {"languages": ["de-DE"]}, "delivery_method": "callout", "destination": "+4915112345678"}}' --user your_app_key:your_app_secret
response
HTTP/1.1 201 Created
Content-Type: application/json
{
"data": {
"id": "2b3c4d5e-6f70-4b3c-9d0e-1f2a3b4c5d6e",
"destination": "4915112345678",
"delivery_method": "callout",
"fee": "0.08",
"status": "pending",
"error_code": null,
"error_detail": null,
"expires_at": "2026-07-15T10:02:00.000Z",
"callout": {
"language": "de-DE"
}
}
}
This response shows an approved start with status pending. A 201 Created response
can also contain status denied when a request callback rejects the verification.
Always inspect status and error_code.
A pending status means the verification was accepted for delivery. It does not confirm
that the call was answered or the code was heard.
The response includes a callout object containing language: the language the
announcement is played in. The code itself is read aloud to the user and is never returned in
the API response.
Supported languages#
Pass callout.languages as BCP 47 tags, most preferred first. The first supported tag
wins; if none of them is supported, the announcement is played in en-US.
Tags are matched exactly, so the region subtag is required: pt does not match
pt-PT and falls back to en-US. A tag that is not a well-formed BCP 47 tag is
rejected with languages_invalid instead.
Read callout.language from the response to see which language was actually used.
The following language tags are supported:
BCP 47 tag |
Language |
|---|---|
|
Afrikaans (South Africa) |
|
Arabic (United Arab Emirates) |
|
Arabic (Egypt) |
|
Arabic (Saudi Arabia) |
|
Bulgarian (Bulgaria) |
|
Bosnian (Bosnia and Herzegovina) |
|
Czech (Czechia) |
|
Danish (Denmark) |
|
German (Germany) |
|
Greek (Greece) |
|
English (United Kingdom) |
|
English (United States) |
|
Spanish (Latin America) |
|
Spanish (Spain) |
|
Estonian (Estonia) |
|
Finnish (Finland) |
|
French (France) |
|
Hebrew (Israel) |
|
Hindi (India) |
|
Croatian (Croatia) |
|
Hungarian (Hungary) |
|
Indonesian (Indonesia) |
|
Icelandic (Iceland) |
|
Italian (Italy) |
|
Japanese (Japan) |
|
Lithuanian (Lithuania) |
|
Latvian (Latvia) |
|
Macedonian (North Macedonia) |
|
Malay (Malaysia) |
|
Norwegian Bokmål (Norway) |
|
Dutch (Netherlands) |
|
Polish (Poland) |
|
Portuguese (Brazil) |
|
Portuguese (Portugal) |
|
Romanian (Romania) |
|
Slovak (Slovakia) |
|
Slovenian (Slovenia) |
|
Serbian (Serbia) |
|
Swedish (Sweden) |
|
Swahili (Kenya) |
|
Thai (Thailand) |
|
Tagalog (Philippines) |
|
Turkish (Cyprus) |
|
Turkish (Turkey) |
|
Ukrainian (Ukraine) |
|
Urdu (Pakistan) |
|
Vietnamese (Vietnam) |
|
Chinese Simplified (China) |
|
Chinese Traditional (Hong Kong) |
Reporting the code#
Submit the code the user heard. The delivery_method must be callout. The following
example reports a correct code and returns status verified:
http
PATCH /api/v1/verifications/2b3c4d5e-6f70-4b3c-9d0e-1f2a3b4c5d6e HTTP/1.1
Host: verification.didww.com
Content-Type: application/json
Accept: application/json
Authorization: Basic eW91cl9hcHBfa2V5OnlvdXJfYXBwX3NlY3JldA==
{
"data": {
"delivery_method": "callout",
"code": "123456"
}
}
curl
curl -i -X PATCH https://verification.didww.com/api/v1/verifications/2b3c4d5e-6f70-4b3c-9d0e-1f2a3b4c5d6e -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"data": {"code": "123456", "delivery_method": "callout"}}' --user your_app_key:your_app_secret
response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": "2b3c4d5e-6f70-4b3c-9d0e-1f2a3b4c5d6e",
"destination": "4915112345678",
"delivery_method": "callout",
"fee": "0.08",
"status": "verified",
"error_code": null,
"error_detail": null,
"expires_at": "2026-07-15T10:02:00.000Z",
"callout": {
"language": "de-DE"
}
}
}
The response above shows a successful report. The API returns 200 OK with status
verified when the submitted code matches.
If the submitted code is incorrect, the API returns the following response:
HTTP/1.1 422 Unprocessable Content
Content-Type: application/json
{
"errors": [
{
"code": "code_invalid",
"detail": "code is invalid"
}
]
}
After an incorrect report, the verification remains pending, and the user can submit
another code until the attempt limit is reached. After three unsuccessful reports, the
verification becomes failed with error_code too_many_attempts.
Next steps#
Start a verification: Review all start-request and response fields.
Report a verification: Review all report-request and response fields.