All available operations for managing files
This endpoint uploads a file to Cord's file storage. The file can then be used in other Cord APIs, such as as a message attachment.
Certain types of files, such as executable code, cannot be uploaded. Trying to do so will generate an error.
Files that are uploaded but never attached to a message will eventually be garbage collected.
POST https://api.cord.com/v1/files
Listed below are the fields of the request body to be added as part of the HTTP POST request.
Note: Unlike most of Cord's REST APIs, this request must be encoded as multipart/form-data
.
file
parameter.If successful, the response will be:
{
"success": true,
"message": "✅ File created.",
"fileID": "12345678-90ab-cdef-1234-567890abcdef"
}