Attach File (Multipart Upload)
Uploads a file (multipart) and attaches it to a record.
Authentication: X-API-KEY header (see Authentication).
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Id of the object to attach the file to. |
| type | enum | Yes | Object type: CLIENT, PROJECT, DELIVERABLE, OPPORTUNITY, EXPENSE, TICKET. |
| file | file | Yes | The file part (multipart/form-data). |
Request
curl -X POST https://api.withmoxie.com/public/action/attachments/create?id=VALUE&type=VALUE&file=VALUE \
-H "X-API-KEY: your_api_key_here" \
-F "file=@/path/to/file.pdf"
Response
Returns the stored file reference / URL as a plain string.
"https://files.withmoxie.com/10016/clients/66b0f2a1.../contract.pdf"