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"
}'
{
  "status": 200,
  "success": true,
  "message": "Request successfully sent to Meta.",
  "data": {
    "requestId": "nijwbeiu234o2i01",
    "orderId": "8790873hjknbvh"
  }
}

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
Payload containing parameters for sending the message.
sendTo
string
required

The recipient's phone number with country code.

channel
string
required

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

templateId
string

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

message
string

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

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.

bodyValues
object

Variables for personalizing the body in template messages.

buttonValues
object

Variables for dynamic buttons in template messages.

orderId
string

A unique Identifier for the order or message.

Response

200
application/json
Request successfully sent.
status
integer
Example:

200

success
boolean
Example:

true

message
string
Example:

"Request successfully sent to Meta."

data
object