POST
/
messages
curl --request POST \
  --url https://docs0.lafricamobile.com/dev/whatsapp/messages \
  --header 'Content-Type: application/json' \
  --header 'LAM-API-KEY: <lam-api-key>' \
  --data '{
  "recipient_type": "individual",
  "to": 221771234567,
  "type": "text",
  "text": {
    "body": "Hello Mr. John Doe."
  }
}'

Headers

LAM-API-KEY
string
required

Body

application/json
to
string
required

The WhatsApp ID for the recipient of your message.

type
string
required

The type of message you would like to send.

recipient_type
string

The type of recipient the message is being sent to.

preview_url
boolean

Allows for URL previews in text messages (Only used with messages of text type.)

text
object

Contains a text object (Required for messages of text type).

image
object

Required when type is audio, document, image or video. Do not use this field when message type is set to text

document
object

Required when type is audio, document, image or video. Do not use this field when message type is set to text

audio
object

Required when type is audio, document, image or video. Do not use this field when message type is set to text

video
object

Required when type is audio, document, image or video. Do not use this field when message type is set to text

contacts
object[]

Required when type is contacts.

location
object

Required when type is location.

interactive
object

Required when type is interactive. Usually contains four main components (header, body, footer and action).

template
object

Required when message type is "template". Do not use this field when message type is set to text

Response

201 - application/json
contacts
object[]
messages
object[]
meta
object