Notifications
Notifications resource is used for sending various events like messages read or typing to the contact. If you’re looking for events received from the contact, see the Webhooks documentation.
Send Notification
Section titled “Send Notification”Response Body Params
POST https://api.amio.io/v1/notifications
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
channel |
object | ||
channel.id |
string | yes | Id of the channel you wish to send the notification to. You can get channel id in administration. |
contact |
object | ||
contact.id |
string | yes | Id of the contact you wish to send the notification to. There are different ways how to a contact (they are typically specific to a channel type), see Platform Specific Requests for more details. |
type |
string | yes | Type specifies the notification to be sent they are different in each platform, see Platform Specific Requests. |
Response 200
{ "channel": { "id": "6456078759331238786", "type": "{{CHANNEL_TYPE}}" }, "contact": { "id": "6456078781510718339" }, "type": "{{NOTIFICATION_TYPE}}"}Channel-specific notifications
Section titled “Channel-specific notifications”Select a channel to see its specifics.
Amio Chat: Overview
Section titled “Amio Chat: Overview”Notifications resource is used for sending various events like messages read or typing to the contact. If you’re looking for events received from the contact, see the Webhooks documentation.
Amio Chat: Send Notification
Section titled “Amio Chat: Send Notification”POST https://api.amio.io/v1/notifications
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
channel |
object | ||
channel.id |
string | yes | Id of the channel you wish to send the notification to. You can get channel id in administration. |
contact |
object | ||
contact.id |
string | yes | Id of the contact. Id is unique across channels and is generated by Amio. |
type |
string | yes | Type specifies the notification to be sent and can have following values: - messages_read - Notifies that all received messages from contact are read.- typing_on - Notifies that the typing indicator should be shown.- typing_off - Notifies that the typing indicator should be hidden.- custom - Any arbitrary notification to be sent. This notification type can contain any arbitrary data sent in payload. |
payload |
object | Payload is used for custom notification type and can contain any arbitrary data. |
Example request
{ "channel": { "id": "6456078759331248741" }, "contact": { "id": "6456078781510715474" }, "type": "custom", "payload": { "any": "arbitrary data" }}Response 200
{ "channel": { "id": "6456078759331248741", }, "contact": { "id": "6456078781510715474", }, "type": "custom", "payload": { "any": "arbitrary data" }}Facebook Messenger: Overview
Section titled “Facebook Messenger: Overview”Notifications resource is used for sending various events like messages read or typing to the contact. If you’re looking for events received from the contact, see the Webhooks documentation.
Facebook Messenger: Send Notification
Section titled “Facebook Messenger: Send Notification”
POST https://api.amio.io/v1/notifications
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
channel |
object | ||
channel.id |
string | yes | Id of the channel you wish to send the notification to. You can get channel id in administration. |
contact |
object | ||
contact.id |
string | yes | Id of the contact. Id is unique across channels and is generated by Amio. |
type |
string | yes | Type specifies the notification to be sent and can have following values: - messages_read - shows that all received messages from contact are read - typing_on - shows the typing indicator - typing_off - hides the typing indicator - if you don’t switch off the typing indicator, it is switched off automatically (typically in 20 seconds). |
Example request
{ "channel": { "id": "6456078759331238786" }, "contact": { "id": "6456078781510718339" }, "type": "typing_on"}Response 200
{ "channel": { "id": "6456078759331238786", }, "contact": { "id": "6456078781510718339", }, "type": "typing_on"}