Phone Verification
Create Verification Request

Create Verification Request

This is the starting point for every phone number verification. Send a request to create a verification for your preferred type. You will receive everything you need to continue or an appropriate error.


POST https://api.zamry.com/v1/otp/request (opens in a new tab)

Body Parameters

ParametertypeRequiredDescription
countryCodestringtrueThe country code of the phone number, e.g. +233, +234.
phoneNumberstringtrueThe phone number to verify, e.g. 0240000000, 09012345678
typestringtrueDefaults to SEND_SMS. Selects the type of verification to request. See Verification Types (opens in a new tab)
webhookUrlstringfalseA url to receive updates whenever the status of the verification changes. See Verification Status (opens in a new tab)
referencestringfalseYour reference for the request

Request

OTP request [POST]
curl --location 'https://api.zamry.com/v1/otp/request' \
--header 'Authorization: Bearer {{auth-key}}' \
--header 'Content-Type: application/json' \
--data '{
  "countryCode": "+233",
  "phoneNumber": "0240000000",
  "type": "DROPPED_CALL",
  "webhookUrl": "https: //webhook.site/3ac678e7-f2e1-4259-ba0b-f86e150ad591",
  "reference": "poeur3433"
}'

Responses

🟢 200 - Result example
  {
  "status": true,
  "message": "OTP sent successfully",
  "data": {
      "id": "cecf04d6-f60b-4aa9-9348-352fc3d791df",
      "createdAt": "2024-07-17T13:11:05.129Z",
      "updatedAt": "2024-07-17T13:11:05.129Z",
      "otp": "buhari sun I am tree",
      "phoneNumber": "+233240000000",
      "country": "+233",
      "countryCode": "+233",
      "counter": 0,
      "pairedNumber": "053000000",
      "type": "SMS",
      "status": "PENDING",
      "webhookUrl": "https://webhook.site/a7724520-f45b-4ac6-b57c-1003d2fb4462"
  }
}

Webhook

OTP request webhook is fired when the otp request was successful,failed or the request expired.

OTP Request Successful

This is a webhook that is fired when a the OTP request is successful.

OTP Request Success
{
  "event": "action.otp.success",
  "data": {
    "id": "60878b17-e33e-420a-9c94-e3b13280487c",
    "otp": "2296",
    "type": "SMS",
    "status": "SUCCESS",
    "createdAt": "2024-07-09T16:18:22.785Z",
    "countryCode": "+233",
    "phoneNumber": "+2332490000"
  }
}

'