Skip to Content
LYNKORIADocs
HTTP API reference

Messaging

Conversations, members, messages, reactions and read state. Generated from the OpenAPI specification.

Conversations, members, messages, reactions and read state.

GET /v1/conversations

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

Query parameters

FieldTypeRequiredNotes
limitintegerNo≥ 1; ≤ 100; default 50
cursorstringNomax length 200

Response 200 OK

FieldTypeRequiredNotes
itemsobject[]Yes
items[].idstring (uuid)Yes
items[].tenantIdstringYes
items[].type"dm", "group", "channel", "session"Yes
items[].productConversationIdstring or nullYesnullable
items[].titlestring or nullYesnullable
items[].lastSeqintegerYes
items[].lastMessageAtstring or nullYesnullable
items[].createdAtstringYes
items[].readSeqintegerNo
nextCursorstring or nullYesnullable

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/conversations

Create a conversation the product backend has authorized (idempotent on productConversationId).

Authentication: Service key with scope messaging:write (Authorization: Bearer lynk_…), from your backend only.

Request body (application/json, required)

FieldTypeRequiredNotes
tenantIdstringNopattern ^[A-Za-z0-9._@-]{1,128}$; default "default"
type"dm", "group", "channel", "session"Yes
productConversationIdstringNopattern ^[A-Za-z0-9._@-]{1,128}$
titlestringNomax length 200
memberIdsstring[]Yesat least 1 items; at most 1000 items

Response 200 Existing

FieldTypeRequiredNotes
idstring (uuid)Yes
tenantIdstringYes
type"dm", "group", "channel", "session"Yes
productConversationIdstring or nullYesnullable
titlestring or nullYesnullable
lastSeqintegerYes
lastMessageAtstring or nullYesnullable
createdAtstringYes
readSeqintegerNo

Response 201 Created

Same body as 200.

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/conversations/{id}/members

Authentication: Service key with scope messaging:write (Authorization: Bearer lynk_…), from your backend only.

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Request body (application/json, required)

FieldTypeRequiredNotes
userIdsstring[]Yesat least 1 items; at most 1000 items

Response 204 No content

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.

DELETE /v1/conversations/{id}/members/{userId}

Authentication: Service key with scope messaging:write (Authorization: Bearer lynk_…), from your backend only.

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes
userIdstringYespattern ^[A-Za-z0-9._@-]{1,128}$

Response 204 No content

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/conversations/{id}/messages

Events after after_seq (resync), or message history before before_seq.

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Query parameters

FieldTypeRequiredNotes
after_seqinteger or nullNo≥ 0
before_seqintegerNo≥ 1
limitintegerNo≥ 1; ≤ 200; default 100

Response 200 OK

FieldTypeRequiredNotes
itemsobject[]Yes
items[].conversationIdstring (uuid)Yes
items[].seqintegerYes
items[].type"message.created", "message.updated", "message.deleted", "reaction.added", "reaction.removed"Yes
items[].messageobjectYes
items[].message.idstring (uuid)Yes
items[].message.conversationIdstring (uuid)Yes
items[].message.seqintegerYes
items[].message.senderIdstringYes
items[].message.clientMessageIdstringYes
items[].message.kind"text", "system"Yes
items[].message.bodystring or nullYesnullable
items[].message.attachmentsobject[]Yes
items[].message.reactionsobject[]Yes
items[].message.parentMessageIdstring or nullYesnullable
items[].message.createdAtstringYes
items[].message.editedAtstring or nullYesnullable
items[].message.deletedAtstring or nullYesnullable
items[].reactionobject or nullYesnullable
items[].reaction.userIdstringYes
items[].reaction.emojistringYes
items[].createdAtstringYes
lastSeqintegerYes
hasMorebooleanYes

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/conversations/{id}/messages

Send a message (idempotent on clientMessageId).

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Request body (application/json, required)

FieldTypeRequiredNotes
clientMessageIdstringYespattern ^[A-Za-z0-9_-]{8,64}$
textstringNomax length 65536; default ""
attachmentIdsstring (uuid)[]Noat most 10 items; default []
parentMessageIdstring (uuid)No

Response 200 Duplicate of an earlier send

FieldTypeRequiredNotes
messageobjectYes
message.idstring (uuid)Yes
message.conversationIdstring (uuid)Yes
message.seqintegerYes
message.senderIdstringYes
message.clientMessageIdstringYes
message.kind"text", "system"Yes
message.bodystring or nullYesnullable
message.attachmentsobject[]Yes
message.attachments[].idstring (uuid)Yes
message.attachments[].fileNamestringYes
message.attachments[].mediaTypestringYes
message.attachments[].sizeintegerYes
message.attachments[].status"pending", "ready", "rejected"Yes
message.attachments[].scanStatus"not_scanned", "pending", "clean", "infected", "rejected", "failed"No
message.reactionsobject[]Yes
message.reactions[].userIdstringYes
message.reactions[].emojistringYes
message.parentMessageIdstring or nullYesnullable
message.createdAtstringYes
message.editedAtstring or nullYesnullable
message.deletedAtstring or nullYesnullable
createdbooleanYes
status"sent"Yes

Response 201 Created

Same body as 200.

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/conversations/{id}/read

Advance the read watermark.

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Request body (application/json, required)

FieldTypeRequiredNotes
seqintegerYes≥ 0

Response 200 OK

FieldTypeRequiredNotes
readSeqintegerYes

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.

PATCH /v1/messages/{id}

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Request body (application/json, required)

FieldTypeRequiredNotes
textstringYesmin length 1; max length 65536

Response 200 OK

FieldTypeRequiredNotes
idstring (uuid)Yes
conversationIdstring (uuid)Yes
seqintegerYes
senderIdstringYes
clientMessageIdstringYes
kind"text", "system"Yes
bodystring or nullYesnullable
attachmentsobject[]Yes
attachments[].idstring (uuid)Yes
attachments[].fileNamestringYes
attachments[].mediaTypestringYes
attachments[].sizeintegerYes
attachments[].status"pending", "ready", "rejected"Yes
attachments[].scanStatus"not_scanned", "pending", "clean", "infected", "rejected", "failed"No
reactionsobject[]Yes
reactions[].userIdstringYes
reactions[].emojistringYes
parentMessageIdstring or nullYesnullable
createdAtstringYes
editedAtstring or nullYesnullable
deletedAtstring or nullYesnullable

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.

DELETE /v1/messages/{id}

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Response 204 No content

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/messages/{id}/reactions

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes

Request body (application/json, required)

FieldTypeRequiredNotes
emojistringYesmin length 1; max length 32

Response 204 No content

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.

DELETE /v1/messages/{id}/reactions/{emoji}

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

Path parameters

FieldTypeRequiredNotes
idstring (uuid)Yes
emojistringYesmin length 1; max length 32

Response 204 No content

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