nexlink/docs/api/message.md
2026-01-11 07:43:01 -05:00

1.2 KiB

GET /api/v1/message/{id}

Requires an authorization header

Returns a message with id = {id}

Response:

{
    "id": "string",
    "text": "string",
    "editHistory": "string[]",
    "edited": "boolean",
    "userId": "string",
    "channelId": "string",
    "creationDate": "number"
}

POST /api/v1/message

Requires an authorization header

Request:

{
    "text": "string",
    "channelId": "string"
}

Creates a new message and returns it

Response:

{
    "id": "string",
    "text": "string",
    "editHistory": "string[]",
    "edited": "boolean",
    "userId": "string",
    "channelId": "string",
    "creationDate": "number"
}

PATCH /api/v1/message/{id}

Requires an authorization header

Request:

{
    "text": "string"
}

Updates a message with id = {id}

Response:

{
    "id": "string",
    "text": "string",
    "editHistory": "string[]",
    "edited": "boolean",
    "userId": "string",
    "channelId": "string",
    "creationDate": "number"
}

DELETE /api/v1/message/{id}

Requires an authorization header

Removes a message with id = {id}

Response:

{
    "id": "string",
    "userId": "string",
    "channelId": "string"
}