Chat API
Read and write Chat rooms, discussions, messages, reactions, and chat agents, and the discussions attached to posts, tasks, docs, canvases, and projects.
Session tokens accept message edit and delete with chat:write, and discussion follow, unfollow, mute, and read with chat:read and either chat:write or notifications:write. Message reactions need chat:read and reactions:write. Send Authorization: Bearer with X-Project-Feed-Workspace. Viewers can follow, unfollow, mute, and mark discussions read, but cannot use the other writes. Room access and message ownership checks still apply. These writes have no If-Match precondition or Idempotency-Key deduplication. Retry reactions with action set to add or remove; an omitted action toggles and is unsafe to replay.
Session tokens accept POST /api/v1/chat/rooms to open the Workspace room or a project room, and POST and DELETE on thread links, with chat:write. GET on thread links and attachments needs chat:read. Existing project, room, discussion and linked-item access checks apply. Only the link creator, an owner or an admin can remove a context link; origin links cannot be removed. Viewers can read links and attachments but cannot create rooms or change links.
Session tokens accept PATCH /api/v1/chat/rooms/:roomId/threads/:threadId with a title, and POST to its /pin and /unpin actions, with chat:write. Any member who can write in the room can rename a discussion. Only owners and admins can pin or unpin; viewers cannot use these writes. Workspace, room, project and discussion access checks apply. These routes have no If-Match precondition or Idempotency-Key deduplication. Repeating the same title or pin state changes nothing while that state still holds. After a lost response, read mobile:chatThread and reconcile before retrying: a later rename or pin change can be overwritten by a delayed retry. Keep pending intent until the result is known.
Session tokens also accept POST /api/v1/chat/discussions with chat:write to start a discussion from a post. The post must be published and readable, its project writable and unarchived, and Chat enabled. Viewers cannot start discussions. Persist an Idempotency-Key before sending and retry the same body and key after a lost response. A replay returns the original discussion with 200; a changed request returns 409 idempotency_key_reused. There is no If-Match precondition. The key stays on the message without a time expiry, but deletion or lost access can prevent recovery. Keep uncertain intent for reconciliation instead of generating another key. Without an original key, do not retry automatically.
Rooms and access
Project-restricted credentials can list their selected project rooms and send plain text or Markdown messages there. Sends stay inside the workspace and cannot impersonate a chat agent, link workspace items, quote another message, or reply to a source-backed or linked discussion. Typed item identifiers and URLs stay as message text without creating linked items. Other Chat operations remain unavailable to these credentials. The same restrictions apply through the API, MCP, and CLI.
Chat is available on every plan. The API is not: workspace API keys on the Free plan are read-only and limited to projects, posts, comments, reactions, and tasks, so they cannot hold chat:read or chat:write. A Free workspace gets 403 with the code plan_required.
A workspace has one Workspace room and one room for each project. A project room takes the project's name and is archived and restored with the project. Rooms have no separate member list: the Workspace room is open to every workspace member, and a project room is open to everyone who can open the project. For a private project that means its members and the workspace owners and admins. Chat has no direct messages.
Every request acts as a person. A workspace API key acts as the member who created it, and a personal API token acts as its owner in the workspace named by the X-Project-Feed-Workspace header. Both see only the rooms, discussions, and linked items that person can open. Reads require chat:read and writes require chat:write. Message reactions need chat:read plus reactions:read or reactions:write. Viewers can read but not write, except that they can follow, unfollow, mute, and mark discussions read. Those routes change only your own state and need chat:read and either chat:write or notifications:write.
In a room object, readOnly is true for viewers, archived rooms, and project rooms the member cannot write to. kind is general for the Workspace room and project otherwise. messageCount, threadCount, and lastMessageAt can be missing for rooms whose activity is not shown.
Endpoints
Search and read state
GET /chat/search finds messages in the rooms you can open. Set roomId to search one room. Results use the same message objects as a room list, and each has its roomId and threadId. Pass nextCursor as cursor while hasMore is true.
GET /chat/threads lists discussions across all of your rooms, with the same filters as a room list plus projectId. POST /chat/rooms/:roomId/threads/:threadId/read marks a discussion read for you and clears its unread notifications. Without a body it reads every message. Send lastReadSequence to read only through the message with that threadSequence, so messages you have not shown stay unread. A message's threadSequence is its position in the discussion and is null on some older messages; sequence counts the whole room and is not a read position. A read position never moves back, and a value past the newest message reads everything. It needs chat:read and either chat:write or notifications:write, so a viewer key with chat:read and notifications:write can mark discussions read.
Agents
Anyone with chat:read can list the active agents. Listing disabled agents with status=disabled or status=all, creating an agent, and changing one are for workspace owners and admins. Anyone else gets 403. Only owners and admins see an agent's instructions.
A handle is 2 to 31 characters: lowercase letters, digits, hyphens, and underscores. It is unique in the workspace and cannot change after the agent is created. A workspace can have up to 100 agents. accessScope is workspace or selected_projects. The second needs a non-empty projectIds list of project IDs or slugs. capabilities is any of reply, summarize, and draft_feed.
Creating an agent accepts an idempotencyKey. Create and change responses carry an ETag. Send it as If-Match, or send expectedUpdatedAt, to get 412 instead of overwriting a newer change. Set description or instructions to null to clear it.
Messages
Send content as plain text, Markdown with contentFormat: "markdown", or a rich text block array. A plain string without contentFormat keeps @username mentions, which notify and follow the people named. Messages are limited to 4,000 visible characters and 32,000 bytes, and each member can send 30 messages a minute across the app and the API. Past that limit a send returns 429. See the rate limits page for the other limits.
Message lists come back oldest to newest within a page. Without a cursor you get the newest page. Pass nextCursor as cursor to keep going back, or send any message ID with direction=newer to read what came after it. Deleted messages stay in the list with content set to null so discussion order is kept. See API conventions for cursors.
Use idempotencyKey when a send might be retried. Keys are scoped to the author. Repeating the same request returns the original discussion or message with status 200. Reusing a key for different content returns 409 with the code idempotency_key_reused. To attach files, upload them with the Files API and the chatMessage destination.
Discussions about items
POST /chat/discussions starts a discussion from a post, task, canvas, doc, or project and links the item as its origin. The origin link cannot be removed. Add more items with the links endpoints or the links field on a message.
GET /chat/discussions returns only discussions in rooms you can open, so a discussion in a private project stays hidden from people outside it even when it links a public item. Asking about an item you cannot open returns 404, and so does linking one.
Chat errors
400A field is missing or invalid, such as an oversized message, a bad limit or cursor, or an unknown objectType.403The credential cannot write here: Chat is off for the workspace (code feature_disabled), the member is a viewer, the room is read-only, or the action is limited to a role, such as pinning or editing someone else's message.404The room, discussion, message, link, or item does not exist, you cannot open it, or it belongs to a different room than the one in the path.409The idempotencyKey was used for a different request (code idempotency_key_reused), a message already has 250 reactions, a room already has 5 pinned discussions, you tried to remove a discussion's original item, an agent handle is in use, or the workspace already has 100 agents.412A chat agent changed since the expectedUpdatedAt or If-Match ETag you sent.413The request body is over 512 KiB.429The member is sending messages too quickly.
Error bodies are described on the errors page.
Webhooks
Subscribe to chat.thread_created, chat.thread_resolved, chat.thread_reopened, chat.message_created, chat.message_updated, and chat.message_deleted on the Webhooks API. Chat payloads carry IDs only, never message text or discussion titles. Fetch the content through this API with a key that can open the room. Events from a project room include its projectId, so a project-scoped webhook receives only that project's Chat events.