Create a verification
POST/api/v2/verify/services/{service_sid}/verifications
Creates an inverted-OTP verification for the supplied E.164 phone number. The user must send the returned code from that exact phone number to the returned Sendblue destination number.
Include hosted to create an origin-bound Hosted Verify widget session. Sendblue API credentials
must remain on the customer’s backend; only the returned hosted values may be sent to the browser.
Twilio-compatible clients may alternatively send the API Key ID and API Secret Key with HTTP Basic
authentication. Temporary bearer authentication is supported for account-scoped tokens; line-scoped
temporary tokens cannot create account-wide Verifications.
Create a verification
curl https://api.sendblue.co/api/v2/verify/services/$SERVICE_SID/verifications \
-H 'Content-Type: application/json' \
-H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
-H "sb-api-secret-key: $SENDBLUE_API_API_SECRET" \
-d '{
"to": "+14155551212"
}'{
"account_sid": "account_sid",
"channel": "imessage",
"date_created": "2019-12-27T18:11:19.117Z",
"date_updated": "2019-12-27T18:11:19.117Z",
"expires_at": "2019-12-27T18:11:19.117Z",
"service_sid": "SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD",
"sid": "VRE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD",
"status": "pending",
"to": "+14155551212",
"url": "https://example.com",
"delivery_target": {
"code": "CB6DJ9",
"pool_number": "+17865640246",
"sms_deep_link": "sms:+17865640246?body=CB6DJ9"
},
"hosted": {
"component_script": "https://api.sendblue.co/api/v2/verify/widget.js",
"expires_at": "2019-12-27T18:11:19.117Z",
"session_id": "session_id",
"url": "https://api.sendblue.co/api/v2/verify/widget?session=abc123#token=secret"
}
}Returns Examples
{
"account_sid": "account_sid",
"channel": "imessage",
"date_created": "2019-12-27T18:11:19.117Z",
"date_updated": "2019-12-27T18:11:19.117Z",
"expires_at": "2019-12-27T18:11:19.117Z",
"service_sid": "SVE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD",
"sid": "VRE1CB97d8EBbDbaAae6d9B1ca0D1cFaAD",
"status": "pending",
"to": "+14155551212",
"url": "https://example.com",
"delivery_target": {
"code": "CB6DJ9",
"pool_number": "+17865640246",
"sms_deep_link": "sms:+17865640246?body=CB6DJ9"
},
"hosted": {
"component_script": "https://api.sendblue.co/api/v2/verify/widget.js",
"expires_at": "2019-12-27T18:11:19.117Z",
"session_id": "session_id",
"url": "https://api.sendblue.co/api/v2/verify/widget?session=abc123#token=secret"
}
}