Skip to content

Channels

Run in Postman

Channel represents a medium through which you can send and receive messages. There are different channel types (facebook_messenger, viber, etc.).

Channel Mode controls how messages sent through the channel are processed. Available Modes vary across platforms. Please refer to platform specific documentation for more details about supported Modes.

The default Mode for all platforms is production.

Mode Supported Platforms Description
Production All Send Message requests will be accepted and forwarded to the platform.
Test Mobile, RCS Business Messages, Viber Business Messages Send Message requests will be accepted but won’t be processed any further. This allows for testing without having to worry about cost of the test messages.
Amio Viber Business Messages Send Message requests will be sent using common Amio Sender ID. Messages sent are not charged but number of messages sent is limited.
Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat,
email, facebook_messenger, mobile, rbm, telegram, viber, viber_business_messages, whatsapp.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

GET https://api.amio.io/v1/channels

Response 200

[
{
"id": "6456078759331238786",
"type": "{{CHANNEL_TYPE}}",
"name": "Some Name",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "6OUlfYyRZ393ZEoSncNAZfoCN0WveK",
"ssl_verification": true
}
}
]
Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat,
email, facebook_messenger, mobile, rbm, telegram, viber, viber_business_messages, whatsapp.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

GET https://api.amio.io/v1/channels/{channel_id}

Parameters

Name In Type Required Description
channel_id path string yes Id of the channel.

Response 200

{
"id": "6456078759331238786",
"type": "{{CHANNEL_TYPE}}",
"name": "Some Name",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "6OUlfYyRZ393ZEoSncNAZfoCN0WveK",
"ssl_verification": true
}
}
Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat,
email, facebook_messenger, mobile, rbm, telegram, viber, viber_business_messages, whatsapp.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

POST https://api.amio.io/v1/channels

Request body

Parameter Type Required Description
type string yes Channel type specifying the underlying platform: amio_chat, email, facebook_messenger, mobile, rbm, telegram, viber, viber_business_messages, whatsapp.
name string Name of the channel. If not set, it will be automatically filled with an account name of underlying platform.
mode string Mode of the channel. Allowed values depends on the channel type.
webhook object
webhook.url string Webhook url where all channel events would be sent to.
webhook.secret string Secret token for securing received webhook calls. See Webhook Security for more details.
The minimum length is 20 characters.
If not provided, the token will be generated.

Example request

{
"type": "{{CHANNEL_TYPE}}",
"name": "Some Name",
"mode": "production",
"webhook": {
"url": "https://my-project.com/webhooks",
"secret": "TsEW3ZmFKmpe2WltNfVmqtQie24"
}
}

Response 201

{
"id": "6456078759331238786",
"type": "{{CHANNEL_TYPE}}",
"name": "Some Name",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "TsEW3ZmFKmpe2WltNfVmqtQie24",
"ssl_verification": true
}
}

📘 Remove webhook

Set webhook attribute to null if you’d like to remove channel webhook.

Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat,
email,facebook_messenger, mobile, rbm, telegram, viber, viber_business_messages, whatsapp.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

PATCH https://api.amio.io/v1/channels/{channel_id}

Parameters

Name In Type Required Description
channel_id path string yes Id of the channel.

Request body

Parameter Type Required Description
name string Name of the channel.
mode string Mode of the channel. Allowed values depends on the channel type.
webhook object
webhook.url string Webhook url where all channel events would be sent to.
webhook.secret string Secret token for securing received webhook calls. See Webhook Security for more details.
The minimum length is 20 characters.

Example request

{
"name": "Some Name",
"mode": "production",
"webhook": {
"url": "https://my-project.com/webhooks",
"secret": "0jOPqX32hDS5AGKOcGRH"
}
}

Response 200

{
"id": "6456078759331238786",
"type": "{{CHANNEL_TYPE}}",
"name": "Some Name",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "0jOPqX32hDS5AGKOcGRH",
"ssl_verification": true
}
}

DELETE https://api.amio.io/v1/channels/{channel_id}

Parameters

Name In Type Required Description
channel_id path string yes Id of the channel to be deleted.

Response 204

Select a channel to see its specifics.

See Amio Documentation for getting started manuals and complete description of Amio Chat.

Amio Chat brings you the ability to easily create your own web chat. This API documentation describes how to manage Amio Chat channels and send messages to users. For information on how to connect your webpage with Amio Chat, see our Amio Chat guide.

Channel represents a medium through which you can send and receive messages.

Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

GET https://api.amio.io/v1/channels

Response 200

[
{
"id": "6456078996108099701",
"type": "amio_chat",
"name": "Amio Chat",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "6OUlfYyRZ393ZEoSncNAZfoCN0WveK",
"ssl_verification": true
}
}
]
Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

GET https://api.amio.io/v1/channels/{channel_id}

Response 200

{
"id": "6456078996108099701",
"type": "amio_chat",
"name": "Amio Chat",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "6OUlfYyRZ393ZEoSncNAZfoCN0WveK",
"ssl_verification": true
}
}
Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

POST https://api.amio.io/v1/channels

Request body

Parameter Type Required Description
type string yes Channel type, amio_chat.
name string Name of the channel. If not set, it will generate one.
mode string Mode of the channel. Only production mode is allowed.
webhook object
webhook.url string Webhook url where all channel events would be sent to.
webhook.secret string Secret token for securing received webhook calls. See Webhook Security for more details.
The minimum length is 20 characters.
If not provided, the token will be generated.

Example request

{
"type": "amio_chat",
"name": "Amio Chat",
"mode": "production",
"webhook": {
"url": "https://my-project.com/webhooks",
"secret": "TsEW3ZmFKmpe2WltNfVmqtQie24"
}
}

Response 201

{
"id": "6456078996108099701",
"type": "amio_chat",
"name": "Amio Chat",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "TsEW3ZmFKmpe2WltNfVmqtQie24",
"ssl_verification": true
}
}

📘 Remove webhook

Set webhook attribute to null if you’d like to remove channel webhook.

Parameter Type Description
id string Id of the channel.
type string Channel type specifying the underlying platform: amio_chat.
name string Name of the channel.
mode string Mode of the channel.
webhook object Webhook object specifies the entry point to which all events are delivered. It is null if there is no webhook set. See Webhooks for more details.
webhook.id string Id of the webhook.
webhook.url string Webhook url.
webhook.secret string Secret token for securing received webhook calls, see Webhook Security for more details.
webhook.ssl_verification string Specifies whether to verify SSL certificates or not. Setting this option to false is not recommended.

PATCH https://api.amio.io/v1/channels/{channel_id}

Parameters

Name In Type Required Description
channel_id path string yes Id of the channel.

Request body

Parameter Type Required Description
name string Name of the channel. Can be an arbitrary name.
mode string Mode of the channel. Only production mode is allowed.
webhook object
webhook.url string Webhook url where all channel events would be sent to.
webhook.secret string Secret token for securing received webhook calls. See Webhook Security for more details.
The minimum length is 20 characters.

Example request

{
"name": "Amio",
"mode": "production",
"webhook": {
"url": "https://my-project.com/webhooks",
"secret": "6OUlfYyRZ393ZEoSncNAZfoCN0WveK"
}
}

Response 200

{
"id": "6456078759331248741",
"type": "amio_chat",
"name": "Amio",
"mode": "production",
"webhook": {
"id": "6456079006639985542",
"url": "https://my-project.com/webhooks",
"secret": "6OUlfYyRZ393ZEoSncNAZfoCN0WveK",
"ssl_verification": true
}
}

Same as Delete Channel.