Upload File to a Room
Post a message with the attached file to a dedicated room.
HTTP Method | URL | Requires Auth |
---|---|---|
|
|
Path Variables
Key | Example Value | Description |
---|---|---|
|
| The room ID to which you want to upload the file. |
Body Parameters
Key | Example Value | Description |
---|---|---|
|
| A file name to upload. |
|
| A message text. |
|
| A description of the file. |
|
| The thread message id (if you want upload a file to a thread). |
Example Call
For some file types, when uploading via curl, you may need to set the mime type.
With some file types, curl will upload the file as application/octet-stream
. You can pass a custom mime type like this: -F "file=@file.wav;type=audio/wav"
to specify the type.
Example Response
Success
Error
Any of the following errors can occur:
Authorization: Requires an authentication token for the request to be made.
Invalid Field: Occurs when the file parameter is invalid.
Unknow Key: Occurs when any extra payload is sent in the request.
Change Log
Version | Description |
---|---|
1.0.0 | Return Message object on file upload |
0.62.0 | Added |
Last updated