API Reference
Broadcast
Send messages directly
The request to send message direct to end user.
Example request
curl -X POST \
https://bot.fpt.ai/api/send_messages/ \
-H 'Authorization: Bearer <bot_token>' \
-H 'Content-Type: application/json' \
-d '{
"messages": [
{
"content": {
"text": "<user's questiion>"
},
"type": "text"
}
],
"app_code": "<bot code>",
"sender_id": "<sender id>",
"channel": "facebook"
}
'
Example response
HTTP 200 OK
Request
POST https://bot.fpt.ai/api/send_messages/
Parameters
Parameter | Required | Description |
---|---|---|
messages | yes | Message content send to user |
app_code | yes | Bot code |
sender_id | yes | ID of end user |
channel | yes | One channel in: facebook, livechat or viber |
Response
Returns a JSON message represents the request status.