Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Using this API, you can get a list of created chats, get information about a chat, mark it as “read” or “close”.

You can also receive messages from a conversation or send a message.

 

Reading.

Allows you to view existing chats.

 

GET https://api.smartsender.com/v1/chats

 

Main parameters:

Name

Description

Validation

page

Requested Page

Minimum value 1

limitation

Amount of data to display per page

Minimum value 1, maximum 20

 

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

 

{
    "cursor": Cursor,
    "collection": Chats[]
}

 

Main parameters:

Name

Description

cursor

Object of type Cursor

collection

Array of type objects Chat

 

Getting by ID.

Allows you to get information about the specified chat.

GET https://api.smartsender.com/v1/chats/{chatId}

 

In case of a successful response, get an object of type Chat.

 

Read the selected chat.

Allows you to read all notifications in the selected chat.

 

PUT https://api.smartsender.com/v1/chats/{chatId}/read

 

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

 

{
    "state": true
}

 

Close the selected chat.

Allows you to close the selected chat.

PUT https://api.smartsender.com/v1/chats/{chatId}/close

 

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

 

{
    "state": true
}

 

Assign a chat.

Allows you to assign the selected chat to a specific operator.

 

POST https://api.smartsender.com/v1/chats/{chatId}/forward/{operatorId}

 

Main parameters:

Name

Description

text

Informative text - description of the destination

 

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

 

{
    "state": true
}

 

Get the messages of the selected chat.

Allows you to receive messages in the selected chat

 

GET https://api.smartsender.com/v1/chats/{chatId}/messages

 

Main parameters:

Name

Description

Validation

page

Requested Page

Minimum value 1

limitation

Amount of data to display per page

Minimum value 1, maximum 20

 

……

  • No labels