Skip to main content
POST
/
auth
/
register
/
whatsapp
Register with WhatsApp
curl --request POST \
  --url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/register/whatsapp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "<string>",
  "first_name": "<string>",
  "country_code": "<string>",
  "last_name": "<string>",
  "email": "jsmith@example.com"
}
'
{
  "message": "<string>",
  "success": true,
  "content": {
    "otp_token": "<string>",
    "otp_action": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Access token

Headers

x-debug-mode
boolean

This param is used to enable debug mode. If debug mode is enabled, the API will return OTP as well. This is only for development and testing purposes.

Body

application/json
phone
string
required

10 digit WhatsApp number without country code.

Required string length: 10
Pattern: ^[0-9]{10}$
first_name
string
required
country_code
string | null

Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.

Allowed value: "+91"
last_name
string | null
email
string<email> | null

Response

OK

message
string
required
success
boolean
required
content
OtpContent ยท object
required