Verify verification code by ID
POST/verifications/:verification_id/actions/verify
Verify verification code by ID
Request
Path Parameters
verification_id uuidrequired
The identifier of the verification to retrieve.
- application/json
Body
required
code string
This is the code the user submits for verification.
status string
Possible values: [accepted
, rejected
]
Identifies if the verification code has been accepted or rejected. Only permitted if custom_code was used for the verification.
Responses
200: Expected verify response to a valid request.
- application/json
400: Bad Request
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/verifications/:verification_id/actions/verify' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"code": "17686",
"status": "accepted"
}'
Response samples
{
"data": {
"phone_number": "+13035551234",
"response_code": "accepted"
}
}
{
"errors": [
{
"code": "10015",
"title": "Invalid sorting value",
"detail": "The value provided for sorting is not valid. Check the value used and try again.",
"source": {
"pointer": "/sort",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}