nexlink/docs/api/community.md
2025-12-25 02:35:19 +01:00

2.2 KiB

GET /api/v1/community/{id}

Returns a community with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "description": "string",
    "creationDate": 0
}

UPDATE /api/v1/community/{id}/name

Requires an authentication header

Request:

{
    "name": "string"
}

Updates name for a community with id = {id}

Response:

{
    "id": "string",
    "name": "string"
}

PATCH /api/v1/community/{id}/description

Requires an authentication header

Request:

{
    "description": "string"
}

Updates description for a community with id = {id}

Response:

{
    "id": "string",
    "description": "string"
}

GET /api/v1/community/{id}/members

Requires an authentication header

Returns users for a community with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "members": [
        {
            "id": "string",
            "username": "string"
        }
    ]
}

GET /api/v1/community/{id}/channels

Requires an authentication header

Returns channels for a community with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "channels": [
        {
            "id": "string",
            "name": "string"
        }
    ]
}

GET /api/v1/community/{id}/roles

Requires an authentication header

Returns roles for a community with id = {id}

Response:

{
    "id": "string",
    "name": "string",
    "roles": [
        {
            "id": "string",
            "name": "string"
        }
    ]
}

POST /api/v1/community/{id}/invite

Requires an authentication header

Request:

{
    "userId": "string"
}

Creates an invite to a community with id = {id}

Response:

{
    "userId": "string",
    "userName": "string",
    "communityId": "string",
    "communityName": "string"
}

POST /api/v1/community/{id}/join

Requires an authentication header

Request:

{
    "userId": "string"
}

Joins a user to a community with id = {id}

Response:

{
    "userId": "string",
    "userName": "string",
    "communityId": "string",
    "communityName": "string"
}