Upload Client File
Upload a new file to a specific client's directory.
This endpoint uploads a new file to a specific client's directory. The file can optionally be placed within a specified folder.
Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/files/" \
-u <token>: \
-X POST \
-F file=@/tmp/image.jpg \
-F folder=2
Request Parameters:
file: The file to be uploaded. This is a required field.
folder: The ID of the folder where the file should be placed. This is an optional field. If not provided, the file will be uploaded to the root directory.
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 the file is not provided or if the folder ID is not valid. |
| 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 client or the specified folder does not exist. |
| 405 | Method Not Allowed |
This error occurs if an HTTP method other than POST is used (e.g., GET or PUT). |
| 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" |