POST
/
v1
/
api
/
send
curl --request POST \
  --url https://marketing.otpless.app/v1/api/send \
  --header 'Content-Type: application/json' \
  --header 'clientId: <api-key>' \
  --header 'clientSecret: <api-key>' \
  --data '{
  "sendTo": "recipient_phone_number",
  "channel": "WHATSAPP",
  "templateId": "template_id"
}'

Authorizations

clientId
string
header
required

Your unique client identifier.

clientSecret
string
header
required

A secret key associated with your client ID for authentication.

Body

application/json
channel
string
required

The messaging channel for sending the message. Accepted values are WHATSAPP, EMAIL, SMS.

sendTo
string
required

The recipient's phone number with country code.

bodyValues
object

Variables for personalizing the body in template messages.

buttonValues
object

Variables for dynamic buttons in template messages.

headerValues
object

Variables for personalizing the header in template messages. If you have created the template with media then pass the public URL for the media.

message
string

The text of the message, required if 'templateId' is not used.

orderId
string

A unique Identifier for the order or message.

templateId
string

Identifier for a pre-defined message template, required if 'message' is not used.

Response

200 - application/json
data
object
message
string
status
integer
success
boolean