Skip to main content

Workspace.Chats.Actions

Tags: chat, communication, messaging

Endpoints

Participants

POST /api/v2/w/{workspace_uuid}/chats/{chat_id}/participants

Description:

Chat actions and operations

Add a participant to a chat with a specified role.

Allows workspace managers to add members to chats with various roles including contributors. Contributors can be consulted via contributor_input_request tool during conversations.

Path Parameters:

  • chat_id: Chat ID to add participant to

Request Body:

  • memberId: ID of the member to add as a participant
  • role: Role for the participant (default: "contributor")

Response: Returns a success status, message, and the ID of the created participant.

Permissions: Requires chats:write scope.

Error Responses:

  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: User lacks chats:write scope
  • 404 Not Found: Chat or member not found
  • 400 Bad Request: Invalid role or participant already exists

Related Endpoints:

  • GET /chats/{id} - Get chat details including participants
  • GET /members - List workspace members

Authorization: Requires chats:write scope

Parameters:

Response: See ChatParticipantAddedResponse


Send Assistant Message

POST /api/v2/w/{workspace_uuid}/chats/{chat_id}/send-assistant-message

Description:

Chat actions and operations

Send a message as the assistant in a chat conversation.

Allows workspace managers to manually send messages on behalf of the chat's assistant. Supports SMS and email channels with automatic delivery. Can optionally include tool calls which will be executed before message delivery. Automatically clears the needs_response flag when used.

Path Parameters:

  • chat_id: Chat ID to send the message in

Request Body:

  • message: Message content to send (supports markdown for email)
  • tool_calls: Optional array of tool calls to execute with the message

Response: Returns a success confirmation with the created message details including ID, UUID, role, content, and timestamp.

Permissions: Requires chats:admin scope to send messages as the assistant.

Error Responses:

  • 400 Bad Request: Invalid chat configuration, missing phone/email, or notifications disabled
  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: User lacks chats:admin scope
  • 404 Not Found: Chat, assistant, or participant not found
  • 500 Internal Server Error: Failed to send SMS/email or execute tools

Related Endpoints:

  • GET /chats/{id}/messages - Get chat message history
  • POST /chats/{id}/messages/{uuid}/rate - Rate an assistant message
  • GET /chats/{id}/tools - Get available tools for the chat

Authorization: Requires chats:admin scope

Parameters:


Summarize

POST /api/v2/w/{workspace_uuid}/chats/{chat_id}/summarize

Description:

Chat actions and operations

Generate an AI summary of the chat conversation.

Creates an AI-generated summary of the chat's message history, updating the chat's title and summary fields. Optionally analyzes conversation content to automatically update chat labels. Summary generation happens synchronously within the request.

Path Parameters:

  • chat_id: Chat ID to summarize

Query Parameters:

  • update_labels: If true, also updates chat labels based on conversation content (default: false)

Response: Returns the updated ChatResponse object with new title, summary, summary_updated_at timestamp, and optionally updated labels.

Permissions: Self-access: Users can summarize their own chats. Admin access: CHATS_WRITE scope required to summarize other members' chats.

Error Responses:

  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: User does not have permission to summarize this chat
  • 404 Not Found: Chat not found
  • 500 Internal Server Error: AI summarization failed

Related Endpoints:

  • GET /chats/{id} - Get chat details including current summary
  • GET /chats/{id}/messages - View messages being summarized
  • PUT /chats/{id} - Update chat manually

Authentication: Requires workspace member

Parameters:

  • chat_id (Integer)
  • update_labels (Boolean)

Response: See ChatResponse