Skip to content

Upload a support attachment

POST /api/v2/support/attachments

Uploads one file for a support ticket as multipart/form-data. Send the file in the file part. The file can be at most 50 MB. Allowed types are JPEG, PNG, GIF and WebP images, PDF, ZIP, gzip, Word, Excel and PowerPoint files (DOCX, XLSX, PPTX) and plain text files such as .txt, .log, .csv, .json and .conf. The file name’s extension must match the content. Programs and other file types return 400 invalid_request.

Ticket create and reply take no attachment field. To attach the file, put the returned url in the message of POST /api/v2/support/tickets or POST /api/v2/support/tickets/{id}/messages, for example as a Markdown link. The client area does the same.

attachmentId is an upload ID (satt_…). It is not the ticket attachment ID (tatt_…) that ticket details show.

Authentication: An API key with the scope write:support. About keys and scopes

Example

POST /api/v2/support/attachments
curl -X POST "https://cloud.hostup.se/api/v2/support/attachments" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json"

Responses

201 The uploaded file.

Response 201
{
"attachmentId": "satt_01hxa3b4c5d6e7f8g9h0j1k2m3",
"url": "https://files.example.com/support/satt_01hxa3b4c5d6e7f8g9h0j1k2m3/error-log.txt",
"filename": "error-log.txt",
"byteLength": 18342,
"contentType": "text/plain",
"uploadedAt": "2026-04-27T12:00:00.000Z",
"ticketId": "tkt_01hxa3b4c5d6e7f8g9h0j1k2m3"
}
Response fields
attachmentIdstring
Upload ID (satt_…).
urlstring
Address of the uploaded file. Put it in the ticket message to attach the file.
filenamestring
File name after unsafe characters were removed.
byteLengthnumber
File size in bytes.
contentTypestring
File type found when the file was checked.
uploadedAtstring
When the file was uploaded.
ticketIdstring or null
The ticket ID sent in ticketId, or null when none was sent.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400code is invalid_request. The body is not multipart/form-data, file is missing, the file is larger than 50 MB, its type is not allowed or its extension does not match its content.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404code is ticket_not_found. The ticketId does not exist or is not yours.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.