PLEXICHATNarrative Docs

Channels

Guides, route-group overviews, and live schema entry points for the Plexichat backend.

REST http://api.plexichat.com/api/v1Gateway ws://api.plexichat.com/gatewayVersion a.1.0-49

Channels API

Endpoints for channel management.

Base URL: https://api.plexichat.com

GET /channels/{channel_id}

Get channel details. Requires access to the channel.

Example Request


curl -X GET https://api.plexichat.com/channels/123456789012345678 \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN"

Response (200 OK)


{
  "id": "123456789012345678",
  "server_id": "123456789012345678",
  "name": "general",
  "channel_type": "text",
  "topic": "General discussion",
  "position": 0,
  "category_id": null,
  "nsfw": false,
  "slowmode_seconds": 0,
  "created_at": 1704067200
}

Error Responses

StatusCodeDescription
400Invalid channel IDID format invalid
403Access deniedNo permission to view
404Channel not foundChannel doesn't exist

PATCH /channels/{channel_id}

Update channel settings. Requires manage channels permission.

Request Body

FieldTypeRequiredConstraintsDescription
namestringNo1-100 charactersChannel name
topicstringNoMax 1024 charactersChannel topic
positionintNo>= 0Channel position
nsfwboolNo-NSFW flag
slowmode_secondsintNo0-21600Slowmode delay in seconds

Example Request


curl -X PATCH https://api.plexichat.com/channels/123456789012345678 \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "updated-channel",
    "topic": "New topic",
    "slowmode_seconds": 5
  }'

Response (200 OK)

Returns the updated channel object.

Error Responses

StatusCodeDescription
403Permission deniedMissing manage channels permission
404Channel not foundChannel doesn't exist

DELETE /channels/{channel_id}

Delete a channel. Requires manage channels permission.

Headers


Authorization: Bearer <token>

Response (200 OK)


{
  "success": true
}

Error Responses

StatusCodeDescription
403Permission deniedMissing manage channels permission
404Channel not foundChannel doesn't exist

---

Webhooks

GET /channels/{channel_id}/webhooks

Get all webhooks for a channel. Requires manage webhooks permission.

Headers


Authorization: Bearer <token>

Response (200 OK)


[
  {
    "id": "123456789012345678",
    "channel_id": "123456789012345678",
    "server_id": "234567890123456789",
    "creator_id": "345678901234567890",
    "name": "My Webhook",
    "avatar_url": "https://cdn.example.com/avatars/webhook.png",
    "created_at": 1704067200
  }
]

Error Responses

StatusCodeDescription
403Permission deniedMissing manage webhooks permission
404Channel not foundChannel doesn't exist

---

Invites

POST /channels/{channel_id}/invites

Create an invite for a channel. Requires create invite permission.

Request Body

FieldTypeRequiredDefaultDescription
max_ageintNo86400Invite expiration in seconds (0 = never)
max_usesintNo0Max uses (0 = unlimited)
temporaryboolNofalseGrant temporary membership

Example Request


curl -X POST https://api.plexichat.com/channels/123456789012345678/invites \
  -H "Authorization: Bearer YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "max_age": 3600,
    "max_uses": 10
  }'

Response (200 OK)


{
  "code": "abc123",
  "channel_id": "123456789012345678",
  "server_id": "234567890123456789",
  "max_age": 3600,
  "max_uses": 10,
  "temporary": false,
  "uses": 0,
  "created_at": 1704067200
}

Error Responses

StatusCodeDescription
403Permission deniedMissing create invite permission
404Channel not foundChannel doesn't exist

GET /channels/invites/{invite_code}

Get invite information without joining.

Headers


Authorization: Bearer <token>

Response (200 OK)


{
  "code": "abc123",
  "server_id": "123456789012345678",
  "server_name": "My Server",
  "channel_id": "234567890123456789",
  "inviter_id": "345678901234567890",
  "uses": 5,
  "max_uses": 100,
  "expires_at": 1704153600
}

Error Responses

StatusCodeDescription
404Invite not foundInvite doesn't exist or expired

POST /channels/invites/{invite_code}

Join a server via invite code.

Headers


Authorization: Bearer <token>

Response (200 OK)


{
  "success": true,
  "server_id": "123456789012345678"
}

Error Responses

StatusCodeDescription
403BannedYou are banned from this server
404Invite not foundInvite doesn't exist or expired
409Already memberAlready a member of this server

DELETE /channels/invites/{invite_code}

Delete an invite. Requires manage server permission.

Headers


Authorization: Bearer <token>

Response (200 OK)


{
  "success": true
}

---

Attachments

POST /channels/{channel_id}/attachments

Upload a file attachment to a channel.

Headers


Authorization: Bearer <token>
Content-Type: multipart/form-data

Request Body

FieldTypeRequiredDescription
filefileYesFile to upload

Response (200 OK)


{
  "id": "abc123def456",
  "filename": "image.png",
  "size": 12345,
  "content_type": "image/png",
  "url": "/api/v1/media/attachments/abc123def456"
}

File Size Limits

File size limits are based on user tier:

TierMax Size
Standard10 MB
Alpha25 MB
Premium100 MB

Error Responses

StatusCodeDescription
400File too largeExceeds tier limit
404Channel not foundChannel doesn't exist

---

Channel Object


{
  "id": "123456789012345678",
  "server_id": "123456789012345678",
  "name": "general",
  "channel_type": "text",
  "topic": "General discussion",
  "position": 0,
  "category_id": null,
  "nsfw": false,
  "slowmode_seconds": 0,
  "created_at": 1704067200
}
FieldTypeDescription
idstringChannel's snowflake ID
server_idstringParent server's ID
namestringChannel name
channel_typestringChannel type (text, voice, category)
topicstring?Channel topic/description
positionintDisplay position
category_idstring?Parent category ID
nsfwboolNSFW content flag
slowmode_secondsintSlowmode delay (0 = disabled)
created_atintUnix timestamp of creation

Channel Types

TypeDescription
textText channel for messages
voiceVoice channel for audio communication
categoryCategory for organizing channels

Slowmode

Slowmode limits how often users can send messages in a channel.

ValueDescription
0Disabled
1-21600Seconds between messages

Maximum slowmode: 6 hours (21600 seconds)

---

Related Endpoints