nexlink/docs/api/channel.md
2026-01-11 08:03:33 -05:00

1.5 KiB

GET /api/v1/channel/{id}

Requires an authorization header

Returns a channel with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "description": "string",
    "communityId": "string",
    "creationDate": "number"
}

POST /api/v1/channel

Requires an authorization header

Request:

{
    "name": "string",
    "communityId": "string"
}

Creates a new channel and returns it

Response:

{
    "id": "string",
    "name": "string",
    "description": "string",
    "communityId": "string",
    "creationDate": "number"
}

PATCH /api/v1/channel/{id}

Requires an authorization header

Request:

{
    "name": "string?",
    "description": "string?"
}

Updates a channel with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "description": "string",
    "communityId": "string",
    "creationDate": "number"
}

DELETE /api/v1/channel/{id}

Requires an authorization header

Removes a channel with id = {id}

Response:

{
    "id": "string",
    "communityId": "string"
}

GET /api/v1/channel/{id}/messages

Requires an authorization header

Returns messages for a channel with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "messages": [
        {
            "id": "string",
            "ownerId": "string",
            "text": "string",
            "edited": "boolean",
            "creationDate": "number"
        }
    ]
}