POST
/
api
/
sendText
Enviar uma mensagem de texto
curl --request POST \
  --url https://api.wappfy.com.br/api/sendText \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "session": "session",
  "chatId": "5511999999999@c.us",
  "text": "Hello World!"
}'
{
  "id": "false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
  "timestamp": 1666943582,
  "from": "11111111111@c.us",
  "fromMe": true,
  "source": "api",
  "to": "11111111111@c.us",
  "participant": "<string>",
  "body": "<string>",
  "hasMedia": true,
  "media": {
    "url": "http://localhost:3000/api/files/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga",
    "mimetype": "audio/jpeg",
    "filename": "example.pdf",
    "s3": {
      "Bucket": "my-bucket",
      "Key": "default/false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA.oga"
    },
    "error": null
  },
  "ack": -1,
  "ackName": "<string>",
  "author": "<string>",
  "location": {
    "description": "<string>",
    "latitude": "<string>",
    "longitude": "<string>"
  },
  "vCards": [
    "<string>"
  ],
  "_data": {},
  "replyTo": {
    "id": "AAAAAAAAAAAAAAAAAAAA",
    "participant": "11111111111@c.us",
    "body": "Hello!",
    "_data": {}
  }
}

Authorizations

apikey
string
header
required

Apikey

Body

application/json
chatId
string
required
Example:

"11111111111@c.us"

text
string
default:Hi there!
required
session
string
required

O nome da sessão (instanceName)

Example:

"session"

reply_to
string

The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA

Example:

null

Response

201 - application/json
id
string
required

Message ID

Example:

"false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA"

timestamp
number
required

Unix timestamp for when the message was created

Example:

1666943582

from
string
required

ID for the Chat that this message was sent to, except if the message was sent by the current user

Example:

"11111111111@c.us"

fromMe
boolean
required

Indicates if the message was sent by the current user

source
enum<string>
required

The device that sent the message - either API or APP. Available in events (webhooks/websockets) only and only "fromMe: true" messages.

Available options:
api,
app
Example:

"api"

to
string
required
  • ID for who this message is for.
  • If the message is sent by the current user, it will be the Chat to which the message is being sent.
  • If the message is sent by another user, it will be the ID for the current user.
Example:

"11111111111@c.us"

participant
string
required

For groups - participant who sent the message

body
string
required

Message content

hasMedia
boolean
required

Indicates if the message has media available for download

ack
enum<number>
required

ACK status for the message

Available options:
-1,
0,
1,
2,
3,
4
ackName
string
required

ACK status name for the message

media
object

Media object for the message if any and downloaded

author
string

If the message was sent to a group, this field will contain the user that sent the message.

location
object

Location information contained in the message, if the message is type "location"

vCards
string[]

List of vCards contained in the message.

_data
object

Message in a raw format that we get from WhatsApp. May be changed anytime, use it with caution! It depends a lot on the underlying backend.

replyTo
object