cURL
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" }'
{ "chat_group_id": "<string>", "from": "<string>", "body": "<string>", "status": "queued", "date_created": "2023-11-07T05:31:56Z" }
Send a message to a group chat
POST /group/{accountId}/send Headers: x-api-key: your_api_key x-api-secret: your_api_secret Content-Type: application/json Body: { "from": "+14155552671", "thread_id": "group-thread-id-123", "service": "whatsapp", "message": "Hello everyone in the group!" }
POST /group/{accountId}/send Headers: x-api-key: your_api_key x-api-secret: your_api_secret Content-Type: application/json Body: { "from": "+14155552671", "thread_id": "group-thread-id-123", "service": "whatsapp", "message_type": "media", "media_url": "https://example.com/documents/report.pdf", "media_type": "document", "caption": "Here's the quarterly report" }
POST /send/{accountId} Headers: x-api-key: your_api_key x-api-secret: your_api_secret Content-Type: application/json Body: { "from": "+14155552671", "thread_id": "group-thread-id-123", "service": "whatsapp", "type": "group", "content": { "type": "media", "media_url": "https://example.com/videos/demo.mp4", "media_type": "video", "caption": "Product demo video for the team" } }
thread_id
to
caption
Message sent successfully
The response is of type object.
object