Skip to main content
POST
/
messages
/
whatsapp
Send a WhatsApp message
curl --request POST \
  --url https://api.pokulabs.com/messages/whatsapp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "to": "<string>",
  "waitTime": 60,
  "followUpTime": 6000
}
'
{
  "interactionId": "092f9eb4-3694-4718-9084-5c786afa87ec"
}

Authorizations

Authorization
string
header
required

Authentication header containing your Poku API key. Find it in the Poku dashboard. The format is "Bearer YOUR_API_KEY"

Body

application/json
message
string
required

The content of the WhatsApp message.

to
string
required

The number you want to message, in E.164 format.

waitTime
number

When undefined or not supplied, no reply is captured.

When supplied, this is the number of seconds the API request is held open waiting for a reply. Poku returns the reply in the HTTP response.

Required range: 1 <= x <= 600
Example:

60

followUpTime
number

Duration in seconds to keep listening for a reply after the waitTime window closes.

When a reply arrives within this window, Poku sends it to any webhooks you've configured.

Required range: 1 <= x <= 60000
Example:

6000

Response

200 - application/json

Message sent successfully.

interactionId
string

Returned when no waitTime is set. Unique identifier for this interaction.

response
string

Returned when waitTime is set. Contains the recipient reply, or a timeout message if no reply was received.