POST
/
files
curl --request POST \
  --url http://staging.api.commenda.io/api/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form companyId=3c90c3cc-0d44-4b50-8888-8dd25736052a
{
  "data": {
    "id": "<string>",
    "name": "example.pdf",
    "size": 102400
  },
  "message": "Successfully created file."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
companyId
string
required

Unique identifier for a company.

file
file
required

The file to upload. The filename is included in the multipart/form-data request.

Response

200
application/json
Information about the created file
data
object
message
string
Example:

"Successfully created file."