Upload an attachment
POST/v1/attachments
Uploads an attachment. Reference the returned att_id from message
parts.
Requirements
- The request body is the raw bytes: no multipart, no JSON wrapper.
content-typedeclares the attachment’s MIME type;x-filenamedeclares its name.- Maximum 100,000,000 bytes (100 MB). Larger payloads return HTTP 413
too_large. An empty body returns HTTP 400code1017. - No
Idempotency-Key: the server neither requires nor consults one here.
Behavior
- Uploads are idempotent over your brand and the bytes: the
att_idis derived from them, so re-uploading a file you already hold returns the same id and stores nothing twice. A retry is free and needs no key. - The stored
mimeandnamestay the first upload’s, and the response reports the stored values: a later upload declaring a differentcontent-typegets the original back. To change a stored type, upload altered bytes, which are a different attachment. - Attachments are scoped to your brand. Another brand uploading the identical file gets a different id and its own copy.
Upload an attachment
curl https://messages.api.linqapp.com/v1/attachments \
-H 'Content-Type: */*' \
-H "Authorization: Bearer $LINQ_AMB_API_KEY" \
-d '{}'{
"id": "att_1a3f77",
"mime": "image/png",
"size": 20481
}Returns Examples
{
"id": "att_1a3f77",
"mime": "image/png",
"size": 20481
}