Verify API

The verification API allows you to verify if a user currently has access to a given phone number or email address, by sending them an OTP and asking them to verify the code that was sent to them.

This can be achieved by using the following API endpoints below.

Currently, verify only supports Email, WhatsApp and SMS

Sending a Verification

In order to send a message you must have an active channel and perform an HTTP request to the following endpoint with a valid access key.

Creates a new verification message

post

Creates a new verification message

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

Body
localestring · locale-bcp47Optional

The locale/language of the message sent to the user. If not provided, we will attempt to determine the locale from the user's phone number. If we are unable to determine the locale, we will default to "en-US".

maxAttemptsinteger · min: 1 · max: 10Optional

The maximum number of attempts to verify the user. [Default: 3]

Default: 3
timeoutinteger · min: 30 · max: 3600Optional

The time in seconds before this verification expires. Once expired, it can no longer be verified. [Default: 600]

Default: 600
codeLengthinteger · min: 6 · max: 12Optional

The length of the verification code. [Default: 6]

Default: 6
Responses
202
Verify request was accepted for processing
application/json
post
POST /workspaces/{workspaceId}/verify HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "identifier": {
    "phonenumber": "text",
    "emailaddress": "text"
  },
  "locale": "text",
  "maxAttempts": 3,
  "timeout": 600,
  "codeLength": 6,
  "steps": [
    null
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "identifier": {
    "phonenumber": "text",
    "emailaddress": "text"
  },
  "locale": "text",
  "maxAttempts": 3,
  "failedAttempts": 1,
  "timeout": 600,
  "codeLength": 6,
  "status": "accepted",
  "currentStepIndex": 1,
  "steps": [
    {
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "navigatorId": "123e4567-e89b-12d3-a456-426614174000",
      "identifier": "text",
      "template": {
        "name": "text",
        "projectId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "version": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "locale": "text",
        "attachments": [
          {
            "mediaUrl": "https://example.com",
            "filename": "text",
            "inline": true
          }
        ],
        "shortLinks": {
          "enabled": true,
          "domain": "text"
        },
        "variables": {
          "default": "text",
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "utmParameters": [
          {
            "key": "text",
            "value": "text"
          }
        ],
        "parameters": [
          {
            "type": "string",
            "key": "text",
            "value": "text"
          }
        ],
        "settings": {
          "useMmLite": true
        }
      },
      "status": "unused",
      "attempts": [
        {
          "messageId": "123e4567-e89b-12d3-a456-426614174000",
          "status": "prepared",
          "verified": true,
          "sentAt": "2025-07-01T22:34:58.956Z",
          "verifiedAt": "2025-07-01T22:34:58.956Z"
        }
      ]
    }
  ],
  "createdAt": "2025-07-01T22:34:58.956Z",
  "updatedAt": "2025-07-01T22:34:58.956Z",
  "expiresAt": "2025-07-01T22:34:58.956Z"
}

Here is an example of a basic verify request body for SMS

{
  "identifier": {
    "phonenumber": "+31623456789"
  },
  "steps": [
    {
      "channelId": "SMS_CHANNEL_UUID"
    }
  ]
}

Steps

You can use Steps to implement a failover strategy between different channels. The minimum amount of steps is one. Calling the failover endpoint will cause it to move to the next step.

{
  "identifier": {
    "phonenumber": "+31623456789",
    "emailaddress": "[email protected]"
  },
  "locale": "en-US",
  "maxAttempts": 3,
  "timeout": 300,
  "codeLength": 6,
  "steps": [
    {
      "channelId": "CHANNEL_UUID"
    },
    {
      "channelId": "FAILOVER_CHANNEL_UUID"
    }
  ]
}

Instead of using an SMS channel step, use an SMS navigator. Navigators offer two key advantages:

  • Improve Reliability: Your integration remains consistent, preventing any changes, additions, or deletions to your channels from impacting your verification requests.

  • Improved Coverage: The best available channel will be used based on the country of the number you are trying to verify, increasing your conversion rate.

You can achieve this by using the following syntax, based on the UUID you can find in Developers -> Navigators -> Navigator Setup -> OTP:

"steps": [
    {
        "navigatorId": "OTP_navigator_UUID"
    }
]

Templates

Verify supports using templates for some channels. The following is an example of using a channel with a template.

{
  "identifier": {
    "phonenumber": "+31623456789",
  },
  "steps": [
    {
      "channelId": "CHANNEL_UUID",
      "template": {
        "projectId": "TEMPLATE_UUID",
        "version": "TEMPLATE_VERSION_UUID|latest",
        "locale": "en"
      }
    }
  ]
}

SMS Templates

SMS does not support templates. For SMS, the body is generated by the verify API. You can however change the language by setting the locale of the verification. Supported languages include:

  • Afrikaans

  • Arabic

  • German

  • English

  • Spanish

  • French

  • Italian

  • Dutch

  • Polish

  • Portuguese

  • Russian

  • Turkish

Email Templates

For emails, templates work just as you would expect via the channels API, with the addition of a variable for the Verify OTP Code.

When setting up a template for Email, select {} -> Verify -> OTP from the list of variables

WhatsApp Templates

Templates for WhatsApp channels are required. In order to send an OTP message to a WhatsApp channel, you need to have an Authentication Template set up.

Verifying the code

Once you have received a code from one of your users you will have to confirm if the code is valid.

Verifies a code of a verification message

post

Verifies a code of a verification message

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

verificationIdstring · uuidRequired

The ID for a verification

Body
codestring · min: 6 · max: 12Required
Responses
200
Code was successfully verified
application/json
post
POST /workspaces/{workspaceId}/verify/{verificationId} HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "code": "text"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "identifier": {
    "phonenumber": "text",
    "emailaddress": "text"
  },
  "locale": "text",
  "maxAttempts": 3,
  "failedAttempts": 1,
  "timeout": 600,
  "codeLength": 6,
  "status": "accepted",
  "currentStepIndex": 1,
  "steps": [
    {
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "navigatorId": "123e4567-e89b-12d3-a456-426614174000",
      "identifier": "text",
      "template": {
        "name": "text",
        "projectId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "version": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "locale": "text",
        "attachments": [
          {
            "mediaUrl": "https://example.com",
            "filename": "text",
            "inline": true
          }
        ],
        "shortLinks": {
          "enabled": true,
          "domain": "text"
        },
        "variables": {
          "default": "text",
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "utmParameters": [
          {
            "key": "text",
            "value": "text"
          }
        ],
        "parameters": [
          {
            "type": "string",
            "key": "text",
            "value": "text"
          }
        ],
        "settings": {
          "useMmLite": true
        }
      },
      "status": "unused",
      "attempts": [
        {
          "messageId": "123e4567-e89b-12d3-a456-426614174000",
          "status": "prepared",
          "verified": true,
          "sentAt": "2025-07-01T22:34:58.956Z",
          "verifiedAt": "2025-07-01T22:34:58.956Z"
        }
      ]
    }
  ],
  "createdAt": "2025-07-01T22:34:58.956Z",
  "updatedAt": "2025-07-01T22:34:58.956Z",
  "expiresAt": "2025-07-01T22:34:58.956Z"
}

Resend a code for a specific verification step

Using the following endpoint, you can also resend a message for a given verification step.

By not setting a value for stepIndex, it will default to the currently active step.

Resend verification code

post

Attempt resending a verification code for a given step

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

verificationIdstring · uuidRequired

The ID for a verification

Body
stepIndexinteger | nullableOptional

The index of the step to use.

Default: null
Responses
202
Resend request was accepted for processing
application/json
post
POST /workspaces/{workspaceId}/verify/{verificationId}/resend HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "stepIndex": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "identifier": {
    "phonenumber": "text",
    "emailaddress": "text"
  },
  "locale": "text",
  "maxAttempts": 3,
  "failedAttempts": 1,
  "timeout": 600,
  "codeLength": 6,
  "status": "accepted",
  "currentStepIndex": 1,
  "steps": [
    {
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "navigatorId": "123e4567-e89b-12d3-a456-426614174000",
      "identifier": "text",
      "template": {
        "name": "text",
        "projectId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "version": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "locale": "text",
        "attachments": [
          {
            "mediaUrl": "https://example.com",
            "filename": "text",
            "inline": true
          }
        ],
        "shortLinks": {
          "enabled": true,
          "domain": "text"
        },
        "variables": {
          "default": "text",
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "utmParameters": [
          {
            "key": "text",
            "value": "text"
          }
        ],
        "parameters": [
          {
            "type": "string",
            "key": "text",
            "value": "text"
          }
        ],
        "settings": {
          "useMmLite": true
        }
      },
      "status": "unused",
      "attempts": [
        {
          "messageId": "123e4567-e89b-12d3-a456-426614174000",
          "status": "prepared",
          "verified": true,
          "sentAt": "2025-07-01T22:34:58.956Z",
          "verifiedAt": "2025-07-01T22:34:58.956Z"
        }
      ]
    }
  ],
  "createdAt": "2025-07-01T22:34:58.956Z",
  "updatedAt": "2025-07-01T22:34:58.956Z",
  "expiresAt": "2025-07-01T22:34:58.956Z"
}

Failover to next step

You can failover to another verification step by calling the following endpoint.

By not setting a value for stepIndex, it will default to the next step in the array.

Auto Failover

Verify will automatically failover to the next step when a step fails to send or deliver, provided the next step is on a different platform.

Examples:

  1. Different Platforms:

    • If two steps are used: the 1st is WhatsApp, and the 2nd is SMS, the SMS will automatically be sent if the WhatsApp message fails to send or deliver.

    • If two steps are used: the 1st is SMS, and the 2nd is Email, the email will automatically be sent if the SMS fails to send or deliver.

  2. Same Platform:

    • If two steps are used, and both are SMS, the second SMS will not be automatically selected if the first SMS fails.

    • This is because Bird assumes that if one type of SMS fails, all SMS will fail, as they rely on the same infrastructure.

Failover to next step

post

Failover to the next step of the verification process

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

verificationIdstring · uuidRequired

The ID for a verification

Body
stepIndexinteger | nullableOptional

The index of the step to use.

Default: null
Responses
202
Failover request was accepted for processing
application/json
post
POST /workspaces/{workspaceId}/verify/{verificationId}/failover HTTP/1.1
Host: 
Authorization: Bearer jwt
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "stepIndex": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "identifier": {
    "phonenumber": "text",
    "emailaddress": "text"
  },
  "locale": "text",
  "maxAttempts": 3,
  "failedAttempts": 1,
  "timeout": 600,
  "codeLength": 6,
  "status": "accepted",
  "currentStepIndex": 1,
  "steps": [
    {
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "navigatorId": "123e4567-e89b-12d3-a456-426614174000",
      "identifier": "text",
      "template": {
        "name": "text",
        "projectId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "version": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "locale": "text",
        "attachments": [
          {
            "mediaUrl": "https://example.com",
            "filename": "text",
            "inline": true
          }
        ],
        "shortLinks": {
          "enabled": true,
          "domain": "text"
        },
        "variables": {
          "default": "text",
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "utmParameters": [
          {
            "key": "text",
            "value": "text"
          }
        ],
        "parameters": [
          {
            "type": "string",
            "key": "text",
            "value": "text"
          }
        ],
        "settings": {
          "useMmLite": true
        }
      },
      "status": "unused",
      "attempts": [
        {
          "messageId": "123e4567-e89b-12d3-a456-426614174000",
          "status": "prepared",
          "verified": true,
          "sentAt": "2025-07-01T22:34:58.956Z",
          "verifiedAt": "2025-07-01T22:34:58.956Z"
        }
      ]
    }
  ],
  "createdAt": "2025-07-01T22:34:58.956Z",
  "updatedAt": "2025-07-01T22:34:58.956Z",
  "expiresAt": "2025-07-01T22:34:58.956Z"
}

Retrieving Verifications

Retrieving a list of Verifications

List all verifications

get

List all verifications for this workspace

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

Query parameters
limitinteger · min: 1 · max: 1000Optional

Limits the number of results to return

Default: 10
pageTokenstring · max: 8000Optional

Pagination token that keeps of track of the current position in the list

reversebooleanOptional

Order in which to retrieve the results

Default: false
startAtstring · date-timeOptional

Start date for the query

endAtstring · date-timeOptional

End date for the query

Responses
200
OK
application/json
Responseall of
get
GET /workspaces/{workspaceId}/verify HTTP/1.1
Host: 
Authorization: Bearer jwt
Accept: */*
{
  "nextPageToken": "text",
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "identifier": {
        "phonenumber": "text",
        "emailaddress": "text"
      },
      "locale": "text",
      "maxAttempts": 3,
      "failedAttempts": 1,
      "timeout": 600,
      "codeLength": 6,
      "status": "accepted",
      "currentStepIndex": 1,
      "steps": [
        {
          "channelId": "123e4567-e89b-12d3-a456-426614174000",
          "navigatorId": "123e4567-e89b-12d3-a456-426614174000",
          "identifier": "text",
          "template": {
            "name": "text",
            "projectId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
            "version": "a1405560-c8d3-4b1a-877d-3f449ad95352",
            "locale": "text",
            "attachments": [
              {
                "mediaUrl": "https://example.com",
                "filename": "text",
                "inline": true
              }
            ],
            "shortLinks": {
              "enabled": true,
              "domain": "text"
            },
            "variables": {
              "default": "text",
              "ANY_ADDITIONAL_PROPERTY": "text"
            },
            "utmParameters": [
              {
                "key": "text",
                "value": "text"
              }
            ],
            "parameters": [
              {
                "type": "string",
                "key": "text",
                "value": "text"
              }
            ],
            "settings": {
              "useMmLite": true
            }
          },
          "status": "unused",
          "attempts": [
            {
              "messageId": "123e4567-e89b-12d3-a456-426614174000",
              "status": "prepared",
              "verified": true,
              "sentAt": "2025-07-01T22:34:58.956Z",
              "verifiedAt": "2025-07-01T22:34:58.956Z"
            }
          ]
        }
      ],
      "createdAt": "2025-07-01T22:34:58.956Z",
      "updatedAt": "2025-07-01T22:34:58.956Z",
      "expiresAt": "2025-07-01T22:34:58.956Z"
    }
  ]
}

Retrieving a single Verification

Get verification message

get

Get a verification message

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID of the workspace

verificationIdstring · uuidRequired

The ID for a verification

Responses
200
OK
application/json
get
GET /workspaces/{workspaceId}/verify/{verificationId} HTTP/1.1
Host: 
Authorization: Bearer jwt
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "identifier": {
    "phonenumber": "text",
    "emailaddress": "text"
  },
  "locale": "text",
  "maxAttempts": 3,
  "failedAttempts": 1,
  "timeout": 600,
  "codeLength": 6,
  "status": "accepted",
  "currentStepIndex": 1,
  "steps": [
    {
      "channelId": "123e4567-e89b-12d3-a456-426614174000",
      "navigatorId": "123e4567-e89b-12d3-a456-426614174000",
      "identifier": "text",
      "template": {
        "name": "text",
        "projectId": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "version": "a1405560-c8d3-4b1a-877d-3f449ad95352",
        "locale": "text",
        "attachments": [
          {
            "mediaUrl": "https://example.com",
            "filename": "text",
            "inline": true
          }
        ],
        "shortLinks": {
          "enabled": true,
          "domain": "text"
        },
        "variables": {
          "default": "text",
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "utmParameters": [
          {
            "key": "text",
            "value": "text"
          }
        ],
        "parameters": [
          {
            "type": "string",
            "key": "text",
            "value": "text"
          }
        ],
        "settings": {
          "useMmLite": true
        }
      },
      "status": "unused",
      "attempts": [
        {
          "messageId": "123e4567-e89b-12d3-a456-426614174000",
          "status": "prepared",
          "verified": true,
          "sentAt": "2025-07-01T22:34:58.956Z",
          "verifiedAt": "2025-07-01T22:34:58.956Z"
        }
      ]
    }
  ],
  "createdAt": "2025-07-01T22:34:58.956Z",
  "updatedAt": "2025-07-01T22:34:58.956Z",
  "expiresAt": "2025-07-01T22:34:58.956Z"
}

Last updated

Was this helpful?