Skip to main content
POST
/
messages
/
to_jid
Send message to jid
curl --request POST \
  --url https://app.timelines.ai/integrations/api/messages/to_jid \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jid": "14840000000@s.whatsapp.net",
  "whatsapp_account_phone": "+14841111111",
  "reply_to": "<string>",
  "text": "hello, world!",
  "file_uid": "afa9d4dd-978d-4a14-aa1b-bd65c272e645",
  "label": "customer",
  "chat_name": "MyChat",
  "attachment_template_id": 123456
}
'
{
  "status": "ok",
  "data": {
    "message_uid": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

A JSON describing recipient and message payload.

jid
string
required

jid, WhatsApp ID of a contact or a group, a string structured as 'x@s.whatsapp.net', where 'x' is the phone number of the contact.

Example:

"14840000000@s.whatsapp.net"

whatsapp_account_phone
string

the WhatsApp account (as a phone number, in international format) to which the chat specified by JID belongs to. If omitted, the most recently connected WhatsApp account in the workspace will be used.

Example:

"+14841111111"

reply_to
string | null

UID of the message this message replies to. Must reference a message in the same workspace and WhatsApp account. Null or empty string is ignored.

text
string

plain text message

Example:

"hello, world!"

file_uid
string

attachment UID

Example:

"afa9d4dd-978d-4a14-aa1b-bd65c272e645"

label
string

assign label to the chat, in which the message is sent (create new label, if not exists)

Example:

"customer"

chat_name
string

an exact name of the chat (or group) as appears in TimelinesAI)

Example:

"MyChat"

attachment_template_id
integer

a template ID of the attachment to be sent. The template must be created in the workspace before sending a message with it.

Example:

123456

Response

Success

status
enum<string>
required
Available options:
ok,
error
Example:

"ok"

data
object
required