Skip to main content
POST
/
api
/
instances
/
{instanceId}
/
messages
/
send
Send a message via WhatsApp
curl --request POST \
  --url https://api.wappfy.io/api/instances/{instanceId}/messages/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "<string>",
  "type": "text",
  "body": "<string>",
  "media_url": "<string>",
  "caption": "<string>",
  "template_name": "<string>",
  "template_params": {},
  "location": {
    "latitude": -23.5505,
    "longitude": -46.6333,
    "name": "Av. Paulista, São Paulo"
  },
  "quoted_message_id": "<string>",
  "edit_message_id": "<string>",
  "mentions": [
    "<string>"
  ],
  "poll": {
    "name": "<string>",
    "options": [
      "<string>"
    ],
    "multipleAnswers": true
  },
  "contacts": [
    {
      "fullName": "<string>",
      "phoneNumber": "<string>",
      "organization": "<string>",
      "whatsappId": "<string>"
    }
  ],
  "forward_message_id": "<string>",
  "reaction": "<string>",
  "reaction_message_id": "<string>"
}
'
{
  "message": "Message queued for delivery",
  "jobId": "42"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

instanceId
string<uuid>
required

The WhatsApp instance UUID

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Body

application/json
to
string
required

Recipient phone number or chatId

type
enum<string>
required
Available options:
text,
image,
video,
audio,
document,
location,
template,
poll,
contact,
forward,
reaction
body
string
media_url
string
caption
string
template_name
string
template_params
object
location
object
quoted_message_id
string

Message ID to reply/quote

edit_message_id
string

Message ID to edit

mentions
string[]

@mentions (phone numbers with @c.us)

poll
object

Poll data (type=poll)

contacts
object[]

Contact cards (type=contact)

forward_message_id
string

Message ID to forward (type=forward)

reaction
string

Reaction emoji (type=reaction), empty string to remove

reaction_message_id
string

Message ID to react to (type=reaction)

Response

Message queued for delivery

message
string
required

Confirmation message

Example:

"Message queued for delivery"

jobId
string
required

BullMQ job ID for tracking

Example:

"42"