Skip to main content
POST
Start a verification

Authorizations

X-API-Key
string
header
required

Prefix tor_ followed by a base64url-encoded random key. Create and manage API keys from the authenticated Torpedo dashboard.

Headers

Idempotency-Key
string

Unique key for replaying the original accepted response without sending again. Leading and trailing whitespace is removed; only the first 255 characters are retained.

Body

application/json
to
string
required

Recipient phone number in E.164 format

Pattern: ^\+[1-9]\d{7,14}$
Example:

"+258841234567"

channel
enum<string>
default:whatsapp

SMS only works for Mozambican mobile numbers.

Available options:
whatsapp,
sms
fallback
enum<string> | null

Send the code by SMS if WhatsApp fails. Defaults to the workspace setting.

Available options:
sms
locale
enum<string>

Template language. Defaults to the workspace setting.

Available options:
pt,
en
code
string

Your own code. Omit it to let Torpedo generate one. Can't be combined with codeLength.

Pattern: ^(?=.*\d)[A-Za-z0-9]{4,10}$
codeLength
integer

Length of the generated code. Defaults to the workspace setting.

Required range: 6 <= x <= 10
template
string

Name of an approved WhatsApp authentication template.

Maximum string length: 512
clientRef
string

Your own reference, returned on the verification and in webhooks.

Maximum string length: 128
ip
string

The end user's IP address, used for per-IP rate limiting.

Maximum string length: 64

Response

Verification started

data
object