Aozo Chat API
Spaces, direct messages, calls and meeting scheduling — the REST surface behind chat.aozo.in.
⚠️ Chat authenticates differently from the rest of the suite
There's no aozo_ API key here. Calling /ajax/sso-login with a Central Auth JWT exchanges it for a signed session cookie, which is what every request below actually runs on. Every workspace-scoped route also requires active membership in :orgId, checked separately from login.
📡 Real-time is polling, not sockets
Aozo Chat doesn't use Socket.io or WebSockets. New messages, typing indicators and unread counts are all driven by client-side AJAX polling. Video/voice meetings are backed by an embedded Jitsi widget — the API only stores meeting metadata, not media.
Getting a session
| Method | Path | Description |
|---|---|---|
| POST | /ajax/sso-login | Exchange a Central Auth JWT for a local session cookie |
| POST | /ajax/sync-orgs | Refresh your orgs & per-org product registration from Central Auth |
| POST | /ajax/create-workspace | Create a new org (name) |
| POST | /ajax/switch-org | Verify membership, return the redirect target |
Spaces
Channels — the main unit of group conversation.
| Method | Path | Description |
|---|---|---|
| GET | /spaces | List spaces you've joined, with last message |
| GET | /all-spaces | List every space in the org |
| POST | /spaces | Create a space (name, description) |
| POST | /spaces/:id/join | Join a space |
| GET | /spaces/:id/members | List members of a space |
| POST | /spaces/:id/members | Add members (userIds[]) |
| DELETE | /spaces/:id/members/:userId | Remove a member |
| GET | /spaces/:id/messages | Paginated messages (?limit=&before=) — marks read as a side effect |
| GET | /spaces/:id/pinned | Pinned messages in a space |
Direct messages
| Method | Path | Description |
|---|---|---|
| GET | /dms | List your DM threads |
| POST | /dms | Get-or-create a DM thread (otherUserId) |
| GET | /dms/:id/messages | Messages in a thread |
| GET | /dms/:id/pinned | Pinned messages in a thread |
Messages
| Method | Path | Description |
|---|---|---|
| POST | /send | Send a message to a space or DM |
| PUT | /messages/:id | Edit your own message (within 30 minutes) |
| POST | /messages/:id/pin | Pin a message |
| POST | /messages/:id/react | Toggle an emoji reaction |
| GET | /mentions | Autocomplete for @mentions (?spaceId=&q=) |
| POST | /upload | Upload a file (25MB limit) |
curl -X POST https://chat.aozo.in/org/YOUR_ORG_ID/ajax/send \
--cookie "session=YOUR_SESSION_COOKIE" \
-H "Content-Type: application/json" \
-d '{
"spaceId": "space_42",
"content": "Invoice for Acme Retail just went out 🎉"
}'
Calls & meetings
| Method | Path | Description |
|---|---|---|
| POST | /calls | Place a 1:1 call (calleeId) |
| GET | /calls/active | Current ringing/active call state |
| POST | /calls/:id/accept | Accept a call |
| POST | /calls/:id/decline | Decline a call |
| GET | /meetings | List scheduled meetings |
| POST | /meetings | Schedule a meeting (title, scheduledAt, durationMins, participantIds[]) |
| DELETE | /meetings/:id | Cancel a meeting |
Members & org
| Method | Path | Description |
|---|---|---|
| GET | /users | Active members of the org |
| POST | /org/members | Invite a member by email — ADMIN only |
| GET | /unread-counts | Per-room unread counts |