...
Code Block |
---|
GET https://api.smartsender.com/v1/channels |
Basic optionsMain 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:
...
Code Block |
---|
{ "cursor": Cursor, "collection": Channel[] } |
Answer description:
Getting by ID.
Allows you to view the connected channel in the project by ID.
...
If the response is successful, get an object of type Channel.
Update.
Allows you to change the activity of the selected channel.
...
Code Block |
---|
PUT https://api.smartsender.com/v1/channels/{channelId} |
Basic optionsMain parameters:
Name | Description | Validation |
---|---|---|
state | Activity status | Boolean |
In case of a successful response, you will receive the following:
...
Code Block |
---|
{
"state": true
}
|
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.
Code Block |
---|
POST https://api.smartsender.com/v1/channels/{channelId}/gates |
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.
Info |
---|
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. |
Note |
---|
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. |