Upload Task File

Upload and attach a file to a specific task using a multipart form request.

Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/tasks/<task_id>/files/" \
    -u <token>: \
    -X POST \
    -F "file=@/path/to/contract.pdf"
Request Parameters:

file: Required. The file to upload. Must be sent as a multipart form field.

Example Success Response:
{
    "id": 1
}
Base Request:

Method: POST

Authentication: Basic Authentication. Requires a valid <token> passed.

Rate Limits:

5 requests within 10 seconds

Error Responses:
400 Bad Request

This error occurs if no file is included in the request.
Possible errors: "No file provided"

401 Unauthorized

This error occurs when the <token> is missing, invalid, or the API access is disabled.

Possible errors: "not authenticated" or "token is disabled" or "Agency API is disabled"

404 Not Found

This error occurs if the task with the specified ID does not exist.
Possible errors: "object does not exist"

405 Method Not Allowed

This error occurs if an HTTP method other than POST is used.
Possible errors: "wrong method"

429 Too Many Requests

This error occurs when the client has sent too many requests in a given amount of time, leading to rate limiting by the server.

Possible errors: "too many requests"

500 Server Error

Possible errors: "Internal server error"