Chat API

The Chat API lives under <code>/apis/v1/chat</code> and needs a Ration bearer token. Every response is scoped to the authenticated user’s tenant and room membership.

01

Headers

Authorization: Bearer <ration_access_token>
Accept: application/json

02

The Room model

FieldTypeDescription
idStringRoom identifier.
nameStringRoom or meeting name.
chat_typeStringpersonal, group, team or meeting.
room_typeString or nullmeeting for a meeting room, when set.
partiesArrayRoom participants, including party_id and role data.
last_messageMessage or nullMost recent message, when available.
unseen, unreadNumber, BooleanCurrent caller’s unread state.
inserted_at, updated_at, last_message_atStringTimestamps, when available.
meeting_mode, broadcast_mode, livestream_typeString or nullMeeting configuration, when applicable.
scheduled_start_at, scheduled_end_atString or nullScheduled meeting times, when applicable.

03

The Message model

FieldTypeDescription
idStringMessage identifier.
room_idStringParent room identifier.
bodyStringText body.
sending_party, nameStringSender identifier and display name.
message_typeStringMessage type; REST-created messages are text.
inserted_atStringCreation timestamp.
attachmentsArrayAttached-file metadata.
reply_toObject or nullReferenced message summary, when this is a reply.
edited, deletedBooleanMessage state.
reactionsArrayGrouped reaction data.

04

Get the current chat identity

GET /apis/v1/chat/user returns the caller’s chat-facing identity.

Response fieldTypeDescription
id, name, username, addressStringUser identifiers and display details.
image, location, mobile, alternate, dob, genderString or nullProfile details, when set.
languageStringPreferred language, when set.

05

List tenant users

GET /apis/v1/chat/users. User-directory query parameters are passed to the tenant directory lookup.

Response fieldTypeDescription
usersArrayUser objects in the same shape as GET /chat/user.
totalNumberNumber of matching users.
pageNumberCurrent page, when returned.
nextCursor, previousCursorString or nullDirectory pagination cursors.

06

List rooms

GET /apis/v1/chat/rooms

NameInTypeRequiredDescription
chat_typeQueryStringNoLimit rooms to a type, such as personal, group or meeting.
limitQueryIntegerNoPage size.
next_pointerQueryStringNoPointer from the prior response.

Response: { "results": [Room], "has_more": Boolean, "next_pointer": String | null }.

07

Create a room

POST /apis/v1/chat/rooms returns a Room.

{
  "name": "Design review",
  "chat_type": "group",
  "party_ids": ["user_123", "user_456"]
}
NameTypeRequiredDescription
nameStringNo*Room name. Required for chat_type: "meeting".
chat_typeStringNoDefaults to personal; use group, team or meeting as appropriate.
party_idsString arrayNoAdditional participant IDs. The caller is included automatically.
room_typeStringNoSet to meeting for a meeting room; inferred for chat_type: "meeting".
meeting_modeStringNoMeeting mode; defaults to instant for meetings.
broadcast_modeStringNobroadcast (default) or livestream.
livestream_typeStringNopublic (default) or private for livestream meetings.
scheduled_start_at, scheduled_end_atStringNoScheduled meeting start and end values.
meeting_reminder, reminderString or IntegerNoOptional meeting reminder.

A meeting without a name returns 422 { "error": "meeting_name_required" }. Creating a livestream without the required plan capability returns 403 { "error": "livestream_not_entitled" }.

08

Read, update or remove a room

GET|PUT|DELETE /apis/v1/chat/rooms/:id

  • GET returns a Room.
  • PUT accepts room fields such as name, party_ids and the meeting fields listed for creation, and returns the updated room.
  • Send PUT with { "hide_options": true } to hide the room for the caller. It returns the text Successful.
  • DELETE removes the room from the caller’s active view and returns the text Successful when the caller belongs to it.

09

List messages

GET /apis/v1/chat/rooms/:id/messages

NameInTypeRequiredDescription
idPathStringYesRoom identifier.
per_pageQueryIntegerNoPage size; defaults to 25, maximum 200.
next_pointerQueryStringNoMessage ID returned by the preceding page.

Response: { "results": [Message], "has_more": Boolean, "next_pointer": String | null }.

10

Send a message

POST /apis/v1/chat/rooms/:id/messages returns a Message.

{
  "body": "Please review the latest draft.",
  "reply_to_message_id": "message_123",
  "client_token": "optional-client-correlation-id"
}
NameTypeRequiredDescription
bodyStringYesNon-empty text message body.
reply_to_message_idStringNoMessage to reply to.
client_tokenStringNoClient correlation value; echoed in a successful response.

An empty body returns 422 { "error": "empty_body" }.

11

Delete a message

DELETE /apis/v1/chat/rooms/:id/messages/:message_id returns the updated, deleted Message.

12

Add or remove group and meeting members

POST /apis/v1/chat/rooms/:id/members adds members and returns the updated Room.

  • party_ids is accepted as an alias for member_ids.
  • The room must be a group or meeting, and the caller must already belong to it.
  • DELETE /apis/v1/chat/rooms/:id/members/:member_id removes one member and returns the updated room. Callers can’t remove themselves with it.
{ "member_ids": ["user_123", "user_456"] }

13

Upload a chat attachment

POST /apis/v1/chat/attachments. Send multipart/form-data with one required file part. The maximum upload size is 25,000,000 bytes.

Response fieldTypeDescription
attachment.urlStringAuthenticated file URL.
attachment.secure_idStringStored-file identifier.
attachment.filenameStringOriginal filename.
attachment.content_typeStringMIME type.
attachment.sizeNumberFile size in bytes.
attachment.typeStringimage for image MIME types; otherwise file.

14

Errors

StatusErrorMeaning
401Authentication errorMissing, expired or invalid bearer token.
403not_authorizedCaller is not a member of the room or cannot perform the operation.
404room_not_found, message_not_found, member_not_foundThe requested resource does not exist in the caller’s tenant context.
422empty_body, invalid_message_id, missing_member_ids, unsupported_room, cannot_remove_self, update_failedRequest could not be applied.
500message_fetch_failed, message_send_failed, message_delete_failedServer-side chat operation failed.
Next guideMeetings and Calls API →

Last reviewed 27 November 2026.

Still stuck?

Chat with our support team. Tell us what you were doing and what you saw, and a person will pick it up. You can also email support@ration.works.

Buying or moving to Ration?

For plans, migration or an on-premise deployment, talk to our sales team.