Verifications
Verification endpoints are meant to send verification messages and verify the existence of the recipient.
Method: Create
Operation sends a verification message from a sender to a recipient.
URL | /v1/verifications |
Method Type | POST |
Authorization | API Key |
Request Content-Type | JSON |
Response Content-Type | JSON |
Headers
Name | Type | Description | Status |
---|---|---|---|
X-Dexatel-Key | string | API key | Required |
Request Body
Name | Type | Description | Status |
---|---|---|---|
data | object |
Details (see data object below) |
Optional |
Name | Type | Description | Status |
---|---|---|---|
sender | string | Identifier of the sender | Required |
phone | string | Phone number of the recipient | Required |
template | string | Template of the message | Required |
code_length | string | Length of the code to be generated | Optional |
Response Parameters
Name | Type | Description | Status |
---|---|---|---|
data | object |
Details (see data object below) |
Optional |
Name | Type | Description | Status |
---|---|---|---|
account_id | string | Unique identifier of the account | Optional |
message_id | string | Unique identifier of the message | Optional |
phone | string | Phone number of the recipient | Optional |
code | string | Verification code | Optional |
create_date | string | Creation date of the campaign in UTC, formatted as yyyyMM-dd HH:mm:ss | Optional |
expire_date | string | Expiration date of the verification in UTC, formatted as yyyy-MM-dd HH:mm:ss | Optional |
links | object |
Details (see links object below) |
Optional |
Name | Type | Description | Status |
---|---|---|---|
account | string | URL of the account | Optional |
Example of request body
POST:
/v1/verifications
X-Dexatel-Key: 94d2f2f2884848bca861264ad86d8ace
Content-Type: application/json
Example of response body
status - 201
Error Codes
The following error codes are returned in response to a user’s request which contains bad syntax or cannot be fulfilled.
Code | Description |
---|---|
1620 | 'data' is required |
1621 | 'data.sender' is required |
1622 | 'data.phone' is required |
1623 | data.template' is required |
1624 | 'data.code_length' is invalid |
1625 | 'data.template' is invalid |
1626 | 'data.template' does not contain keyword {code} |