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

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:

Name

Description

Name

Description

cursor

Object of type Cursor

collection

Array of objects of type Channel Channel

 

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.

 

PUT https://api.smartsender.com/v1/channels/{channelId}

 

Main parameters:

Name

Description

Validation

Name

Description

Validation

state

Activity status

Boolean

 

In case of a successful response, you will receive the following:

 

{ "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.

 

POST https://api.smartsender.com/v1/channels/{channelId}/gates

 

URL parameters:

Name

Description

Validation

Name

Description

Validation

channelId

Channel identifier

Mandatory, number.

List of supported channels:

  • WhatsApp Messenger

  • Viber Messenger (soon)

Main parameters:

Name

Description

Validation

Name

Description

Validation

identifier

Channel identifier in the messenger.

Required, string.

  • Client phone number in international format using “+“ if WhatsApp Messenger.

firstName

Client name

Required, string

maximum length 255 characters

lastName

Client's last name

Optional, string

maximum length 255 characters

email

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.