POST
/
authentication

Authorizations

x-api-key
string
header
required

Body

application/json
customer_uuid
string
required

Your customer UUID, which can be found in the API settings in the dashboard.

phone_number
string
required

An E.164 formatted phone number to send the OTP to.

app_realm
string

The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices.

app_version
string

The version of your application.

callback_url
string

A webhook URL to which delivery statuses will be sent.

correlation_id
string

A unique, user-defined identifier that will be included in webhook events

device_id
string

Unique identifier for the user's device. For Android, this corresponds to the ANDROID_ID and for iOS, this corresponds to the identifierForVendor.

device_model
string

The model of the user's device.

device_type
enum<string>

The type of device the user is using.

Available options:
IOS,
ANDROID,
WEB
ip
string

The IP address of the user's device.

is_returning_user
boolean

This signal should do more than just confirm if a user is returning to your app; it should provide a higher level of trust, indicating that the user is genuine. For more details, refer to Signals.

locale
string

A BCP-47 locale indicating the language the SMS should be sent to; if this is not set, the SMS will be sent to the language specified by the country code of the message. If we don't support the language set, the message will be sent in US English (en-US).

os_version
string

The version of the user's device operating system.

sender_id
string

The Sender ID to use when sending the message.

template_id
string

The template id associated with the message content variant to be sent.

Response

200 - application/json

A successful response to an authentication creation request.

authentication_uuid
string

A unique identifier for the authentication that you can use on the /check and /retry endpoints.

created_at
string
expires_at
string

The time at which the authentication expires and can no longer be checked or retried.

status
enum<string>

The status of the authentication. Possible values are:

  • pending - The OTP code is being sent.
  • rate_limited - This user is rate-limited and cannot receive another code.
  • spam_detected - This attempt is flagged as spam. Go to the dashboard for more details.
Available options:
pending,
rate_limited,
spam_detected