WhatsApp messaging

Create outbound message

Creates a new message sent by the admin.

post/admin/messengers/whatsapp-send-messages

Request

  • Base URL: https://demo.splynx.com/api/2.0
  • URL: https://demo.splynx.com/api/2.0/admin/messengers/whatsapp-send-messages
  • Auth: HTTP basic

Query parameters

chat_idnumber double required
Example:1

The ID of the chat.

paramsstring
Example:http_build_query($search)

Any parameters of record. <br>You should set at least one record`s parameter. <br>This parameters should be converted to query string.<br>For example:<br>$search = [ <br>  'main_attributes' => [<br>    'inbound' => 1<br>   ], <br>  'limit' => 15,<br>  'offset' => 5<br>];<br>

Request body

chat_idnumber required

Chat ID

admin_idnumber

Admin ID

bodystring
external_idstring
statusstring

Message status

force_sendboolean

Defines whether message should be sent to provider (Twilio).

If false: (default): message is only stored in system and not delivered to customer. If true: message is stored in system and additionally sent to provider (Twilio and WhatsApp), so customer receives it as reply

filesstring[]

Files to attach to the message — multipart/form-data binary upload. For files larger than the multipart limit (~16 MB / nginx 20 MB), upload them via chunked upload first and pass IDs in file_ids instead.

file_idsinteger[]

IDs of files pre-uploaded via POST /admin/config/chunked-upload/{hash} with type=messengers_messages_attachment. Use this for files larger than the multipart limit. Can be combined with files.

Example request

{
  "chat_id": 1,
  "admin_id": 1,
  "body": "test2",
  "external_id": "SM333a12222",
  "status": "delivered",
  "file_ids": [
    123
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.