Skip to Content
LYNKORIADocs
HTTP API reference

Attachments

Upload, scan and download message attachments. Generated from the OpenAPI specification.

Upload, scan and download message attachments.

POST /v1/attachments/upload-intent

Reserve an attachment and get a 5-minute presigned PUT URL.

Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.

Request body (application/json, required)

FieldTypeRequiredNotes
conversationIdstring (uuid)Yes
fileNamestringYesmin length 1; max length 255
sizeintegerYes≥ 1
mediaTypestringYespattern ^[a-z]+\/[a-z0-9.+-]+$/i

Response 201 Created

FieldTypeRequiredNotes
attachmentobjectYes
attachment.idstring (uuid)Yes
attachment.fileNamestringYes
attachment.mediaTypestringYes
attachment.sizeintegerYes
attachment.status"pending", "ready", "rejected"Yes
attachment.scanStatus"not_scanned", "pending", "clean", "infected", "rejected", "failed"No
uploadUrlstringYes
headersmapYes
expiresAtstringYes

Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.

POST /v1/attachments/{id}/complete

Verify the uploaded object (size and type) and mark it usable.

Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Response 200 OK

FieldTypeRequiredNotes
idstring (uuid)Yes
fileNamestringYes
mediaTypestringYes
sizeintegerYes
status"pending", "ready", "rejected"Yes
scanStatus"not_scanned", "pending", "clean", "infected", "rejected", "failed"No

Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.

GET /v1/attachments/{id}/url

A 5-minute presigned download URL, after membership checks.

Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Response 200 OK

FieldTypeRequiredNotes
urlstringYes
expiresAtstringYes

Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.

On this page