Sends a sign-in verification code to a phone number
POST
/api/v1/websites/{website_id}/phone_identities/send_otp
const url = 'https://dashboard.dealerstudio.com.au/api/v1/websites/example/phone_identities/send_otp';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"phone_number":"+61411222333","otp_code":"418204"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”website_id
required
string
Website ID
Request Body
Section titled “Request Body”Media typeapplication/json
object
phone_number
required
string
Example
+61411222333otp_code
required
4 to 8 digits
string
Example
418204Responses
Section titled “Responses”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"}