Upload a file
POST/api/v4/files
Uploads a file that can later be attached to a post.
This request can either be a multipart/form-data request with a channel_id, files and optional client_ids defined in the FormData, or it can be a request with the channel_id and filename defined as query parameters with the contents of a single file in the body of the request.
Only multipart/form-data requests are supported by server versions up to and including 4.7. Server versions 4.8 and higher support both types of requests.
Minimum server version: 9.4 Starting with server version 9.4 when uploading a file for a channel bookmark, the bookmark=true query parameter should be included in the query string
Permissions
Must have upload_file permission.
Request
Responses
- 201
- 400
- 401
- 403
- 413
- 501
Corresponding lists of the provided client_ids and the metadata that has been stored in the database for each one
Invalid or missing parameters in URL or request body
No access token provided
Do not have appropriate permissions
Content too large
Feature is disabled