Send a file to a UserChat

Send a file to a particular UserChat

Parameter

Accessible via URL https://api.channel.io/open/v3/user-chats/{userChatId}/messages/file and HTTP POST

📘

Present botName parameter in query string, userChatId parameter in URL Path, other parameters in the form.

Parameter

Example

Required

Description

Parameter type

botName

channelBot

Required

Name of the bot sending the message

Query

userChatId

5e65fa8bc2409f0c1fd3

Required

ID of UserChat

Path

name

nameOfFile.pdf

Optional

Name of the file

FormData

file

Optional

a file to be sent

FormData

Example

POST https://api.channel.io/open/v3/user-chats/12345/messages/file?botName=channelBot

Your POST body should look like below

{
    "message": "Your message",
    "botOption": {
        "actAsManager": false,
        "silentToManager": false
    }
}

Response

Return a newly created message object