Skip to content

Sends a sign-in verification code to a phone number

POST
/api/v1/websites/{website_id}/phone_identities/send_otp
curl --request POST \
--url https://dashboard.dealerstudio.com.au/api/v1/websites/example/phone_identities/send_otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "phone_number": "+61411222333", "otp_code": "418204" }'

Called by a dealership website at sign-in. Only the code is accepted; the SMS body is templated server side and sent from the dealership sender number. At most one send per number per minute. The legacy code field is still read when otp_code is absent.

website_id
required
string

Website ID

Media typeapplication/json
object
phone_number
required
string

Example

+61411222333
otp_code
required

4 to 8 digits

string

Example

418204

Code queued for delivery

Media typeapplication/json
object
queued
boolean

Example

{
"queued": true
}

Missing or insufficient API key

Code or phone number is invalid

Media typeapplication/json
object
error
string

Example

{
"error": "invalid_code"
}

A code was already sent to this number within the last minute

Media typeapplication/json
object
error
string

Example

{
"error": "otp_recently_sent"
}