POST
/
messages
/
group
/
{accountId}
/
send
curl --request POST \
  --url https://api.a1base.com/v1/messages/group/{accountId}/send \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'X-API-Secret: <api-key>' \
  --data '{
  "content": "<string>",
  "attachment_uri": "<string>",
  "from": "<string>",
  "thread_id": "<string>",
  "service": "whatsapp"
}'
{
  "messageId": "<string>",
  "accountId": "<string>",
  "chat_group_id": "<string>",
  "from": "<string>",
  "body": "<string>",
  "status": "queued",
  "date_created": "2023-11-07T05:31:56Z",
  "direction": "<string>",
  "attachment_uri": "<string>",
  "participants": [
    "<string>"
  ]
}

Sending Group Messages:

  • The agent’s phone number must first be added to the group chat before messages can be sent.

  • You’ll need the thread_id of the group chat to send messages. This is provided when you create a group or in webhook events.

Example Request

Authorizations

X-API-Key
string
header
required
X-API-Secret
string
header
required

Headers

X-API-Key
string
required
X-API-Secret
string
required

Path Parameters

accountId
string
required

Body

application/json
content
string
required

Message body text

from
string
required

Sender phone number

thread_id
string
required

ID of the chat thread

service
enum<string>
required

Messaging service to use

Available options:
whatsapp,
telegram
attachment_uri
string

Optional file/media attachment

Response

200
application/json
Message sent successfully
messageId
string
accountId
string
chat_group_id
string
from
string
body
string
status
enum<string>
Available options:
queued,
sent
date_created
string
direction
string
attachment_uri
string
participants
string[]