Channels API - en
Allows you to view, find and update channels within Smart Messenger (Connected Communication Channels).
Reading.
Allows you to view the connected channels in the project.
GET https://api.smartsender.com/v1/channels
Main parameters:
Name | Description | Validation |
---|---|---|
limitation | Amount of data to display per page | Minimum value 1, maximum 20 |
page | Requested Page | Minimum value 1 |
In case of a successful response, you will receive the following:
{
"cursor": Cursor,
"collection": Channel[]
}
Answer description:
Getting by ID.
Allows you to view the connected channel in the project by ID.
GET https://api.smartsender.com/v1/channels/{channelId}
If the response is successful, get an object of type Channel.
Update.
Allows you to change the activity of the selected channel.
Main parameters:
Name | Description | Validation |
---|---|---|
state | Activity status | Boolean |
In case of a successful response, you will receive the following:
Creating a gateway.
Allows you to create a gateway for a channel. If a gateway has already been created with this ID, the already existing gateway will be returned. The contact will be created automatically.
URL parameters:
Name | Description | Validation |
---|---|---|
channelId | Channel identifier | Mandatory, number. List of supported channels:
|
Main parameters:
Name | Description | Validation |
---|---|---|
identifier | Channel identifier in the messenger. | Required, string.
|
firstName | Client name | Required, string maximum length 255 characters |
lastName | Client's last name | Optional, string maximum length 255 characters |
Client email | Optional, email | |
phone | Client phone number | Optional, telephone number in international format using “+“ |
parameters | List of variables | Optional, key-value array with variables for a given contact |
If the response is successful, receive an object of type Gate.
At the moment, you can use the gateway creation via API exclusively for WhatsАpp channels and in the near future it will be available for Viber channels. For other channels, this method is not available and the corresponding error will be returned.
You need the client ID in the messenger of the selected channel so that you can write to him. For example, for Telegram Messenger this must be a Telegram ID, for WhatsApp Messenger it must be the client’s phone number in international format.