Channel Developers

thumbnail
Category

UserChat

UserChat

Get a UserChat

Get a particular UserChat object Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId} and HTTP GET This method does currently produce application/json only. Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID of UserChat Path Example GET https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3 Response Returns UserChat object along with related information. { "userChat":{ "id":"string", "channelId":"string", "cont
Get a UserChat

List of UserChats

List of UserChats in managed state. Parameter Accessible via URL https://api.channel.io/open/v5/user-chats and HTTP GET Present parameters in query string Parameter Example Required Description Parameter type state opened Required User chat state filter.Available valuesclosed,opened,snoozed(default value:opened). Query sortOrder desc Required Sorting order.Available values areasc,desc,both(default value:desc). Query since eyJjaGF0S2V5IjoiZ3Jvn0= Optional Encoded key of the first user chat to be

Get a UserChat's sessions

Retrieve a list of session of UserChat with ID. Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/sessions and HTTP GET This method does currently accept application/json only Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID of Userchat Path Example GET https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/sessions Response Returns sessions along with related information. { "sessions": [ { "key": "string"
Get a UserChat's sessions

Get a UserChat's messages

Retrieve a list of message of UserChat with ID. Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/messages and HTTP GET This method does currently accept application/json only. Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID ofUserChat Path since eyJjaGF0S2V5IjoiZ3Jvn0= Optional Encoded key of the first message to be retrieved Qeury limit 25 Optional Restrict the maximum number of messages to be retrieved Query s
Get a UserChat's messages

Send a message to a UserChat

Send a new message to a chat via bot Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/messages and HTTP POST Present message parameters in POST body. This method does currently accept application/json only. Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID of UserChat Path botName Channel-bot Optional Name of Bot Query Example POST https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/messages?botName=cha
Send a message to a UserChat

Get a file url in a UserChat

Get a signed file url via File key Get a signed file url that expires after 15 minutes Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/messages/file and HTTP GET This method does currently accept application/json only. Parameter Example Required Description Parameter Type userChatId 1234 Required Id of UserChat Path key pub-file/12345/0a1b2c3d4e5f6g7h8i9j/example.txt Required Key of File Query Example GET https://api.channel.io/open/v5/user-chats/1234/messages
Get a file url in a UserChat

Invite to a UserChat

Invite a manager to a particular UserChat Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/invite and HTTP PATCH Present parameters in query string. Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID of UserChat Path botName channelBot Required Name of the inviting bot Query managerIds 1231 Required Manager ID Query Example PATCH https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/invite?botName=channelB
Invite to a UserChat

Close a UserChat

Close a particular UserChat Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId}/close and HTTP PATCH Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID of UserChat Path botName channelBot Required Name of the removing bot Query Example PATCH https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/close Response { "userChat":{ "id":"string", "channelId":"string", "contactKey":"string", "contactOrder":16560321525
Close a UserChat

Delete a UserChat

Remove a particular UserChat and related data. Parameter Accessible via URL https://api.channel.io/open/v5/user-chats/{userChatId} and HTTP DELETE Parameter Example Required Description Parameter type userChatId 5e65fa8bc2409f0c1fd3 Required ID of UserChat Path Example DELETE https://api.channel.io/open/v5/user-chats/5e65fa8bc2409f0c1fd3/remove Response 204
Delete a UserChat