Skip to main content
Authenticated API

This endpoint requires a valid JWT Bearer token. Accessible via the API gateway.

Chat & Messaging API

Real-time messaging system for team communication with channels, threads, and presence.

Overview

AttributeValue
Base Path/api/v1/chat
AuthenticationBearer Token
Required Rolespos_staff, server, restaurant_staff, kitchen, host, bartender, cashier, drive_thru_staff, manager, restaurant_manager, tenant_admin, platform_admin, system_admin, super_admin
Real-timeWebSocket at wss://api.olympuscloud.ai/ws/chat

Channel Endpoints

List Channels

Retrieve channels the user has access to.

GET /api/v1/chat/channels

Query Parameters

ParameterTypeDescription
typestringpublic, private, dm, incident
location_iduuidFilter by location
archivedbooleanInclude archived channels

Response

{
"data": [
{
"id": "ch_general",
"name": "general",
"display_name": "General",
"type": "public",
"description": "General team discussion",
"member_count": 45,
"unread_count": 3,
"last_message_at": "2026-01-24T18:30:00Z",
"is_muted": false
},
{
"id": "ch_kitchen",
"name": "kitchen",
"display_name": "Kitchen Team",
"type": "private",
"member_count": 12,
"unread_count": 0
}
]
}

Channel Types

TypeDescription
publicOpen to all workspace members
privateInvite-only channel
dmDirect message (2 people)
group_dmGroup direct message
incidentAuto-created for incidents
supportCustomer support thread

Create Channel

Create a new channel.

POST /api/v1/chat/channels

Request Body

{
"name": "morning-shift",
"display_name": "Morning Shift",
"type": "private",
"description": "Coordination for morning shift team",
"location_id": "loc_123",
"member_ids": ["user_001", "user_002", "user_003"]
}

Get Channel

Retrieve channel details.

GET /api/v1/chat/channels/{channel_id}

Response

{
"id": "ch_kitchen",
"name": "kitchen",
"display_name": "Kitchen Team",
"type": "private",
"description": "Back of house communication",
"created_by": "user_abc",
"created_at": "2025-06-01T00:00:00Z",
"member_count": 12,
"members": [
{"id": "user_001", "name": "Chef Mike", "role": "admin"},
{"id": "user_002", "name": "Sous Chef Ana", "role": "member"}
],
"settings": {
"who_can_post": "all_members",
"message_retention_days": 365
}
}

Message Endpoints

List Messages

Retrieve messages from a channel.

GET /api/v1/chat/channels/{channel_id}/messages

Query Parameters

ParameterTypeDescription
beforestringMessage ID for pagination
afterstringMessages after this ID
limitintegerResults per page (max 100)
thread_idstringGet thread replies only

Response

{
"data": [
{
"id": "msg_001",
"channel_id": "ch_kitchen",
"user": {
"id": "user_001",
"name": "Chef Mike",
"avatar_url": "https://..."
},
"content": "Prep list for today is posted on the board",
"type": "text",
"thread_id": null,
"reply_count": 2,
"reactions": [
{"emoji": "👍", "count": 3}
],
"attachments": [],
"created_at": "2026-01-24T08:00:00Z",
"edited_at": null
}
],
"has_more": true
}

Send Message

Post a message to a channel.

POST /api/v1/chat/channels/{channel_id}/messages

Request Body

{
"content": "86'd the salmon - we're out until tomorrow",
"thread_id": null,
"attachments": [],
"mentions": ["user_002", "user_003"]
}

Message Types

TypeDescription
textPlain text message
imageImage attachment
fileFile attachment
voiceVoice message
systemSystem notification

Reply to Thread

Reply to an existing message thread.

POST /api/v1/chat/channels/{channel_id}/messages

Request Body

{
"content": "Got it, updating the menu board now",
"thread_id": "msg_001"
}

Edit Message

Edit a message you sent.

PUT /api/v1/chat/channels/{channel_id}/messages/{message_id}

Request Body

{
"content": "86'd the salmon and halibut - both out until tomorrow"
}

Delete Message

Delete a message.

DELETE /api/v1/chat/channels/{channel_id}/messages/{message_id}

Add Reaction

React to a message.

POST /api/v1/chat/channels/{channel_id}/messages/{message_id}/reactions

Request Body

{
"emoji": "👍"
}

Presence

Get Presence

Get online status of users.

GET /api/v1/chat/presence

Query Parameters

ParameterTypeDescription
user_idsstring[]Specific users to check
channel_idstringGet presence for channel members

Response

{
"data": [
{
"user_id": "user_001",
"status": "online",
"last_seen": null,
"status_text": "In kitchen",
"status_emoji": "👨‍🍳"
},
{
"user_id": "user_002",
"status": "away",
"last_seen": "2026-01-24T17:45:00Z"
}
]
}

Status Values

StatusDescription
onlineCurrently active
awayIdle/away
dndDo not disturb
offlineNot connected

Update Presence

Set your status.

PUT /api/v1/chat/presence

Request Body

{
"status": "dnd",
"status_text": "On break",
"status_emoji": "☕",
"clear_after_minutes": 30
}

Direct Messages

Create DM

Start a direct message conversation.

POST /api/v1/chat/dm

Request Body

{
"user_id": "user_002"
}

Response

{
"channel_id": "dm_user001_user002",
"type": "dm",
"user": {
"id": "user_002",
"name": "Sous Chef Ana"
}
}

Read Receipts

Mark as Read

Mark messages as read.

POST /api/v1/chat/channels/{channel_id}/read

Request Body

{
"last_read_message_id": "msg_005"
}

Search Messages

Search across messages.

GET /api/v1/chat/search

Query Parameters

ParameterTypeDescription
qstringSearch query
channel_idstringLimit to channel
from_user_idstringFilter by sender
afterdatetimeAfter this date
beforedatetimeBefore this date

Response

{
"data": [
{
"message": {
"id": "msg_001",
"content": "86'd the salmon...",
"channel_id": "ch_kitchen"
},
"highlights": ["86'd the <em>salmon</em>"]
}
],
"total": 15
}

WebSocket Events

Connect to wss://api.olympuscloud.ai/ws/chat for real-time events.

Events Received

EventDescription
message.newNew message in subscribed channel
message.editedMessage was edited
message.deletedMessage was deleted
reaction.addedReaction added to message
presence.updatedUser presence changed
typing.startUser started typing
typing.stopUser stopped typing
channel.updatedChannel settings changed

Error Responses

StatusCodeDescription
400message_too_longMessage exceeds 4000 chars
403not_channel_memberNot a member of channel
403cannot_editCannot edit others' messages
404channel_not_foundChannel does not exist
429rate_limitedToo many messages