{"openapi":"3.0.0","paths":{"/agents":{"post":{"description":"Creates a new agent under your account. Human and agent callers are supported. New agents share the same root human `creator_id` as you: for a human caller that is your user id; for an agent caller that is the root human for your agent account (never the calling agent’s id). Responses expose that human as `creator_id` on each agent resource.","operationId":"AgentAccountController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentAccount"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create an agent account","tags":["Agents"]},"get":{"description":"Returns every agent whose `creator_id` equals your root human: your own user id for a human caller, or that same root human for an agent caller (so agent users can list sibling agents under one human account).","operationId":"AgentAccountController_list","parameters":[{"name":"skip","required":false,"in":"query","schema":{"minimum":0,"format":"int32","default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Max number of results allowed per page is 100.","schema":{"minimum":1,"maximum":100,"nullable":true,"default":50,"type":"number"}},{"name":"direction","required":false,"in":"query","schema":{"nullable":true,"default":"newer","type":"string","enum":["older","newer"]}},{"name":"date","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAgentAccountsResponse"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"List agent accounts under your ownership scope","tags":["Agents"]}},"/agents/{id}":{"get":{"description":"Returns one agent whose `creator_id` matches your ownership scope (same rules as list).","operationId":"AgentAccountController_get","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get an agent account","tags":["Agents"]},"delete":{"description":"Soft-deletes an agent (and its workspaces) when that agent’s `creator_id` matches your ownership scope.","operationId":"AgentAccountController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Delete an agent account","tags":["Agents"]}},"/agents/{id}/tokens":{"post":{"description":"Mints a stateless JWT for an agent in your ownership scope (humans: their agents; agents: siblings under the same root human). The JWT includes `user_id` (the agent) and `creator_id` (the root human). Send the returned `token` as `Authorization: Bearer <token>`.","operationId":"AgentAccountController_createToken","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentToken"}}}},"responses":{"200":{"description":"JWT and expiry fields. Use `token` as the bearer credential in the `Authorization` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAgentToken"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create a short-lived stateless token for an agent","tags":["Agents"]}},"/messages/{messageguid}/attachments":{"post":{"operationId":"MessageController_addAttachments","parameters":[{"name":"messageguid","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAttachments"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Add message attachment","tags":["Message","Attachments (messages)"]}},"/v6/messages/by-ids":{"post":{"description":"Returns a list of messages (MessageV6) by IDs, in request order. With `conversation_id` the user must have access to that conversation and only its messages are returned. Without it the ids may span conversations and voice memos; each message is checked on its own and any the user cannot access, or that do not exist, are silently left out. MessageV6 differs from v5 in three ways: `thread_id` (the parent id, or the message id itself when it is not a reply) replaces `parent_message_id`; the audio rendition and its transcript, AI summary, language flags and time codes are nested under `content`, with the waveform as a compact base-36 string; and the requesting user's own state (`heard_ms`, `label_ids`, `notify`, `notes`, `last_heard_update`) is included where the read path carries it.","operationId":"getMessagesByIdsV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessagesByIdsV5Payload"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageV6"}}}}},"400":{"description":""},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get messages by IDs","tags":["Messages (v6)"]}},"/v6/messages/updates":{"get":{"description":"Returns a keyset-paginated page of messages (MessageV6) for the user ordered by `last_updated_at` — surfaces messages that were recently created *or* changed (e.g. edited, labeled), not just newly created ones — optionally scoped to a conversation, wrapped with `has_more` and `next_cursor`. Paging semantics are identical to `GET /v5/messages/updates`: anchor the first page with `date` + `direction`, then follow `cursor = next_cursor` while `has_more` is true, and de-duplicate by `id`. Send `include_unchanged_content=false` to skip `content` the client already has: with `direction=newer`, a message whose content has not changed since the sync began (the `date` anchor, or the cursor stored from the previous sync) is then returned without `content`, since only its core fields and the requesting user's state changed; keep the content already held for that `id`. A missing `content` on this route never means the content was removed. MessageV6 differs from v5 in three ways: `thread_id` (the parent id, or the message id itself when it is not a reply) replaces `parent_message_id`; the audio rendition and its transcript, AI summary, language flags and time codes are nested under `content`, with the waveform as a compact base-36 string; and the requesting user's own state (`heard_ms`, `label_ids`, `notify`, `notes`, `last_heard_update`) is included where the read path carries it.","operationId":"getMessageUpdatesV6","parameters":[{"name":"date","required":false,"in":"query","description":"Anchor date to page from (older/newer than this instant). Required for the first page; omit it on subsequent pages and pass `cursor` instead. Ignored when `cursor` is provided.","schema":{"format":"date-time","type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as `next_cursor` from a previous response. When provided, it supersedes `date`. A cursor issued while `has_more` was true continues strictly from the last message of the previous page (no overlap). The cursor a final `direction=newer` page issues marks the newest message seen: sent back later it returns what was created or changed since, and may include up to 4s of already-seen messages behind that boundary while it is recent, so a message whose write landed late is not lost; de-duplicate by `id`. A quiet feed converges to an empty page. Keep `direction` the same across a cursor sequence.","schema":{"type":"string"}},{"name":"direction","required":true,"in":"query","schema":{"$ref":"#/components/schemas/Direction"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of messages to return (default: 200).","schema":{"format":"int32","default":200,"type":"number"}},{"name":"conversation_id","required":false,"in":"query","description":"Conversation (channel) ID to scope the results to. User must have access to this conversation.","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","description":"Language for message content (e.g. transcript, audio). Original language used if not provided.","schema":{"type":"string"}},{"name":"presigned_url","required":false,"in":"query","description":"Include presigned URLs for audio files (default: false).","schema":{"default":false,"type":"boolean"}},{"name":"include_unchanged_content","required":false,"in":"query","description":"Return `content` on every message (default: true). Send `false` to omit it, with `direction=newer`, from messages whose content has not changed since the sync began (the `date` anchor, or the cursor stored from the previous sync): only their core fields and the requesting user's state are returned, so keep the content already held for that `id`.","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponseV6"}}}},"400":{"description":""},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get message updates","tags":["Messages (v6)"]}},"/v6/messages/{id}":{"get":{"description":"Returns one message (MessageV6) including the requesting user's own state. Served from the message cache unless `fresh` is set; the per-user fields are always read live. MessageV6 differs from v5 in three ways: `thread_id` (the parent id, or the message id itself when it is not a reply) replaces `parent_message_id`; the audio rendition and its transcript, AI summary, language flags and time codes are nested under `content`, with the waveform as a compact base-36 string; and the requesting user's own state (`heard_ms`, `label_ids`, `notify`, `notes`, `last_heard_update`) is included where the read path carries it.","operationId":"getMessageByIdV6","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"language","required":false,"in":"query","description":"Language (optional) - Original language will be used if not provided or not found.","schema":{"example":"english","type":"string"}},{"name":"presigned_url","required":false,"in":"query","description":"Whether to include presigned URLs for audio files (optional, default: false)","schema":{"default":false,"type":"boolean"}},{"name":"fresh","required":false,"in":"query","description":"Whether to bypass cache and fetch fresh data from database (optional, default: false - uses cache)","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessageResponseV6"}}}},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get Message By ID","tags":["Messages (v6)"]}},"/v6/messages/{id}/save-to-voicememo":{"post":{"description":"Save a message into voice memos by copying it. You must be the owner of the message.","operationId":"saveMessageToVoiceMemoV6","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveMessageToVoiceMemoPayload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Save Message to Voice Memo","tags":["Messages (v6)"]}},"/v6/messages/text":{"post":{"description":"Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createConversationTextMessageV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationTextV5Payload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create text message in a conversation","tags":["Messages (v6)"]}},"/v6/messages/attachment":{"post":{"description":"Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createConversationAttachmentMessageV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationAttachmentV5Payload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create attachment-only message in a conversation","tags":["Messages (v6)"]}},"/v6/messages/audio":{"post":{"description":"Uploads the audio in one request (no separate /complete step). The audio file is sent as multipart part `audio_file`; all other metadata travels in the JSON multipart field `payload`. Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createConversationAudioMessageV6","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["payload","audio_file"],"properties":{"payload":{"description":"JSON-encoded `CreateConversationAudioV5Payload` (conversation_id, optional idempotency_key, attachments, utm_data, forward, duration, transcript_timecodes).","allOf":[{"$ref":"#/components/schemas/CreateConversationAudioV5Payload"}]},"audio_file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create audio message in a conversation","tags":["Messages (v6)"]}},"/v6/messages/stream":{"post":{"description":"Returns the started message plus a signed `stream_key`. Clients open the existing application websocket and authenticate the audio-upload session with this key (same flow as the legacy v3 stream-key behavior). The `stream_key` is bound to `message.id` and expires according to the websocket gateway configuration. Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createConversationStreamMessageV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationStreamV5Payload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStreamMessageV6Response"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create conversation message and obtain stream_key for WebSocket audio upload","tags":["Messages (v6)"]}},"/v6/voicememos/text":{"post":{"description":"Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createVoicememoTextMessageV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoicememoTextV5Payload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create text voice memo","tags":["Messages (v6)"]}},"/v6/voicememos/attachment":{"post":{"description":"Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createVoicememoAttachmentMessageV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoicememoAttachmentV5Payload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create attachment-only voice memo","tags":["Messages (v6)"]}},"/v6/voicememos/audio":{"post":{"description":"Uploads the audio in one request (no separate /complete step). The audio file is sent as multipart part `audio_file`; all other metadata travels in the JSON multipart field `payload`. Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createVoicememoAudioMessageV6","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["payload","audio_file"],"properties":{"payload":{"description":"JSON-encoded `CreateVoicememoAudioV5Payload` (optional workspace_id, folder_id, idempotency_key, attachments, duration, transcript_timecodes). `conversation_id`, `utm_data`, `thread_id`, and `forward` are rejected.","allOf":[{"$ref":"#/components/schemas/CreateVoicememoAudioV5Payload"}]},"audio_file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create audio voice memo","tags":["Messages (v6)"]}},"/v6/voicememos/stream":{"post":{"description":"Returns the started message plus a signed `stream_key`. Clients open the existing application websocket and authenticate the audio-upload session with this key (same flow as the legacy v3 stream-key behavior). The `stream_key` is bound to `message.id` and expires according to the websocket gateway configuration. Always returns `201 Created`, including idempotent replays. Clients that need to distinguish a replay from an initial creation must compare `idempotency_key` / `id` instead of relying on the HTTP status.","operationId":"createVoicememoStreamMessageV6","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoicememoStreamV5Payload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStreamMessageV6Response"}}}},"400":{"description":""},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create voice memo message and obtain stream_key for WebSocket audio upload","tags":["Messages (v6)"]}},"/v6/messages/{message_id}/send/{channel_id}":{"post":{"operationId":"sendExistingMessageV6","parameters":[{"name":"message_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Send existing message to a channel","tags":["Messages (v6)"]}},"/v6/messages/{message_id}/send/{channel_id}/{reply_to_message_id}":{"post":{"description":"Threads are one level deep: when the reply target is itself a reply, the message joins that reply's thread.","operationId":"sendExistingMessageAsReplyV6","parameters":[{"name":"message_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"reply_to_message_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageV6"}}}},"400":{"description":"The reply target is missing or deleted"},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Send an existing message as a reply","tags":["Messages (v6)"]}},"/v4/channel/{channel_id}/seen-seq/{seen_seq}":{"put":{"operationId":"ChannelController_updateChannelSeenSeqV4_v4","parameters":[{"name":"channel_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"seen_seq","required":true,"in":"path","schema":{"type":"number"}},{"name":"force","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"number"}}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Update seen sequence and synchronize notified state by sequence","tags":["Channels"]}},"/channels/recent":{"post":{"operationId":"ChannelController_getRecentChannels","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentChannelsFilter"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PersonalizedChannel"}}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get recent channels","tags":["Channels"]}},"/channels/namedConversation":{"post":{"operationId":"ChannelController_createNamedConversation","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNamedConversation"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizedChannel"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create named conversation","tags":["Channels"]}},"/channels/directMessage":{"post":{"operationId":"ChannelController_createDirectMessage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDirectMessage"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizedChannel"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create direct message","tags":["Channels"]}},"/v2/channel/{channelguid}":{"get":{"description":"V2 of channel has all collaborators in json_collaborators field.","operationId":"ChannelController_getChannelV2","parameters":[{"name":"channelguid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizedChannel"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get Channel by ID","tags":["Channels"]}},"/v5/conversations/{id}/signal":{"post":{"description":"Broadcasts a transient status (typing, thinking, tool_call, searching, processing) to clients currently viewing the conversation. Nothing is persisted; senders should re-post every 1-2 seconds while the activity lasts and receivers expire via ttl_ms.","operationId":"sendConversationSignalV5","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendConversationSignalPayload"}}}},"responses":{"204":{"description":""},"400":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Send an ephemeral activity signal to a conversation","tags":["Conversations (v5)"]}},"/whoami":{"get":{"operationId":"AuthController_whoami","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoAmIResponse"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get current user info","tags":["Auth"]}},"/v5/attachments/upload/signedurl":{"post":{"operationId":"AttachmentsController_getSignedUrlV5Upload_v5","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttachmentUrlsV5"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SignedUrlResponseV5"}}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"tags":["Attachments"]}},"/v5/attachments/download/signedurl/{attachment_id}":{"get":{"operationId":"AttachmentsController_getSignedUrlForDownloadV5_v5","parameters":[{"name":"attachment_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"tags":["Attachments"]}},"/v5/attachments/download/signedurl/bulk":{"post":{"operationId":"AttachmentsController_getSignedUrlForDownloadV5Bulk_v5","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentIdList"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BulkAttachmentResult"}}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"tags":["Attachments"]}},"/v5/workspaces":{"get":{"description":"List all workspaces for the logged-in user with pagination","operationId":"getWorkspacesV5","parameters":[{"name":"direction","required":false,"in":"query","schema":{"default":"newer","type":"string","enum":["older","newer"]}},{"name":"limit","required":false,"in":"query","description":"Number of items to return (min: 1, max: 100)","schema":{"minimum":1,"maximum":100,"default":50,"type":"number"}},{"name":"date","required":false,"in":"query","description":"Anchor timestamp to start from. Uses updated_at. Ignored when starting_after/ending_before is provided.","schema":{"type":"string"}},{"name":"starting_after","required":false,"in":"query","description":"Cursor to fetch the next page (use value from next_cursor).","schema":{"type":"string"}},{"name":"ending_before","required":false,"in":"query","description":"Cursor to fetch the previous page (use value from previous_cursor).","schema":{"type":"string"}},{"name":"roles","required":false,"in":"query","description":"List of roles that logged user must have to list workspaces. Defaults to all roles. Can be passed as repeated parameters: roles=admin&roles=guest","schema":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}},{"name":"types","required":false,"in":"query","description":"List of workspace types to filter by. Can be passed as repeated parameters: types=standard&types=webcontact","schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceType"}}},{"name":"include_total","required":false,"in":"query","description":"Whether to include the total count in the response. Defaults to false for better performance.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkspacesResponseV5"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get Workspaces","tags":["Workspaces (v5)"]}},"/notifications/{channel_guid}/{message_guid}":{"delete":{"operationId":"NotificationController_deleteMessageNotifications","parameters":[{"name":"type","required":true,"in":"query","schema":{"type":"string"}},{"name":"channel_guid","required":true,"in":"path","schema":{"type":"string"}},{"name":"message_guid","required":true,"in":"path","schema":{"type":"string"}},{"name":"notification_removal_mode","required":false,"in":"query","schema":{"enum":["hard","soft"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"tags":["Notifications"]},"post":{"operationId":"NotificationController_recreateMessageNotifications","parameters":[{"name":"type","required":true,"in":"query","schema":{"type":"string"}},{"name":"channel_guid","required":true,"in":"path","schema":{"type":"string"}},{"name":"message_guid","required":true,"in":"path","schema":{"type":"string"}},{"name":"heard_percent","required":true,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"tags":["Notifications"]}},"/reactions/message/{message_id}":{"post":{"operationId":"ReactionController_addReactionByBody","parameters":[{"name":"message_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddEmojiReaction"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Add a reaction to a message: a curated reaction id or any unicode emoji","tags":["Reactions"]},"delete":{"operationId":"ReactionController_removeReactionByBody","parameters":[{"name":"message_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddEmojiReaction"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Remove a reaction from a message: a curated reaction id or any unicode emoji","tags":["Reactions"]}},"/apps":{"get":{"description":"Apps that the user has access to (subscribed or not). If the user is the owner of the app, details will be returned with the private fields. Does not include the auto-managed default subscription app (`POST /apps/subscribe`); that client cannot be listed here or edited via OAuth client APIs.","operationId":"get_my_apps","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get List of My Apps","tags":["Apps"]}},"/apps/subscribe":{"post":{"description":"Registers a webhook for the user without requiring a client_id. A client_id will be generated automatically. To update or delete, use the client_id returned in the response. Authorization matches `POST /apps/:client_id/subscribe` once the implicit client exists: OAuth access token for that client, Personal Access Token with cv:write on an app you own, short-lived stateless agent JWT (minted via `POST /agents/:id/tokens`) whose payload includes cv:read and cv:write, or session token (pxtoken) for an app you own.","operationId":"subscribe_user_implicit_client","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeUserPayload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribedUser"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Subscribe user to events subscribed via a Webhook","tags":["Apps"]}},"/apps/{client_id}/subscribe":{"post":{"description":"OAuth access token must be issued for this client_id. With a personal access token (PAT), use cv:write and an app you own (client.owner_id matches the authenticated user). With a stateless agent JWT (`POST /agents/:id/tokens`), the same cv:write rule applies via embedded scopes (cv:read + cv:write). With a session token (pxtoken), ownership of the app is required; no scope is needed.","operationId":"subscribe_user_into_app","parameters":[{"name":"client_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeUserPayload"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribedUser"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Subscribe user to events sent via webhook","tags":["Apps"]}},"/apps/{client_id}/unsubscribe/{id}":{"delete":{"description":"Same authorization as subscribe: OAuth access token for this client_id, PAT or stateless agent JWT with cv:write on an app you own, or pxtoken session for an app you own.","operationId":"unsubscribe_specific_subscription_from_app","parameters":[{"name":"client_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Unsubscribe user from registered event","tags":["Apps"]}},"/apps/subscriptions":{"get":{"description":"List subscriptions for this user. Any authenticated user (including agents via session, PAT, or stateless agent JWT) sees only their own rows.","operationId":"list_owned_subscriptions","parameters":[{"name":"skip","required":false,"in":"query","schema":{"minimum":0,"format":"int32","default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Max number of results allowed per page is: **100**","schema":{"minimum":1,"maximum":100,"nullable":true,"default":100,"type":"number"}},{"name":"direction","required":false,"in":"query","schema":{"nullable":true,"default":"newer","type":"string","enum":["older","newer"]}},{"name":"date","required":false,"in":"query","description":"ISO 8601 date string for cursor pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSubscriptionsResponse"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"List owned subscriptions","tags":["Apps"]}},"/apps/{client_id}/subscriptions/{id}":{"put":{"description":"Updates a subscription previously registered by this user. Same authorization as subscribe: OAuth access token for this client_id, PAT or stateless agent JWT with cv:write on an app you own, or pxtoken session for an app you own. Omitted fields keep their current values.","operationId":"update_subscription","parameters":[{"name":"client_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPayload"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Update subscription","tags":["Apps"]}},"/apps/{client_id}/unsubscribe":{"delete":{"description":"Same auth as subscribe: OAuth access token for this client_id, PAT or stateless agent JWT with cv:write for an app you own, or session token (pxtoken) for an app you own.","operationId":"unsubscribe_user_from_app","parameters":[{"name":"client_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Unsubscribe user from all events and removes all access tokens associated with this app.","tags":["Apps"]}},"/message-sharelinks/shared-links/{message_id}":{"get":{"operationId":"MessageShareLinkController_getShareLinksBySharedMessage","parameters":[{"name":"message_id","required":true,"in":"path","schema":{"type":"string"}},{"name":"skip","required":false,"in":"query","schema":{"minimum":0,"format":"int32","default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Max number of results allowed per page is: **100**","schema":{"minimum":1,"maximum":100,"nullable":true,"default":50,"type":"number"}},{"name":"direction","required":false,"in":"query","schema":{"nullable":true,"default":"newer","type":"string","enum":["older","newer"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessageShareLinksBySharedMessageResponse"}}}},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get List of Message Share Links of a Message","tags":["Message Share Links"]}},"/v6/message-sharelinks/{share_link_id}":{"get":{"description":"Same as the v3 route, with the shared message in the MessageV6 shape.","operationId":"getMessageShareLinkV6","parameters":[{"name":"share_link_id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageShareLinkWithMessageV6"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get Message Share Link with Shared Message","tags":["Message Share Links"]}},"/message-sharelinks/{share_link_id}/attachments/signedurl/{attachment_id}":{"get":{"operationId":"MessageShareLinkController_getAttachmentFile","parameters":[{"name":"share_link_id","required":true,"in":"path","description":"MessageShareLink ID","schema":{"example":"fd546db4b648d6b1fa","type":"string"}},{"name":"attachment_id","required":true,"in":"path","description":"The ID of the attachment within the MessageShareLink","schema":{"example":"65cfafb7027c0e45b35d5cda","type":"string"}}],"responses":{"200":{"description":"Signed S3 URL for the attachment","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get signed URL for specific attachment of a Shared message","tags":["Message Share Links"]}},"/message-sharelinks/{share_link_id}/{audio_id}":{"get":{"operationId":"MessageShareLinkController_getAudioFile","parameters":[{"name":"share_link_id","required":true,"in":"path","description":"MessageShareLink ID","schema":{"example":"fd546db4b648d6b1fa","type":"string"}},{"name":"audio_id","required":true,"in":"path","description":"The ID of the audio within the MessageShareLink","schema":{"example":"65cfafb7027c0e45b35d5cda","type":"string"}}],"responses":{"302":{"description":"Redirect to the Signed S3 URL"},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get a specific version of the audio from a Shared message","tags":["Message Share Links"]}},"/message-sharelinks":{"post":{"deprecated":true,"operationId":"MessageShareLinkController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageShareLink"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageShareLinkWithSharedMessage"}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Create a MessageShareLink","tags":["Message Share Links"]}},"/message-sharelinks/revoke-access":{"put":{"description":"Only the creator of original message can revoke access to all share links by: shared_message_id ","operationId":"MessageShareLinkController_revokeAccessToShareLink","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeAccessToShareLink"}}}},"responses":{"204":{"description":""},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Revoke access to all share links or one specific.","tags":["Message Share Links"]}},"/message-sharelinks/{share_link_id}/access":{"put":{"description":"Update AccessType (public, specified) and SpecifiedAccessType. Only possible when ShareType of Shared Message is (link).","operationId":"MessageShareLinkController_updateAccess","parameters":[{"name":"share_link_id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccessPayload"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageShareLink"}}}},"403":{"description":""},"404":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Update the access control for a Message Share Link.","tags":["Message Share Links"]}},"/message-sharelinks/by-message-ids":{"post":{"operationId":"getListOfSharelinksByMessageIds","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetListOfSharelinksByMessageIds"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SharelinksByMessageIdResponse"}}}}},"403":{"description":""}},"security":[{"api_key":[]},{"oauth2":[]}],"summary":"Get list of Message Share Links by Message ID's (Up to 500 messages each request)","tags":["Message Share Links"]}}},"info":{"title":"Carbon Voice AI Agent API","description":"# Introduction\n\nThe voice interface your agents are missing -  Async-first. Voice-first. Ready in minutes.\n\nCarbon Voice gives agents a full voice interface without the usual infrastructure overhead. \nSpeech-to-text, text-to-speech, delivery, and push notifications are all built in. \nYour agent receives clean transcribed text and responds in text; Carbon Voice handles the rest. \nNo extra STT/TTS APIs. No extra accounts.\n\nAgents and people share the same conversation layer, so users can speak to an agent,\nloop in a colleague, and bring the agent back — all without switching apps.\n\nSee why Carbon Voice is the best interface for talking to Agents: [https://www.getcarbon.app/features](https://www.getcarbon.app/features)\n\nThis API provides the key features an AI agent will need.  The Access Tokens can also be used for the Full API if needed.\n\n## How it works\n\n1. **Create a Voice Agent** — name it, provide your webhook URL, and give it the Agent PAT (Personal Access Token).\n2. **Carbon Voice handles the voice layer** — STT in, TTS out. Your agent receives clean text and responds in text.\n3. **Users just talk** — tap to record, agent replies when ready, delivered like any message.\n\n## Terminology\n\n* **Conversation**: A channel of communication (people + messages around a topic).\n* **Collaborators**: People who are part of a conversation.\n\n## Base URL\n\n`https://api.carbonvoice.app`\n\n## Authentication\n\n### For Agent Connections\n**Personal Access Token (PAT)** — `Authorization: Bearer<pat_token>`\n1. Obtain from: https://developer.carbonvoice.app\n2. Recommended for: AI agents and automated integrations\n3. Simple, long-lived authentication perfect for bot-to-API communication\n\n### For OAuth Apps\nFor applications that authenticate on behalf of users:\n\n**OAuth2 Bearer token** — `Authorization: Bearer <access_token>` (obtain via OAuth2 flow)\n1. Standard for user authentication in web applications\n2. Users authorize your app to access Carbon Voice on their behalf\n\n<SecurityDefinitions />\n\n## Errors\n\n4xx responses indicate a client error. 5xx indicate a server error. Check [health](https://api.carbonvoice.app/v2/health) for system status.\n\nError format: `{ \"success\": false, requestId: \"uuid\", errmsg: \"error message\" }`\n\n## Rate Limiting\n\nRate limits vary per endpoint. On 429 responses, check `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.\n\n## Resources\n\n* **[Developer Portal](https://www.developer.carbonvoice.app/)** — API keys, integrations, and how-to examples\n* **[User Terms of Service](https://www.getcarbon.app/usertos)** — Legal terms for API use\n* **[Support](https://www.getcarbon.app/support)** — Help and documentation\n* **Email** — support@carbonvoice.app\n","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"https://api.carbonvoice.app"}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"pxtoken"},"oauth2":{"type":"oauth2","flows":{"implicit":{"scopes":{"admin":"Admin","identity":"View information about a user's identity","profile:read":"View a user's profile","profile:write":"Manage user's profile information: emails, phones, videocall, and more","channels:read":"View basic information about users's channels","channels:write":"Manage user's channels and create new ones on a user's behalf","channels:join":"Join user to an existing channel"},"authorizationUrl":"https://api.carbonvoice.app/oauth/authorize"}}}},"schemas":{"CreateAgentAccount":{"type":"object","properties":{"name":{"type":"string","description":"Display name for the agent account.","example":"Support Assistant"}},"required":["name"]},"Agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"creator_id":{"type":"string","description":"Root human user id for this agent (API field). Persisted as `user.owner_id` on the agent user row."},"image_url":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"},"last_updated_at":{"format":"date-time","type":"string"}},"required":["id","name","username","creator_id","created_at","last_updated_at"]},"ListAgentAccountsPagination":{"type":"object","properties":{"skip":{"type":"number","minimum":0,"format":"int32"},"limit":{"type":"number","minimum":1,"maximum":100},"direction":{"type":"string","enum":["older","newer"],"nullable":true},"date":{"type":"string","format":"date-time","nullable":true}},"required":["skip","limit"]},"ListAgentAccountsResponse":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/ListAgentAccountsPagination"},"total_results":{"type":"number","format":"int32"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}}},"required":["pagination","total_results","results"]},"CreateAgentToken":{"type":"object","properties":{"expires_in_seconds":{"type":"number","default":3600,"maximum":86400,"minimum":1,"description":"Token lifetime in seconds."}}},"CreatedAgentToken":{"type":"object","properties":{"token":{"type":"string","description":"JWT string. Use as a bearer token on API requests: send `Authorization: Bearer <token>` to authenticate as the agent user."},"expires_in_seconds":{"type":"number","format":"int32"},"expires_at":{"format":"date-time","type":"string"}},"required":["token","expires_in_seconds","expires_at"]},"UpdateMessageTopic":{"type":"object","properties":{"message_id":{"type":"string"},"text":{"type":"string"}},"required":["message_id","text"]},"Direction":{"type":"string","enum":["older","newer"]},"MessageStatus":{"type":"string","enum":["offline","paused","processing","scheduled","active","deleted","account-deleted","initializing","inprogress","canceled","failed"]},"MessageIndex":{"type":"object","properties":{"message_id":{"type":"string"},"parent_message_id":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/MessageStatus"}]},"created_at":{"type":"number","format":"int64"},"last_updated_at":{"type":"number","format":"int64"},"deleted_at":{"type":"number","nullable":true,"format":"int64"}},"required":["message_id","status","created_at","last_updated_at"]},"MessagesIndexResponse":{"type":"object","properties":{"skip":{"type":"number","default":0,"minimum":0,"format":"int32"},"limit":{"type":"number","nullable":true,"default":100,"maximum":1000,"minimum":1,"description":"Max number of results allowed per page is: **1000**"},"direction":{"nullable":true,"default":"newer","allOf":[{"$ref":"#/components/schemas/Direction"}]},"start_date":{"type":"number","example":1694313500106,"format":"int64"},"end_date":{"type":"number","example":1694313500106,"format":"int64"},"channel_id":{"type":"string"},"total_results":{"type":"number","format":"int32"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MessageIndex"}}},"required":["channel_id","total_results","results"]},"WordsWithTimeCode":{"type":"object","properties":{"words":{"type":"string"},"startMs":{"type":"number","nullable":true,"format":"int32"},"endMs":{"type":"number","nullable":true,"format":"int32"}},"required":["words"]},"MessageTranscript":{"type":"object","properties":{"message_guid":{"type":"string"},"words":{"type":"array","items":{"$ref":"#/components/schemas/WordsWithTimeCode"}},"tts_voice":{"type":"string","nullable":true}},"required":["message_guid","words"]},"AttachmentType":{"type":"string","enum":["link","file","location","ai-response-id","ai-prompt-id","action-item-id","ask-id"]},"AttachmentStatus":{"type":"string","enum":["Initializing","Uploading","Uploaded","Failed"]},"RequestAttachment":{"type":"object","properties":{"type":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AttachmentType"}]},"link":{"type":"string"},"client_id":{"type":"string"},"created_at":{"format":"date-time","type":"string","nullable":true},"filename":{"type":"string","nullable":true},"mime_type":{"type":"string","nullable":true},"length_in_bytes":{"type":"number","nullable":true},"latitude":{"type":"number","nullable":true},"longitude":{"type":"number","nullable":true},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AttachmentStatus"}]},"percent_complete":{"type":"number","nullable":true}},"required":["type","link"]},"AddAttachments":{"type":"object","properties":{"attachments":{"type":"array","items":{"$ref":"#/components/schemas/RequestAttachment"}}},"required":["attachments"]},"LatLon":{"type":"object","properties":{"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"}},"required":["latitude","longitude"]},"Attachment":{"type":"object","properties":{"_id":{"type":"string"},"client_id":{"type":"string","nullable":true},"creator_id":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/AttachmentType"}]},"link":{"type":"string"},"active_begin":{"format":"date-time","type":"string","nullable":true},"active_end":{"format":"date-time","type":"string","nullable":true},"filename":{"type":"string","nullable":true},"mime_type":{"type":"string","nullable":true},"length_in_bytes":{"type":"number","nullable":true},"location":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/LatLon"}]},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AttachmentStatus"}]},"percent_complete":{"type":"number","nullable":true}},"required":["_id","creator_id","created_at","type","link"]},"AddNotes":{"type":"object","properties":{"text":{"type":"string"},"message_id":{"type":"string"}},"required":["text","message_id"]},"PersonalNote":{"type":"object","properties":{"message_id":{"type":"string"},"text":{"type":"string"},"last_updated":{"format":"date-time","type":"string"},"message_created_at":{"format":"date-time","type":"string"},"message_created_by":{"type":"string"},"message_workspace_ids":{"type":"array","items":{"type":"string"}},"message_channel_ids":{"type":"array","items":{"type":"string"}}},"required":["message_id","text","last_updated","message_created_at","message_created_by","message_workspace_ids","message_channel_ids"]},"Gender":{"type":"string","enum":["F","M"]},"Role":{"type":"string","enum":["admin","owner","creator","member","guest"]},"WorkspaceRole":{"type":"object","properties":{"workspace_id":{"type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/Role"}]},"joined_at":{"format":"date-time","type":"string","nullable":true},"sort_order":{"type":"number","nullable":true,"format":"int32"}},"required":["workspace_id","role"]},"UserType":{"type":"string","enum":["user","bot","agent"]},"Contact":{"type":"object","properties":{"user_guid":{"type":"string"},"image_url":{"type":"string","nullable":true},"first_name":{"type":"string"},"last_name":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"voice_gender":{"allOf":[{"$ref":"#/components/schemas/Gender"}]},"created_by":{"type":"string","nullable":true},"created_at":{"format":"date-time","type":"string"},"last_updated_at":{"format":"date-time","type":"string","nullable":true},"workspace_guids":{"type":"array","items":{"type":"string"}},"workspace_roles":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceRole"}},"is_allowed_to_receive_notification":{"type":"boolean"},"user_type":{"allOf":[{"$ref":"#/components/schemas/UserType"}]},"is_agent":{"type":"boolean","nullable":false},"owner_id":{"type":"string","nullable":true}},"required":["user_guid","image_url","first_name","last_name","languages","voice_gender","created_by","created_at","last_updated_at","workspace_guids","workspace_roles","is_allowed_to_receive_notification","user_type","is_agent","owner_id"]},"PersonalNotesResponse":{"type":"object","properties":{"notes":{"type":"array","items":{"$ref":"#/components/schemas/PersonalNote"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"success":{"type":"boolean"},"error_message":{"type":"string","nullable":true}},"required":["notes","users","success","error_message"]},"MessageInteraction":{"type":"object","properties":{"user_id":{"type":"string"},"heard_ms":{"type":"number","format":"int64"},"is_notified":{"type":"boolean"},"reaction_ids":{"type":"array","items":{"type":"string"}}},"required":["user_id","heard_ms","is_notified","reaction_ids"]},"PreserveMessagesPayload":{"type":"object","properties":{"channel_id":{"type":"string"},"is_preserved":{"type":"boolean","description":"If true, all messages will be marked as preserved, if false, all messages won't be marked as preserved"},"message_ids":{"description":"Array of message ids to preserve or un-preserve","type":"array","items":{"type":"string"}}},"required":["channel_id","is_preserved","message_ids"]},"MessagePreserved":{"type":"object","properties":{"is_preserved":{"type":"boolean","description":"Indicates if message is marked as preserved or not"},"message_id":{"type":"string"}},"required":["is_preserved","message_id"]},"PreserveMessagesResponse":{"type":"object","properties":{"channel_id":{"type":"string"},"messages":{"description":"Array of messages with their preserved info","type":"array","items":{"$ref":"#/components/schemas/MessagePreserved"}}},"required":["channel_id","messages"]},"SetTaggedUsersDto":{"type":"object","properties":{"user_ids":{"description":"Full list of user IDs to tag on the message. Replaces the current list atomically. Maximum 100 entries.","example":["userId1","userId2"],"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["user_ids"]},"UserMessageStatisticModel":{"type":"object","properties":{"_id":{"type":"string"},"dmMessagesPerWeek":{"type":"array","items":{"type":"number"}},"nonDmMessagesPerWeek":{"type":"array","items":{"type":"number"}}},"required":["_id","dmMessagesPerWeek","nonDmMessagesPerWeek"]},"UtmData":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_term":{"type":"string"},"utm_content":{"type":"string"}}},"MessageKind":{"type":"string","enum":["audio","text","attachment","action-item","ai-prompt","ai-response","channel-reminder"]},"StartMessageWithForward":{"type":"object","properties":{"forwarded_message_id":{"type":"string","description":"Message ID that will be forwarded"},"end_access_at":{"format":"date-time","type":"string","description":"Date when the access to forwarded message ends","nullable":true}},"required":["forwarded_message_id"]},"StartChannelMessage":{"type":"object","properties":{"transcript":{"type":"string","nullable":true,"description":"The transcript if the client generated one, if is_text_message is true then this text will be used to generate andio using text-to-speech"},"is_text_message":{"type":"boolean","description":"If true the server will generate audio based on the transcript provided"},"unique_client_id":{"type":"string","description":"A unique id the client can use to identify the message, server will prevent duplicates using it"},"release_date":{"format":"date-time","type":"string","nullable":true,"description":"The date the message should be released (Not yet implemented)"},"utm_data":{"nullable":true,"description":"The utm tracking data for the message","allOf":[{"$ref":"#/components/schemas/UtmData"}]},"is_streaming":{"type":"boolean","description":"If the message is being streamed than notifications are sent to listeners at the begining of the message"},"announce_user":{"type":"boolean","nullable":true,"description":"Only used if is_text_message is true, prepends <first name said> to transcript before text-to-speech"},"voice":{"type":"string","nullable":true,"description":"the voice to use when doing text to speech"},"kind":{"allOf":[{"$ref":"#/components/schemas/MessageKind"}]},"channel_id":{"type":"string"},"workspace_guid":{"type":"string","nullable":true},"reply_to_message_id":{"type":"string","nullable":true},"createForward":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StartMessageWithForward"}]},"tagged_user_ids":{"description":"IDs of users to tag on this message at creation time","type":"array","items":{"type":"string"}}},"required":["is_text_message","unique_client_id","is_streaming","channel_id"]},"UserReaction":{"type":"object","properties":{"user_id":{"type":"string"},"reaction_id":{"type":"string"}},"required":["user_id","reaction_id"]},"TopUserEmoji":{"type":"object","properties":{"reaction":{"type":"string","description":"Canonical unicode emoji (e.g. ❤️, 🎉)"},"count":{"type":"number","description":"Authoritative total number of distinct users with this reaction (never capped)"},"user_ids":{"description":"A capped preview of users who reacted with this emoji — a sample, not the full list","type":"array","items":{"type":"string"}}},"required":["reaction","count","user_ids"]},"ReactionSummary":{"type":"object","properties":{"reaction_counts":{"type":"object","additionalProperties":{"type":"number"}},"top_user_reactions":{"type":"array","items":{"$ref":"#/components/schemas/UserReaction"}},"top_user_emojis":{"description":"Optional: summaries persisted before this field existed lack it — clients must tolerate absence.","type":"array","items":{"$ref":"#/components/schemas/TopUserEmoji"}}},"required":["reaction_counts","top_user_reactions"]},"AudioModelV2":{"type":"object","properties":{"_id":{"type":"string"},"url":{"type":"string"},"extension":{"type":"string","nullable":true},"streaming":{"type":"boolean"},"language":{"type":"string"},"duration_ms":{"type":"number"},"waveform_percentages":{"type":"array","items":{"type":"number"}},"is_original_audio":{"type":"boolean"}},"required":["_id","url","extension","streaming","language","duration_ms","waveform_percentages","is_original_audio"]},"TextModelType":{"type":"string","enum":["transcript","transcript_with_timecode","summary","topic","bullet_list"]},"TimedText":{"type":"object","properties":{"t":{"type":"string","description":"The text"},"s":{"type":"number","description":"The start time in ms","format":"int64"},"e":{"type":"number","description":"The end time in ms","format":"int64"}},"required":["t","s","e"]},"TextModel":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/TextModelType"}]},"audio_id":{"type":"string","nullable":true},"language_id":{"type":"string"},"value":{"type":"string"},"timecodes":{"type":"array","items":{"$ref":"#/components/schemas/TimedText"}}},"required":["type","audio_id","language_id","value","timecodes"]},"AudioDelivery":{"type":"string","enum":["recording","streaming"]},"UsersNotAllowedReceiveNotifications":{"type":"object","properties":{"user_id":{"type":"string"},"phone":{"type":"string"}},"required":["user_id","phone"]},"UsersNotAllowedReceiveNotificationsV2":{"type":"object","properties":{"user_id":{"type":"string"},"phone":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["user_id"]},"CaughtUpStatus":{"type":"string","enum":["all","some","none"],"description":"The number of users that listened to the audio or removed the notification"},"MessageType":{"type":"string","enum":["channel","prerecorded","voicememo","stored","welcome"],"description":"Message type"},"MessageV2":{"type":"object","properties":{"message_id":{"type":"string"},"creator_id":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string","nullable":true},"last_updated_at":{"format":"date-time","type":"string"},"workspace_ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}},"parent_message_id":{"type":"string","nullable":true},"heard_ms":{"type":"number","nullable":true,"description":"The number of ms of audio listened to by the user requesting the message","format":"int64"},"utm_data":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/UtmData"}]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"notes":{"type":"string"},"notify":{"type":"boolean","description":"Has the logged in user cleared the notification for this message"},"last_heard_update":{"format":"date-time","type":"string","nullable":false,"description":"Last time we listened/updated notify bit"},"reaction_summary":{"$ref":"#/components/schemas/ReactionSummary"},"name":{"type":"string","nullable":true},"is_text_message":{"type":"boolean"},"status":{"allOf":[{"$ref":"#/components/schemas/MessageStatus"}]},"label_ids":{"type":"array","items":{"type":"string"}},"audio_models":{"type":"array","items":{"$ref":"#/components/schemas/AudioModelV2"}},"text_models":{"type":"array","items":{"$ref":"#/components/schemas/TextModel"}},"source_message_id":{"type":"string","nullable":true},"cache_key":{"type":"string"},"audio_delivery":{"allOf":[{"$ref":"#/components/schemas/AudioDelivery"}]},"users_not_allowed_to_receive_notifications":{"type":"array","items":{"$ref":"#/components/schemas/UsersNotAllowedReceiveNotifications"}},"users_not_allowed_to_receive_notifications_v2":{"type":"array","items":{"$ref":"#/components/schemas/UsersNotAllowedReceiveNotificationsV2"}},"duration_ms":{"type":"number","description":"The length of the message in milliseconds","format":"int32"},"total_heard_ms":{"type":"number","description":"The number of ms of audio listened to by all users","format":"int64"},"notified_users":{"type":"number","description":"Then number of users who have a notification for this message and have not listened to the audio.","format":"int32"},"users_caught_up":{"description":"The number of users that listened to the audio or removed the notification","allOf":[{"$ref":"#/components/schemas/CaughtUpStatus"}]},"forward_id":{"type":"string","description":"The ID of a forwarded message (Deprecated, for new implementations we should start using share_link_id","nullable":true,"deprecated":true},"share_link_id":{"type":"string","description":"The ID of a Share Link to a message","nullable":true},"stream_key":{"type":"string","description":"The stream key used to add audio to the message","nullable":true},"socket_disconnects_while_streaming":{"type":"number","description":"The number of times the socket disconnected while the creator was sending audio","nullable":false,"default":0,"format":"int32"},"type":{"description":"Message type","nullable":true,"allOf":[{"$ref":"#/components/schemas/MessageType"}]},"channel_sequence":{"type":"number","description":"The sequencial id of the message within the channel","nullable":false,"format":"int32"},"last_heard_at":{"format":"date-time","type":"string","description":"The last time anyone listened or cleared notified on this message","nullable":false},"folder_id":{"type":"string","description":"Folder ID, only present when the message type is one of: voicememo,prerecorded","nullable":true},"tagged_user_ids":{"description":"IDs of users tagged in the message","type":"array","items":{"type":"string"}}},"required":["message_id","creator_id","created_at","last_updated_at","workspace_ids","channel_ids","attachments","notes","notify","last_heard_update","reaction_summary","is_text_message","status","label_ids","audio_models","text_models","source_message_id","cache_key","audio_delivery","duration_ms","total_heard_ms","notified_users","users_caught_up","socket_disconnects_while_streaming","type","channel_sequence","last_heard_at","tagged_user_ids"]},"TranslateMessages":{"type":"object","properties":{"message_ids":{"type":"array","items":{"type":"string"}},"language":{"type":"string"}},"required":["message_ids","language"]},"TranslationRequestParams":{"type":"object","properties":{"ids":{"nullable":false,"description":"List of message ids or message share ids.","type":"array","items":{"type":"string"}},"language":{"type":"string","nullable":false}},"required":["ids","language"]},"StreamKeyResponse":{"type":"object","properties":{"stream_key":{"type":"string"},"message_id":{"type":"string"},"message_status":{"type":"string"},"unique_client_id":{"type":"string"}},"required":["stream_key","message_id","message_status","unique_client_id"]},"GetMessagesByIdPayload":{"type":"object","properties":{"message_ids":{"description":"List of message ids to retrieve\nPS: Only possible request 500 messages each time","type":"array","items":{"type":"string"}}},"required":["message_ids"]},"MessagesByIdResponse":{"type":"object","properties":{"channel_id":{"type":"string"},"messages":{"description":"List of messages","type":"array","items":{"$ref":"#/components/schemas/MessageV2"}}},"required":["channel_id","messages"]},"GetListOfMessagesById":{"type":"object","properties":{"message_ids":{"description":"List of Message IDs, Max allowed is 500","type":"array","items":{"type":"string"}}},"required":["message_ids"]},"DeleteMessagesByIdPayload":{"type":"object","properties":{"message_ids":{"type":"array","items":{"type":"string"}}},"required":["message_ids"]},"Failed":{"type":"object","properties":{"message_id":{"type":"string"},"reason":{"type":"string"}},"required":["message_id","reason"]},"DeleteMessagesByIdResponse":{"type":"object","properties":{"success":{"type":"array","items":{"type":"string"}},"failed":{"type":"array","items":{"$ref":"#/components/schemas/Failed"}}}},"V5UtmDataPayload":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_term":{"type":"string"},"utm_content":{"type":"string"}}},"V5ForwardPayload":{"type":"object","properties":{"forwarded_message_id":{"type":"string","description":"ID of the message being forwarded"},"end_access_at":{"type":"string","description":"Optional moment when access to the forwarded message should expire","format":"date-time"}},"required":["forwarded_message_id"]},"V5TranscriptTimeCodePayload":{"type":"object","properties":{"words":{"type":"string"},"startMs":{"type":"number","format":"int32","minimum":0},"endMs":{"type":"number","format":"int32","minimum":0}},"required":["words","startMs","endMs"]},"V5RequestAttachmentPayload":{"type":"object","properties":{"type":{"description":"Attachment type","allOf":[{"$ref":"#/components/schemas/AttachmentType"}]},"link":{"type":"string","description":"URL or canonical link for the attachment"},"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key for this attachment row. Maps to legacy attachment client_id.","format":"uuid"},"filename":{"type":"string"},"mime_type":{"type":"string"},"length_in_bytes":{"type":"number","format":"int64","minimum":0},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AttachmentStatus"}]},"created_at":{"format":"date-time","type":"string","nullable":true},"percent_complete":{"type":"number","format":"int32","minimum":0,"maximum":100,"nullable":true}},"required":["type","link"]},"CreateConversationAudioV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"conversation_id":{"type":"string","description":"Conversation (legacy `channel_id`). Required in the JSON body for every `/v5/messages/*` route."},"utm_data":{"description":"Optional UTM tracking data. Only valid on `/v5/messages/*` routes.","allOf":[{"$ref":"#/components/schemas/V5UtmDataPayload"}]},"reply_to_message_id":{"type":"string","description":"ID of the message being replied to; backend resolves the thread root automatically"},"forward":{"$ref":"#/components/schemas/V5ForwardPayload"},"tagged_user_ids":{"description":"IDs of users to tag on this message at creation time","type":"array","items":{"type":"string"}},"duration":{"type":"number","description":"Optional client-measured audio duration in milliseconds. Server derives one if omitted.","format":"int32","minimum":0},"transcript_timecodes":{"description":"Optional word-level transcript time codes. Server defaults to `[]` when omitted.","type":"array","items":{"$ref":"#/components/schemas/V5TranscriptTimeCodePayload"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["conversation_id"]},"CreateVoicememoAudioV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"workspace_id":{"type":"string","description":"Optional workspace target. When omitted, server falls back to the legacy default (personal workspace)."},"folder_id":{"type":"string","description":"Optional folder target. When omitted, server keeps the legacy fallback behavior."},"duration":{"type":"number","description":"Optional client-measured audio duration in milliseconds. Server derives one if omitted.","format":"int32","minimum":0},"transcript_timecodes":{"description":"Optional word-level transcript time codes. Server defaults to `[]` when omitted.","type":"array","items":{"$ref":"#/components/schemas/V5TranscriptTimeCodePayload"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}}},"CompleteMessageV6Payload":{"type":"object","properties":{"message_id":{"type":"string","description":"ID of the message returned by the start route"},"attachments":{"description":"Attachments to add to the message","type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["message_id"]},"GetMessagesByIdsV5Payload":{"type":"object","properties":{"conversation_id":{"type":"string","description":"Conversation (channel) ID. When set, the user must have access to this conversation and only its messages are returned. When omitted, messages may come from any conversation (or be voice memos) and each is checked on its own; messages the user cannot access, or that do not exist, are left out.","example":"507f1f77bcf86cd799439011"},"message_ids":{"description":"List of message IDs to fetch. Results keep this order; ids that are not returned are simply absent.","example":["507f1f77bcf86cd799439012","507f1f77bcf86cd799439013"],"maxItems":500,"type":"array","items":{"type":"string"}},"language":{"type":"string","description":"Language for message content (e.g. transcript, audio). Original language used if not provided."},"presigned_url":{"type":"boolean","description":"Include presigned URLs for audio files (default: false)","default":false},"fresh":{"type":"boolean","description":"Bypass cache and fetch fresh data (default: false)","default":false}},"required":["message_ids"]},"AttachmentV6":{"type":"object","properties":{"presigned_url":{"type":"string","description":"Presigned URL for direct S3 access","nullable":true},"presigned_url_expiration_date":{"type":"string","description":"Expiration date for the presigned URL","format":"date-time","nullable":true},"id":{"type":"string","description":"Attachment ID"},"idempotency_key":{"type":"string","description":"Optional attachment-level idempotency key. Surfaced when the underlying attachment was created with a client-supplied `idempotency_key` (legacy `client_id`).","nullable":true},"creator_id":{"type":"string","description":"Creator ID"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"type":{"description":"Attachment type","allOf":[{"$ref":"#/components/schemas/AttachmentType"}]},"url":{"type":"string","description":"URL/Link to the attachment"},"filename":{"type":"string","description":"Filename of the attachment","nullable":true},"mime_type":{"type":"string","description":"MIME type of the attachment","nullable":true},"length_in_bytes":{"type":"number","description":"Size of the attachment in bytes","format":"int64","nullable":true},"status":{"description":"Upload lifecycle status of the attachment. Surfaced when the underlying attachment row carries one.","nullable":true,"allOf":[{"$ref":"#/components/schemas/AttachmentStatus"}]},"percent_complete":{"type":"number","description":"Upload progress percentage (0-100) for the attachment. Surfaced when the underlying attachment row carries one.","format":"int32","minimum":0,"maximum":100,"nullable":true},"latitude":{"type":"number","description":"Latitude of a location attachment","format":"double","nullable":true},"longitude":{"type":"number","description":"Longitude of a location attachment","format":"double","nullable":true}},"required":["id","creator_id","created_at","type","url"]},"MessageAIResponse":{"type":"object","properties":{"id":{"type":"string","description":"AI Response ID"},"prompt_id":{"type":"string","description":"Prompt ID"}},"required":["id","prompt_id"]},"UtmDataV5":{"type":"object","properties":{"utm_source":{"type":"string","description":"UTM source parameter","nullable":true},"utm_medium":{"type":"string","description":"UTM medium parameter","nullable":true},"utm_campaign":{"type":"string","description":"UTM campaign parameter","nullable":true},"utm_content":{"type":"string","description":"UTM content parameter","nullable":true},"utm_term":{"type":"string","description":"UTM term parameter","nullable":true}}},"MessageTimeCode":{"type":"object","properties":{"t":{"type":"string","description":"Text/word for the time code"},"s":{"type":"number","description":"Start time in milliseconds","format":"int64"},"e":{"type":"number","description":"End time in milliseconds","format":"int64"}},"required":["t","s","e"]},"MessageContentV6":{"type":"object","properties":{"presigned_url":{"type":"string","description":"Presigned URL for direct S3 access","nullable":true},"presigned_url_expiration_date":{"type":"string","description":"Expiration date for the presigned URL","format":"date-time","nullable":true},"id":{"type":"string","description":"The audio id of this rendition. Send it back as `content_id` to update it (e.g. `PUT /v6/messages/transcript`). Omitted when the message has no audio yet."},"ai_summary":{"type":"string","description":"AI summary of the message in this language","nullable":true},"transcript":{"type":"string","description":"Transcript of the message in this language","nullable":true},"time_codes":{"description":"Word-level time codes for this rendition","type":"array","items":{"$ref":"#/components/schemas/MessageTimeCode"}},"is_original_language":{"type":"boolean","description":"Whether this rendition is the language the message was recorded in","nullable":true},"language":{"type":"string","description":"Language of this rendition (transcript, AI summary, audio)","nullable":true},"url":{"type":"string","description":"URL to the audio file","nullable":true},"streaming_url":{"type":"string","description":"URL to the streaming audio file","nullable":true},"duration_ms":{"type":"number","description":"Duration of the audio in milliseconds","format":"int64","nullable":true},"waveform_percentage":{"type":"string","description":"Waveform amplitudes encoded as a compact string: one base-36 character per bar (`0` = silence .. `z` = full scale), at most 96 bars. Decode each character with `parseInt(ch, 36) / 35`. Omitted when the rendition has no waveform.","nullable":true}}},"MessageCaughtUpStatus":{"type":"string","enum":["all","some","none"],"description":"Users caught up status for the message"},"UserReactionV5":{"type":"object","properties":{"user_id":{"type":"string","description":"User ID"},"reaction_id":{"type":"string","description":"Reaction ID"}},"required":["user_id","reaction_id"]},"TopUserEmojiV6":{"type":"object","properties":{"reaction":{"type":"string","description":"Canonical unicode emoji (e.g. ❤️, 🎉)"},"count":{"type":"number","description":"Total number of distinct users with this reaction (never capped)","format":"int32"},"user_ids":{"description":"A capped preview of the users who reacted with this emoji, not the full list","type":"array","items":{"type":"string"}}},"required":["reaction","count","user_ids"]},"ReactionSummaryV6":{"type":"object","properties":{"reaction_counts":{"type":"object","description":"Reaction counts by reaction ID","additionalProperties":{"type":"number"}},"top_user_reactions":{"description":"Top user reactions","type":"array","items":{"$ref":"#/components/schemas/UserReactionV5"}},"top_user_emojis":{"description":"Every reaction (curated as its canonical emoji, plus arbitrary emoji), grouped per emoji. Authoritative when present, even when empty; absent only on summaries persisted before the field existed, in which case fall back to `top_user_reactions`.","type":"array","items":{"$ref":"#/components/schemas/TopUserEmojiV6"}}},"required":["reaction_counts","top_user_reactions"]},"UserNotAllowedReceiveNotification":{"type":"object","properties":{"user_id":{"type":"string","description":"User ID"},"phone":{"type":"string","description":"Phone number","nullable":true},"email":{"type":"string","description":"Email address","nullable":true}},"required":["user_id"]},"MessageSource":{"type":"string","enum":["email_ingestion","reminder_user_id"],"description":"Where the message came from, when it was not recorded in the app"},"MessageV6":{"type":"object","properties":{"id":{"type":"string","description":"Message ID"},"type":{"description":"Type of the Message","allOf":[{"$ref":"#/components/schemas/MessageType"}]},"kind":{"description":"Kind of the Message. Messages stored before the field existed report `text` when they were text-to-speech, otherwise `audio`.","allOf":[{"$ref":"#/components/schemas/MessageKind"}]},"name":{"type":"string","description":"User-assigned name (title) of the message. Omitted when the message has none."},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","description":"Last update timestamp"},"deleted_at":{"type":"string","format":"date-time","description":"Deletion timestamp"},"conversation_id":{"type":"string","description":"Conversation ID"},"workspace_id":{"type":"string","description":"Workspace ID"},"creator_id":{"type":"string","description":"Creator ID"},"status":{"description":"Current status of the Message","allOf":[{"$ref":"#/components/schemas/MessageStatus"}]},"audio_delivery":{"description":"How the audio reaches listeners: `streaming` is broadcast live while it is recorded, `recording` is delivered only once the recording is complete. Messages stored before the field existed report `streaming`.","allOf":[{"$ref":"#/components/schemas/AudioDelivery"}]},"thread_id":{"type":"string","description":"ID of the thread this message belongs to: the parent message id for a reply, or the message's own id when it is not a reply. A message is a reply exactly when `thread_id !== id`."},"idempotency_key":{"type":"string","description":"Optional canonical idempotency key surfaced when the underlying message data carries one. Not guaranteed to be present on every message."},"attachments":{"description":"List of attachments for the message","type":"array","items":{"$ref":"#/components/schemas/AttachmentV6"}},"available_languages":{"description":"List of available languages for the message","type":"array","items":{"type":"string"}},"original_language":{"type":"string","description":"The language the message was recorded in"},"ai_response_ids":{"description":"List of AI response IDs associated with the message","type":"array","items":{"$ref":"#/components/schemas/MessageAIResponse"}},"share_link_id":{"type":"string","description":"Share Link ID to a message"},"link":{"type":"string","description":"Link to Message"},"folder_id":{"type":"string","description":"Folder ID where the message is stored"},"utm_data":{"description":"UTM tracking data","allOf":[{"$ref":"#/components/schemas/UtmDataV5"}]},"conversation_sequence":{"type":"number","description":"Sequence number of the message in the conversation","format":"int32"},"source_message_id":{"type":"string","description":"Source message ID if this is a forwarded message"},"content":{"description":"Audio and text content in the requested language (falling back to the original). Omitted while the message has neither audio nor text, and on `GET /v6/messages/updates` with `include_unchanged_content=false` when the content has not changed since the sync began (keep the copy already held).","allOf":[{"$ref":"#/components/schemas/MessageContentV6"}]},"users_caught_up":{"description":"Users caught up status for the message","allOf":[{"$ref":"#/components/schemas/MessageCaughtUpStatus"}]},"reaction_summary":{"description":"Reaction summary for the message","allOf":[{"$ref":"#/components/schemas/ReactionSummaryV6"}]},"users_not_allowed_to_receive_notifications":{"description":"Users not allowed to receive notifications for this message","type":"array","items":{"$ref":"#/components/schemas/UserNotAllowedReceiveNotification"}},"source":{"description":"Where the message came from, when it was not recorded in the app","allOf":[{"$ref":"#/components/schemas/MessageSource"}]},"source_value":{"type":"string","description":"Source-specific value (e.g. the ingested email address)"},"tagged_user_ids":{"description":"IDs of users tagged in the message","type":"array","items":{"type":"string"}},"heard_ms":{"type":"number","format":"int64","description":"How far the requesting user has listened, in milliseconds. Only present when the message was read on behalf of a user."},"label_ids":{"description":"Label IDs the requesting user applied to the message. Only present when the message was read on behalf of a user.","type":"array","items":{"type":"string"}},"notify":{"type":"boolean","description":"Whether the message is still in the requesting user's notifications (unheard). Only present when the message was read on behalf of a user."},"notes":{"type":"string","description":"Private notes the requesting user attached to the message. Only present when the message was read on behalf of a user."},"last_heard_update":{"type":"string","format":"date-time","description":"Last time the requesting user's listen state or notes for this message changed. Only present when the message was read on behalf of a user."}},"required":["id","type","kind","created_at","updated_at","workspace_id","creator_id","status","audio_delivery","thread_id","link","tagged_user_ids"]},"MessagesResponseV6":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageV6"}},"has_more":{"type":"boolean","description":"True when more messages remain beyond this page. When false, the client has reached the end of the result set for this direction."},"next_cursor":{"type":"string","nullable":true,"description":"Opaque cursor marking where this page ended. While `has_more` is true, pass it back as `cursor` (same `direction`) to fetch the next page; it pages strictly, with no overlap. With `direction=newer` it is also returned on the final page (`has_more` false) and echoed back by an empty page reached via a cursor: that one marks the newest message seen. Store it and send it as `cursor` with `direction=newer` on a later sync to receive what was created or changed since. While the boundary is recent it is a resume cursor and may also re-deliver up to 4s of already-seen messages behind that boundary, so de-duplicate by `id`. Once the boundary has settled it pages strictly, so a quiet feed returns empty pages. With `direction=older` it only continues the backfill and is null once `has_more` is false. Null on an empty first page (anchored by `date`); anchor by `date` again."}},"required":["data","has_more"]},"MessagesBySequenceV6Response":{"type":"object","properties":{"data":{"description":"The messages holding a sequence in the range, ascending by sequence. Sequences with no message (or, with `notified`, none the user was notified about) are skipped.","type":"array","items":{"$ref":"#/components/schemas/MessageV6"}}},"required":["data"]},"GetMessageResponseV6":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageV6"}},"required":["message"]},"SaveMessageToVoiceMemoPayload":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID - Required if folder_id is not provided"},"folder_id":{"type":"string","description":"Folder ID - Required if workspace_id is not provided"}}},"CreateConversationTextV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"conversation_id":{"type":"string","description":"Conversation (legacy `channel_id`). Required in the JSON body for every `/v5/messages/*` route."},"utm_data":{"description":"Optional UTM tracking data. Only valid on `/v5/messages/*` routes.","allOf":[{"$ref":"#/components/schemas/V5UtmDataPayload"}]},"reply_to_message_id":{"type":"string","description":"ID of the message being replied to; backend resolves the thread root automatically"},"forward":{"$ref":"#/components/schemas/V5ForwardPayload"},"tagged_user_ids":{"description":"IDs of users to tag on this message at creation time","type":"array","items":{"type":"string"}},"transcript":{"type":"string","description":"Non-empty user-authored text transcript.","maxLength":5000},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["conversation_id","transcript"]},"CreateConversationAttachmentV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"conversation_id":{"type":"string","description":"Conversation (legacy `channel_id`). Required in the JSON body for every `/v5/messages/*` route."},"utm_data":{"description":"Optional UTM tracking data. Only valid on `/v5/messages/*` routes.","allOf":[{"$ref":"#/components/schemas/V5UtmDataPayload"}]},"reply_to_message_id":{"type":"string","description":"ID of the message being replied to; backend resolves the thread root automatically"},"forward":{"$ref":"#/components/schemas/V5ForwardPayload"},"tagged_user_ids":{"description":"IDs of users to tag on this message at creation time","type":"array","items":{"type":"string"}},"attachments":{"description":"One or more attachment rows. Required for this route.","type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["conversation_id","attachments"]},"CreateConversationStreamV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"conversation_id":{"type":"string","description":"Conversation (legacy `channel_id`). Required in the JSON body for every `/v5/messages/*` route."},"utm_data":{"description":"Optional UTM tracking data. Only valid on `/v5/messages/*` routes.","allOf":[{"$ref":"#/components/schemas/V5UtmDataPayload"}]},"reply_to_message_id":{"type":"string","description":"ID of the message being replied to; backend resolves the thread root automatically"},"forward":{"$ref":"#/components/schemas/V5ForwardPayload"},"tagged_user_ids":{"description":"IDs of users to tag on this message at creation time","type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["conversation_id"]},"CreateStreamMessageV6Response":{"type":"object","properties":{"message":{"description":"Started message in v6 shape.","allOf":[{"$ref":"#/components/schemas/MessageV6"}]},"stream_key":{"type":"string","description":"Signed key the client must use to authenticate the websocket audio upload session for this message."}},"required":["message","stream_key"]},"CreateVoicememoTextV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"workspace_id":{"type":"string","description":"Optional workspace target. When omitted, server falls back to the legacy default (personal workspace)."},"folder_id":{"type":"string","description":"Optional folder target. When omitted, server keeps the legacy fallback behavior."},"transcript":{"type":"string","description":"Non-empty user-authored text transcript.","maxLength":5000},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["transcript"]},"CreateVoicememoAttachmentV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"workspace_id":{"type":"string","description":"Optional workspace target. When omitted, server falls back to the legacy default (personal workspace)."},"folder_id":{"type":"string","description":"Optional folder target. When omitted, server keeps the legacy fallback behavior."},"attachments":{"description":"One or more attachment rows. Required for this route.","type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}},"required":["attachments"]},"CreateVoicememoStreamV5Payload":{"type":"object","properties":{"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. When the key is reused for the same user the server returns the existing message instead of failing.","format":"uuid"},"workspace_id":{"type":"string","description":"Optional workspace target. When omitted, server falls back to the legacy default (personal workspace)."},"folder_id":{"type":"string","description":"Optional folder target. When omitted, server keeps the legacy fallback behavior."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/V5RequestAttachmentPayload"}}}},"MessageInteractionsV6Response":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageV6"},"interactions":{"description":"Per-user listen, notification and reaction state. Empty for a channel-less message unless you created it.","type":"array","items":{"$ref":"#/components/schemas/MessageInteraction"}}},"required":["message","interactions"]},"UserIdentity":{"type":"object","properties":{"user_guid":{"type":"string"},"provider_email":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"provider_uid":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"is_verified":{"type":"string"},"provider_phone":{"type":"string","nullable":true}},"required":["user_guid","is_verified"]},"ProfileEntryGroup":{"type":"string","enum":["CALLME","EMAILME","OTHER","VIDEOME","MESSAGEME","SCHEDULEME","COLLABORATE","PAYME"]},"UserEntryDto":{"type":"object","properties":{"entry_guid":{"type":"string"},"group_cd":{"allOf":[{"$ref":"#/components/schemas/ProfileEntryGroup"}]},"type_cd":{"type":"string"},"label_txt":{"type":"string"},"value_txt":{"type":"string"},"also_supports_mask":{"type":"number","format":"int32"}},"required":["entry_guid","group_cd","type_cd","label_txt","value_txt","also_supports_mask"]},"NotifyByMethods":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"push":{"type":"boolean"}}},"NotifyBy":{"type":"object","properties":{"DAILY_DIGEST":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"CONV_ADDED_NAMED":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"MSG_NEW":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"EMOTICON_RSP":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"MEET_NEW":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"MEET_UPDATE_CREATOR":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"MEET_UPDATE_MEMBER":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"MEET_ENDED":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"MEET_JOINED":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"WS_INVITE":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"WS_JOINED":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"WS_ADDED":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"ACTION_ITEM_ASSIGNED_TO_ME":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"ACTION_ITEM_DONE":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]},"CHANNEL_REMINDER":{"description":"Get Notification by","allOf":[{"$ref":"#/components/schemas/NotifyByMethods"}]}}},"ConversationSettings":{"type":"object","properties":{"channel_id":{"type":"string","description":"Channel ID"},"state":{"type":"string","enum":["normal","muted"],"description":"Notification State"},"sound_standard":{"type":"string","description":"Standard Message Sound","nullable":true},"sound_urgent":{"type":"string","description":"Urgent Message Sound","nullable":true},"sound_reply":{"type":"string","description":"Reply Message Sound","nullable":true}},"required":["channel_id","state"]},"NotificationSettings":{"type":"object","properties":{"notify_by":{"description":"List of actions to be notified","allOf":[{"$ref":"#/components/schemas/NotifyBy"}]},"primary_notification_email":{"type":"string","description":"Primary email notification (Will be used to send notifications)"},"primary_notification_phone":{"type":"string","description":"Primary sms notification (Will be used to send notifications)"},"product_notification_email":{"type":"string","description":"Primary Product email notification (Will be used to send product notifications)"},"conversation_settings":{"description":"Conversation Settings","type":"array","items":{"$ref":"#/components/schemas/ConversationSettings"}}},"required":["notify_by"]},"UserEnvironment":{"type":"object","properties":{"name":{"type":"string"},"apiUrl":{"type":"string"},"wsUrl":{"type":"string"}},"required":["name","apiUrl","wsUrl"]},"TTSMode":{"type":"string","enum":["cloned_voice","standard","premium"]},"TranslationMode":{"type":"string","enum":["not_specified","none","tts","dubbing"]},"LifecycleEventType":{"type":"string","enum":["Login","UsedDiscussionLink","IdentityAddded","CreatedPlaylist","CreatedWorkspace","CreatedPersonalCarbonLink","NotifiedMessageAccess","VoiceMemoCreated","ConversationMessageCreated","DowngradedToLowerPlan","AIResponseGenerated","JoinedConversation","JoinedWorkspace","PersonalizedTTS","DownloadedApp","CheckedUsers","SetPhoto","InvitedUser","WatchedGestureGuide","WatchedWelcomeVideo"]},"LifecycleEvent":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/LifecycleEventType"}]},"times":{"type":"number"}},"required":["type","times"]},"UserDto":{"type":"object","properties":{"user_guid":{"type":"string"},"uuid":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string"},"created_by":{"type":"string","nullable":true},"role":{"type":"string","nullable":true},"created_ts":{"type":"number","format":"int64"},"last_updated_ts":{"type":"number","format":"int64"},"last_seen_ts":{"type":"number","format":"int64"},"timezone_offset_minutes":{"type":"number","format":"int64"},"is_verified":{"type":"string"},"is_allowed_through_gate":{"type":"boolean"},"phone_txt":{"type":"string","nullable":true},"email_txt":{"type":"string","nullable":true},"workspace_guids":{"type":"array","items":{"type":"string"}},"identities":{"type":"array","items":{"$ref":"#/components/schemas/UserIdentity"}},"settings":{"type":"object","additionalProperties":{"type":"string"}},"entries":{"type":"array","items":{"$ref":"#/components/schemas/UserEntryDto"}},"last_seen_on":{"format":"date-time","type":"string","nullable":true},"plan_type":{"type":"string"},"notification_settings":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/NotificationSettings"}]},"environments":{"type":"array","items":{"$ref":"#/components/schemas/UserEnvironment"}},"languages":{"type":"array","items":{"type":"string"}},"voice_gender":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Gender"}]},"voice_id":{"type":"string","nullable":true},"has_fcm_token":{"type":"boolean"},"tts_mode":{"allOf":[{"$ref":"#/components/schemas/TTSMode"}]},"translation_mode":{"allOf":[{"$ref":"#/components/schemas/TranslationMode"}]},"preserve_senders_voice":{"type":"boolean","nullable":false},"lifecycle_events":{"type":"array","items":{"$ref":"#/components/schemas/LifecycleEvent"}},"user_type":{"allOf":[{"$ref":"#/components/schemas/UserType"}]},"is_agent":{"type":"boolean","nullable":false},"owner_id":{"type":"string","nullable":true}},"required":["user_guid","uuid","image_url","created_ts","last_updated_ts","last_seen_ts","timezone_offset_minutes","is_verified","is_allowed_through_gate","workspace_guids","identities","settings","entries","plan_type","environments","languages","has_fcm_token","tts_mode","translation_mode","preserve_senders_voice","lifecycle_events","user_type","is_agent","owner_id"]},"UnverifiedMessagesV6Response":{"type":"object","properties":{"success":{"type":"boolean"},"user":{"$ref":"#/components/schemas/UserDto"},"identities":{"type":"array","items":{"$ref":"#/components/schemas/UserIdentity"}},"potential_identities":{"type":"array","items":{"$ref":"#/components/schemas/UserIdentity"}},"potential_messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageV6"}}},"required":["success","user","identities","potential_identities","potential_messages"]},"SetMessageName":{"type":"object","properties":{"message_id":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["message_id"]},"UpdateMessageTranscriptV6Payload":{"type":"object","properties":{"message_id":{"type":"string"},"content_id":{"type":"string","description":"The `content.id` of the content whose transcript is replaced."},"words":{"type":"array","items":{"$ref":"#/components/schemas/WordsWithTimeCode"}}},"required":["message_id","content_id","words"]},"UpdateMessageSummary":{"type":"object","properties":{"message_guid":{"type":"string"},"workspace_guid":{"type":"string"},"text":{"type":"string"}},"required":["message_guid","workspace_guid","text"]},"TranslateMessagesV6Payload":{"type":"object","properties":{"ids":{"description":"Message ids or message share-link ids. A share-link id translates the message it shares. At most 100.","type":"array","items":{"type":"string"}},"language":{"type":"string","description":"Target language id, e.g. `spanish`."}},"required":["ids","language"]},"UserMessageStatisticV6":{"type":"object","properties":{"user_id":{"type":"string"},"dm_messages_per_week":{"description":"Messages the user sent in direct messages shared with the other user, one entry per week for the last 12 weeks, oldest first.","type":"array","items":{"type":"number"}},"non_dm_messages_per_week":{"description":"Messages the user sent in the other shared conversations, one entry per week for the last 12 weeks, oldest first.","type":"array","items":{"type":"number"}}},"required":["user_id","dm_messages_per_week","non_dm_messages_per_week"]},"UserMessageStatisticsV6Response":{"type":"object","properties":{"data":{"description":"One entry per user (the requested user, then you) who sent a message in a shared conversation during the window; empty when you share no conversation.","type":"array","items":{"$ref":"#/components/schemas/UserMessageStatisticV6"}}},"required":["data"]},"StartPrerecordedMessage":{"type":"object","properties":{"transcript":{"type":"string","nullable":true,"description":"The transcript if the client generated one, if is_text_message is true then this text will be used to generate andio using text-to-speech"},"is_text_message":{"type":"boolean","description":"If true the server will generate audio based on the transcript provided"},"unique_client_id":{"type":"string","description":"A unique id the client can use to identify the message, server will prevent duplicates using it"},"release_date":{"format":"date-time","type":"string","nullable":true,"description":"The date the message should be released (Not yet implemented)"},"utm_data":{"nullable":true,"description":"The utm tracking data for the message","allOf":[{"$ref":"#/components/schemas/UtmData"}]},"is_streaming":{"type":"boolean","description":"If the message is being streamed than notifications are sent to listeners at the begining of the message"},"announce_user":{"type":"boolean","nullable":true,"description":"Only used if is_text_message is true, prepends <first name said> to transcript before text-to-speech"},"voice":{"type":"string","nullable":true,"description":"the voice to use when doing text to speech"},"kind":{"allOf":[{"$ref":"#/components/schemas/MessageKind"}]},"name":{"type":"string"},"folder_id":{"type":"string","description":"Folder ID (not allowed when workspace_id specified is different from the folder_id)"},"workspace_id":{"type":"string","description":"Workspace ID (not allowed when folder_id specified is different from the folder_id)"}},"required":["is_text_message","unique_client_id","is_streaming","name"]},"StartMessage":{"type":"object","properties":{"transcript":{"type":"string","nullable":true,"description":"The transcript if the client generated one, if is_text_message is true then this text will be used to generate andio using text-to-speech"},"is_text_message":{"type":"boolean","description":"If true the server will generate audio based on the transcript provided"},"unique_client_id":{"type":"string","description":"A unique id the client can use to identify the message, server will prevent duplicates using it"},"release_date":{"format":"date-time","type":"string","nullable":true,"description":"The date the message should be released (Not yet implemented)"},"utm_data":{"nullable":true,"description":"The utm tracking data for the message","allOf":[{"$ref":"#/components/schemas/UtmData"}]},"is_streaming":{"type":"boolean","description":"If the message is being streamed than notifications are sent to listeners at the begining of the message"},"announce_user":{"type":"boolean","nullable":true,"description":"Only used if is_text_message is true, prepends <first name said> to transcript before text-to-speech"},"voice":{"type":"string","nullable":true,"description":"the voice to use when doing text to speech"},"kind":{"allOf":[{"$ref":"#/components/schemas/MessageKind"}]}},"required":["is_text_message","unique_client_id","is_streaming"]},"StartWelcomeMessage":{"type":"object","properties":{"transcript":{"type":"string","nullable":true,"description":"The transcript if the client generated one, if is_text_message is true then this text will be used to generate andio using text-to-speech"},"is_text_message":{"type":"boolean","description":"If true the server will generate audio based on the transcript provided"},"unique_client_id":{"type":"string","description":"A unique id the client can use to identify the message, server will prevent duplicates using it"},"release_date":{"format":"date-time","type":"string","nullable":true,"description":"The date the message should be released (Not yet implemented)"},"utm_data":{"nullable":true,"description":"The utm tracking data for the message","allOf":[{"$ref":"#/components/schemas/UtmData"}]},"is_streaming":{"type":"boolean","description":"If the message is being streamed than notifications are sent to listeners at the begining of the message"},"announce_user":{"type":"boolean","nullable":true,"description":"Only used if is_text_message is true, prepends <first name said> to transcript before text-to-speech"},"voice":{"type":"string","nullable":true,"description":"the voice to use when doing text to speech"},"kind":{"allOf":[{"$ref":"#/components/schemas/MessageKind"}]},"workspace_id":{"type":"string"},"is_voicemail":{"type":"boolean"}},"required":["is_text_message","unique_client_id","is_streaming","workspace_id","is_voicemail"]},"CreatePrerecordedMessage":{"type":"object","properties":{"message_id":{"type":"string"},"name":{"type":"string","nullable":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/RequestAttachment"}}},"required":["message_id","attachments"]},"ExportedMessage":{"type":"object","properties":{"id":{"type":"string"},"creator_id":{"type":"string"},"creator_first_name":{"type":"string"},"creator_last_name":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"transcription":{"type":"string"},"summary":{"type":"string"},"parent_id":{"type":"string"}},"required":["id","creator_id","creator_first_name","creator_last_name","created_at","transcription","summary","parent_id"]},"DerviedConversationSourceType":{"type":"string","enum":["user_id","channel_id","workspace_id","message_id","share_link_id"]},"ChannelKind":{"type":"string","enum":["standard","derived"]},"UserMembershipStatus":{"type":"string","enum":["active","user_left","removed_from_channel","removed_from_workspace"]},"ChannelCollaborator":{"type":"object","properties":{"user_guid":{"type":"string"},"image_url":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"permission":{"allOf":[{"$ref":"#/components/schemas/Role"}]},"joined":{"format":"date-time","type":"string","nullable":true},"last_posted":{"format":"date-time","type":"string","nullable":true},"first_accessed_at":{"format":"date-time","type":"string","nullable":true},"last_viewed_at":{"format":"date-time","type":"string","nullable":true},"status":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/UserMembershipStatus"}]},"primary_language":{"type":"string"}},"required":["user_guid","image_url","first_name","last_name","permission","first_accessed_at","last_viewed_at"]},"ChannelType":{"type":"string","enum":["directMessage","customerConversation","namedConversation","asyncMeeting"]},"AvatarGridItemType":{"type":"string","enum":["row","column","image","text"]},"AvatarGridItem":{"type":"object","properties":{"children":{"type":"array","items":{"$ref":"#/components/schemas/AvatarGridItem"}},"type":{"allOf":[{"$ref":"#/components/schemas/AvatarGridItemType"}]},"image_url":{"type":"string","nullable":true},"text":{"type":"string","nullable":true}},"required":["children","type"]},"AvatarLayout":{"type":"object","properties":{"avatars":{"type":"array","items":{"$ref":"#/components/schemas/AvatarGridItem"}},"numRows":{"type":"number","format":"int32"},"numColumns":{"type":"number","format":"int32"}},"required":["avatars","numRows","numColumns"]},"ChannelSpanType":{"type":"string","enum":["Meeting","RecurringMeeting"]},"PersonalizedChannelSpan":{"type":"object","properties":{"id":{"type":"string"},"begin":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":"string","nullable":true},"required_users":{"type":"array","items":{"type":"string"}},"type":{"allOf":[{"$ref":"#/components/schemas/ChannelSpanType"}]},"topic":{"type":"string"}},"required":["id","begin","end","deleted_at","required_users","type","topic"]},"ChannelVisibility":{"type":"string","enum":["private","workspace","public"]},"ConversationSummaryItemType":{"type":"string","enum":["takeaway","question","answer","comment","note","task","action-item"]},"ConversationSummaryItem":{"type":"object","properties":{"user_id":{"type":"string"},"text":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ConversationSummaryItemType"}]}},"required":["user_id","text","type"]},"ConversationSummary":{"type":"object","properties":{"channel_id":{"type":"string"},"span_id":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSummaryItem"}}},"required":["channel_id","span_id","items"]},"AsyncMeetingStats":{"type":"object","properties":{"total_duration_milliseconds":{"type":"number","description":"Total duration in milliseconds","format":"int64"},"total_heard_milliseconds":{"type":"number","description":"Total heard in milliseconds","format":"int64"},"total_engaged_percentage":{"type":"number","description":"Total engaged percentage","format":"int64"},"total_messages_posted":{"type":"number","description":"Total messages posted","format":"int64"},"total_users":{"type":"number","format":"int64","description":"Total users"}},"required":["total_duration_milliseconds","total_heard_milliseconds","total_engaged_percentage","total_messages_posted","total_users"]},"UserStats":{"type":"object","properties":{"user_id":{"type":"string","description":"User unique ID"},"total_messages_posted":{"type":"number","description":"Total messages posted","format":"int64"},"total_sent_milliseconds":{"type":"number","description":"Total sent in milliseconds","format":"int64"},"total_heard_milliseconds":{"type":"number","description":"Total heard in milliseconds","format":"int64"},"total_engaged_percentage":{"type":"number","description":"Total engaged percentage","format":"int64"},"total_heard_messages":{"type":"number","format":"int64","description":"Total heard messages"},"total_unheard_messages":{"type":"number","format":"int64","description":"Total unheard messages"}},"required":["user_id","total_messages_posted","total_sent_milliseconds","total_heard_milliseconds","total_engaged_percentage","total_heard_messages","total_unheard_messages"]},"AsyncMeetingStatsApiResponse":{"type":"object","properties":{"channel_stats":{"$ref":"#/components/schemas/AsyncMeetingStats"},"user_stats":{"type":"array","items":{"$ref":"#/components/schemas/UserStats"}}},"required":["channel_stats","user_stats"]},"DerviedConversationSource":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/DerviedConversationSourceType"}]},"value":{"type":"string"}},"required":["type","value"]},"PersonalizedChannel":{"type":"object","properties":{"workspace_guid":{"type":"string"},"channel_guid":{"type":"string"},"channel_name":{"type":"string"},"channel_kind":{"allOf":[{"$ref":"#/components/schemas/ChannelKind"}]},"source_channel_ids":{"type":"array","items":{"type":"string"}},"channel_description":{"type":"string","nullable":true},"bg_rrggbb":{"type":"string","nullable":true},"txt_rrggbb":{"type":"string","nullable":true},"channel_settings":{"type":"string"},"image_url":{"type":"string","nullable":true},"is_private":{"type":"string"},"post_rule":{"type":"string","nullable":true},"dm_hash":{"type":"string","nullable":true},"last_updated_ts":{"type":"number"},"sort_order":{"format":"date-time","type":"string"},"created_ts":{"type":"number"},"deleted_at":{"type":"number","nullable":true,"format":"int64"},"owner_name":{"type":"string"},"sms_phone":{"type":"string","nullable":true},"json_collaborators":{"type":"array","items":{"$ref":"#/components/schemas/ChannelCollaborator"}},"joined_ts":{"type":"number","nullable":true,"format":"int64"},"is_favorite":{"type":"string","enum":["N","Y"]},"last_heard_ts":{"type":"number","nullable":true,"format":"int64"},"last_posted_ts":{"type":"number","nullable":true,"format":"int64"},"last_viewed_at":{"format":"date-time","type":"string","nullable":true},"workspace_name":{"type":"string"},"workspace_image_url":{"type":"string","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/ChannelType"}]},"images":{"type":"array","items":{"type":"string"}},"moreCount":{"type":"number","format":"int32"},"unread_cnt":{"type":"number","format":"int32"},"avatars":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/AvatarLayout"}]},"createdNew":{"type":"boolean"},"settings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingValue"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"channel_spans":{"type":"array","items":{"$ref":"#/components/schemas/PersonalizedChannelSpan"}},"visibility":{"allOf":[{"$ref":"#/components/schemas/ChannelVisibility"}]},"total_messages":{"type":"number","format":"int32"},"total_duration_milliseconds":{"type":"number","format":"int64"},"summaries":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSummary"}},"is_async":{"type":"boolean"},"async_stats":{"$ref":"#/components/schemas/AsyncMeetingStatsApiResponse"},"retention_days":{"type":"number","nullable":true,"format":"int32"},"engagement_percentage":{"type":"number","format":"int32"},"max_sequence_number":{"type":"number","nullable":false,"format":"int64"},"default_role":{"allOf":[{"$ref":"#/components/schemas/Role"}]},"sources":{"type":"array","items":{"$ref":"#/components/schemas/DerviedConversationSource"}},"seen_seq":{"type":"number","nullable":true,"format":"int32"}},"required":["workspace_guid","channel_guid","channel_name","channel_kind","source_channel_ids","channel_settings","is_private","last_updated_ts","sort_order","created_ts","owner_name","json_collaborators","is_favorite","workspace_name","type","images","moreCount","unread_cnt","createdNew","settings","attachments","channel_spans","visibility","total_messages","total_duration_milliseconds","summaries","is_async","max_sequence_number","default_role","sources","seen_seq"]},"RecentChannelsV4Response":{"type":"object","properties":{"channels":{"description":"Newest first, whichever direction was requested.","type":"array","items":{"$ref":"#/components/schemas/PersonalizedChannel"}},"has_more":{"type":"boolean","description":"True when more channels remain beyond this page in the requested direction. Do not infer the end from `channels.length < limit`: a page can come back short when a channel was removed between the membership read and hydration."},"next_cursor":{"type":"string","nullable":true,"description":"Opaque cursor marking where this page ended. While `has_more` is true, send it back as `cursor` (same `direction`) for the next page. With `direction=newer` it is also returned on the final page, and an empty page echoes the position it was asked from (the `cursor`, or the `date` anchor as a cursor): store it and send it later with `direction=newer` to get the channels whose activity moved since. With `direction=older` it is null once `has_more` is false."}},"required":["channels","has_more","next_cursor"]},"RecentChannelsFilter":{"type":"object","properties":{"limit":{"type":"number","nullable":true},"direction":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Direction"}]},"date":{"format":"date-time","type":"string","nullable":true},"includeDeleted":{"type":"boolean","default":false,"nullable":true}}},"AvailableChannel":{"type":"object","properties":{"id":{"type":"string","description":"Channel id."},"collaboratorCount":{"type":"number","format":"int32","description":"Number of active collaborators in the channel. Sole sort key for the joinable strip (\"most collaborators first\")."}},"required":["id","collaboratorCount"]},"UniqueValueType":{"type":"string","enum":["userGuid","phoneNumber","emailAddress"]},"RoleAssignment":{"type":"object","properties":{"value_type":{"allOf":[{"$ref":"#/components/schemas/UniqueValueType"}]},"unique_value":{"type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/Role"}]},"required_for_active_span":{"type":"boolean","nullable":true}},"required":["value_type","unique_value","role"]},"CreateNamedConversation":{"type":"object","properties":{"workspace_guid":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}},"description":{"type":"string"},"background_color":{"type":"string"},"text_color":{"type":"string"},"image_url":{"type":"string"},"post_rule":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ChannelType"}]},"sms_phone":{"type":"string"},"name":{"type":"string"},"is_private":{"type":"boolean","deprecated":true,"description":"Stop using this and start using channel visibility to control who has access"},"visibility":{"type":"string","enum":["private","workspace","public"],"description":"Public can be viewed and joined by anyone, Private can only be view by members, Workspace means only members of the workspace can view and join"},"default_role":{"type":"string","enum":["admin","owner","creator","member","guest"],"description":"The role used to add people who join the channel"}},"required":["workspace_guid","users","type","name"]},"CreateAIResponse":{"type":"object","properties":{"prompt_id":{"type":"string"},"message_ids":{"type":"array","items":{"type":"string"}},"channel_id":{"type":"string"},"workspace_id":{"type":"string"},"language":{"type":"string","description":"The language of the response. Defaults to original message."},"ignore_existing_response":{"type":"boolean","description":"Whether to ignore existing response and generate a new one. Defaults to false."}},"required":["prompt_id","message_ids"]},"CreateDerivedConversation":{"type":"object","properties":{"workspace_guid":{"type":"string"},"description":{"type":"string"},"background_color":{"type":"string"},"text_color":{"type":"string"},"image_url":{"type":"string"},"source_channel_ids":{"type":"array","items":{"type":"string"}},"ai_response":{"$ref":"#/components/schemas/CreateAIResponse"}},"required":["workspace_guid","source_channel_ids"]},"CreateDerivedConversationV2":{"type":"object","properties":{"workspace_guid":{"type":"string"},"description":{"type":"string"},"background_color":{"type":"string"},"text_color":{"type":"string"},"image_url":{"type":"string"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/DerviedConversationSource"}},"ai_response":{"$ref":"#/components/schemas/CreateAIResponse"}},"required":["workspace_guid","sources"]},"CreateAsyncMeetingRequest":{"type":"object","properties":{"workspace_guid":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}},"description":{"type":"string"},"background_color":{"type":"string"},"text_color":{"type":"string"},"image_url":{"type":"string"},"post_rule":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ChannelType"}]},"sms_phone":{"type":"string"},"name":{"type":"string"},"is_private":{"type":"boolean","deprecated":true,"description":"Stop using this and start using channel visibility to control who has access"},"visibility":{"type":"string","enum":["private","workspace","public"],"description":"Public can be viewed and joined by anyone, Private can only be view by members, Workspace means only members of the workspace can view and join"},"default_role":{"type":"string","enum":["admin","owner","creator","member","guest"],"description":"The role used to add people who join the channel"},"end":{"format":"date-time","type":"string","description":"The date and time when the meeting will end"},"message_id":{"type":"string","description":"The first message that will be posted into the channel"}},"required":["workspace_guid","users","type","name","end","message_id"]},"UpdateAsyncMeetingRequest":{"type":"object","properties":{"channel_guid":{"type":"string"},"channel_name":{"type":"string"},"channel_description":{"type":"string"},"visibility":{"allOf":[{"$ref":"#/components/schemas/ChannelVisibility"}]},"image_url":{"type":"string"},"post_rule":{"type":"string"},"is_favorite":{"type":"boolean"},"sms_phone":{"type":"string"},"span_id":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}},"span_end_date":{"format":"date-time","type":"string"},"span_begin_date":{"format":"date-time","type":"string"}},"required":["channel_guid"]},"CreateDirectMessage":{"type":"object","properties":{"workspace_guid":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}},"description":{"type":"string"},"background_color":{"type":"string"},"text_color":{"type":"string"},"image_url":{"type":"string"},"post_rule":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/ChannelType"}]},"sms_phone":{"type":"string"}},"required":["workspace_guid","users","type"]},"AddCollaborators":{"type":"object","properties":{"workspace_guid":{"type":"string"},"channel_guid":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}}},"required":["workspace_guid","channel_guid","users"]},"GetWebContactParameters":{"type":"object","properties":{"workspace_guid":{"type":"string"},"channel_name":{"type":"string"},"post_workspace_guid":{"type":"string","nullable":true,"description":"Specify the workspace to post the message in"}},"required":["workspace_guid","channel_name"]},"PhoneType":{"type":"string","enum":["voicemail"]},"WorkspacePhone":{"type":"object","properties":{"_id":{"type":"string","nullable":true},"destination_workspace_id":{"type":"string","nullable":true},"number":{"type":"string"},"parent_phone":{"type":"string","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/PhoneType"}]},"label":{"type":"string"},"message_url":{"type":"string","nullable":true},"phone_sid":{"type":"string","nullable":true}},"required":["number","type","label"]},"InvitationMode":{"type":"string","enum":["anyone","admin-only","any-member"]},"Workspace":{"type":"object","properties":{"workspace_guid":{"type":"string"},"vanity_name":{"type":"string","nullable":true},"workspace_name":{"type":"string"},"workspace_description":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"owner_guid":{"type":"string"},"type_cd":{"type":"string","nullable":true},"created_by":{"type":"string"},"created_ts":{"type":"number"},"last_updated_ts":{"type":"number"},"creator_first_name":{"type":"string"},"creator_last_name":{"type":"string"},"role_cd":{"type":"string"},"plan_type":{"type":"string","nullable":true},"channels":{"type":"array","items":{"$ref":"#/components/schemas/PersonalizedChannel"}},"availableChannelCount":{"type":"number","format":"int32"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/ChannelCollaborator"}},"settings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingValue"}},"phones":{"type":"array","items":{"$ref":"#/components/schemas/WorkspacePhone"}},"background_color":{"type":"string","nullable":true},"watermark_image_url":{"type":"string","nullable":true},"conversation_default":{"type":"boolean"},"invitation_mode":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InvitationMode"}]},"sso_email_domain":{"type":"string","nullable":true},"scim_provider":{"type":"string","nullable":true},"scim_connection_name":{"type":"string","nullable":true},"is_retention_enabled":{"type":"boolean","nullable":true},"retention_days_async_meeting":{"type":"number","nullable":true,"format":"int32"},"retention_days":{"type":"number","nullable":true,"format":"int32"},"who_can_change_conversation_retention":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"who_can_mark_messages_as_preserved":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Role"}}},"required":["workspace_guid","workspace_name","owner_guid","created_by","created_ts","last_updated_ts","creator_first_name","creator_last_name","role_cd","channels","availableChannelCount","collaborators","settings","phones","background_color","watermark_image_url","conversation_default","invitation_mode","sso_email_domain","scim_provider","scim_connection_name"]},"WebContactResponse":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"},"post_workspace":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Workspace"}]},"channel":{"$ref":"#/components/schemas/PersonalizedChannel"}},"required":["workspace","post_workspace","channel"]},"UpdateChannelParameters":{"type":"object","properties":{"channel_guid":{"type":"string"},"channel_name":{"type":"string"},"channel_description":{"type":"string"},"visibility":{"allOf":[{"$ref":"#/components/schemas/ChannelVisibility"}]},"image_url":{"type":"string"},"post_rule":{"type":"string"},"is_favorite":{"type":"boolean"},"sms_phone":{"type":"string"}},"required":["channel_guid"]},"UpdateChannelRetentionTime":{"type":"object","properties":{"retention_days":{"type":"number","nullable":true,"description":"To set the retention time you can set one of the following values: retention_days=null (workspace_default, will lookup for what is the time int the workspace), retention_days=-1 (never, doesn't clear messages), retention_days=Any positive number greater than 0 (specific duration)"}}},"ChannelDateUpdate":{"type":"object","properties":{"channel_id":{"type":"string","nullable":false},"date":{"format":"date-time","type":"string","nullable":false}},"required":["channel_id","date"]},"ConvertDmIntoNamedConversationDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"MoveConversationPayload":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Target workspace ID to move the conversation to"}},"required":["workspace_id"]},"SendConversationSignalPayload":{"type":"object","properties":{"signal_type":{"type":"string","enum":["typing","thinking","tool_call","searching","processing"],"description":"Kind of activity being signaled"},"body":{"type":"string","maxLength":200,"description":"Optional display text, e.g. \"Analyzing sentiment across 12 messages\""},"ttl_ms":{"type":"number","minimum":500,"maximum":30000,"description":"Client-side expiry hint in milliseconds"},"message_id":{"type":"string","description":"Optional message this signal is about. Async agents process several messages in parallel, so a signal needs to be able to name one."}},"required":["signal_type"]},"MessageUserCountsFilters":{"type":"object","properties":{"date":{"format":"date-time","type":"string","description":"Date filter applied (if any)","nullable":true},"user_ids":{"description":"User IDs filter applied (if any)","nullable":true,"type":"array","items":{"type":"string"}},"status":{"type":"array","description":"Message statuses filter applied (if any)","nullable":true,"items":{"$ref":"#/components/schemas/MessageStatus"}}}},"MessageUserCountResult":{"type":"object","properties":{"user_id":{"type":"string","description":"User ID"},"total_messages":{"type":"number","description":"Total number of messages created by this user"}},"required":["user_id","total_messages"]},"GetMessageUserCountsResponse":{"type":"object","properties":{"total_messages":{"type":"number","description":"Total number of messages matching the filters"},"filters":{"description":"Filters applied to the query","allOf":[{"$ref":"#/components/schemas/MessageUserCountsFilters"}]},"results":{"description":"List of users with their message counts","type":"array","items":{"$ref":"#/components/schemas/MessageUserCountResult"}}},"required":["total_messages","filters","results"]},"MessageIdsFilters":{"type":"object","properties":{"user_ids":{"description":"List of user IDs that were filtered","nullable":true,"type":"array","items":{"type":"string"}},"status":{"type":"array","description":"List of message statuses that were filtered","nullable":true,"items":{"$ref":"#/components/schemas/MessageStatus"}},"date":{"format":"date-time","type":"string","description":"Date filter that was applied","nullable":true},"direction":{"description":"Sort direction that was applied","nullable":true,"allOf":[{"$ref":"#/components/schemas/Direction"}]}}},"GetMessageIdsResponse":{"type":"object","properties":{"next_cursor":{"type":"string","description":"Cursor to fetch the next page","nullable":true},"has_more":{"type":"boolean","description":"Whether there are more items to fetch"},"total":{"type":"number","description":"Total number of messages (filtered by the query). Only included when include_total=true is provided in the query.","format":"int32","nullable":true},"filters":{"description":"Applied filters","allOf":[{"$ref":"#/components/schemas/MessageIdsFilters"}]},"results":{"description":"List of message IDs","type":"array","items":{"type":"string"}}},"required":["has_more","filters","results"]},"WhoAmISettings":{"type":"object","properties":{"sharefeedback_workspace":{"type":"string"},"gate_code":{"type":"string","nullable":true},"is_gated":{"type":"boolean"},"member_count":{"type":"number","format":"int32"},"admin_count":{"type":"number","format":"int32"},"owner_count":{"type":"number","format":"int32"}},"required":["sharefeedback_workspace","is_gated","member_count","admin_count","owner_count"]},"WhoAmIResponse":{"type":"object","properties":{"success":{"type":"boolean"},"settings":{"$ref":"#/components/schemas/WhoAmISettings"},"user":{"$ref":"#/components/schemas/UserDto"},"pxtoken":{"type":"string","nullable":true}},"required":["success","settings","user","pxtoken"]},"CreateAnonymousUserResponse":{"type":"object","properties":{"success":{"type":"boolean"},"pxtoken":{"type":"string"}},"required":["success","pxtoken"]},"TokenRequest":{"type":"object","properties":{"idToken":{"type":"string"},"refreshToken":{"type":"string","nullable":true},"forMerge":{"type":"boolean"},"reason":{"type":"string","nullable":true},"source":{"type":"string","nullable":true}},"required":["idToken","refreshToken","forMerge"]},"TokenResponse":{"type":"object","properties":{"pxtoken":{"type":"string","nullable":true},"success":{"type":"boolean"}},"required":["pxtoken","success"]},"AuthenticationRequirement":{"type":"object","properties":{"workspace_id":{"type":"string"},"workspace_name":{"type":"string"},"authentication_provider_id":{"type":"string"},"keycloak_idp_alias":{"type":"string","nullable":true}},"required":["workspace_id","workspace_name","authentication_provider_id"]},"IdpDiscoveryRequest":{"type":"object","properties":{"email":{"type":"string","description":"The email address typed on the login screen.","example":"someone@example.com"}},"required":["email"]},"IdpMatch":{"type":"string","enum":["domain","identity","none"]},"IdpDiscoveryResponse":{"type":"object","properties":{"match":{"allOf":[{"$ref":"#/components/schemas/IdpMatch"}]},"providers":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationRequirement"}}},"required":["match","providers"]},"SignedUrlParameters":{"type":"object","properties":{"filename":{"type":"string"},"mimetype":{"type":"string"}},"required":["filename","mimetype"]},"CreateAttachmentUrls":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/SignedUrlParameters"}}},"required":["files"]},"AttachmentUrl":{"type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"},"mimetype":{"type":"string"}},"required":["url","filename","mimetype"]},"AttachmentIdList":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]},"BulkAttachmentResult":{"type":"object","properties":{"attachment_id":{"type":"string"},"signed_url":{"type":"string"}},"required":["attachment_id","signed_url"]},"SignedUrlParametersV5":{"type":"object","properties":{"filename":{"type":"string"},"mimetype":{"type":"string"},"idempotency_key":{"type":"string","description":"Optional client-supplied UUID idempotency key. If provided, used as filename prefix to enable retry/resume. If omitted, server generates a UUID.","format":"uuid"}},"required":["filename","mimetype"]},"CreateAttachmentUrlsV5":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/SignedUrlParametersV5"}}},"required":["files"]},"SignedUrlResponseV5":{"type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"},"mimetype":{"type":"string"},"idempotency_key":{"type":"string","description":"The idempotency key used for this upload. Matches client-provided key, or server-generated UUID if none was supplied."}},"required":["url","filename","mimetype"]},"WorkspaceAuthInfo":{"type":"object","properties":{"provider_id":{"type":"string"},"keycloak_idp_alias":{"type":"string","nullable":true},"name":{"type":"string"},"workspace_id":{"type":"string"}},"required":["provider_id","name","workspace_id"]},"RecentUser":{"type":"object","properties":{"user_id":{"type":"string","example":"SIIRnfNwKgIqwp77"},"last_updated_ts":{"type":"number","example":1694313500106,"format":"int64"},"status":{"type":"string","example":"active","enum":["active","user_left","removed_from_channel","removed_from_workspace"]},"status_changed_ts":{"type":"number","example":1694313500106,"format":"int64"}},"required":["user_id","last_updated_ts","status","status_changed_ts"]},"RecentWorkspaces":{"type":"object","properties":{"workspace_id":{"type":"string","example":"yh1XNNMzW77AQxGv"},"workspace_name":{"type":"string","example":"Phonon X"},"last_updated_ts":{"type":"number","example":1694313500106,"format":"int64"},"deleted_at_ts":{"type":"number","example":1694313500106,"format":"int64"},"users":{"example":[{"user_id":"SIIRnfNwKgIqwp77","last_updated_ts":1697650099338,"status":"active","status_changed_ts":1697650099338}],"type":"array","items":{"$ref":"#/components/schemas/RecentUser"}}},"required":["workspace_id","workspace_name","last_updated_ts","users"]},"RecentWorkspacesResponse":{"type":"object","properties":{"user_workspace_ids":{"description":"List of workspaces user is part of.","example":["yh1XNNMzW77AQxGv","phononx"],"type":"array","items":{"type":"string"}},"recent_workspace_changes":{"type":"array","items":{"$ref":"#/components/schemas/RecentWorkspaces"}}},"required":["user_workspace_ids","recent_workspace_changes"]},"RemoveWorkspaceUserDto":{"type":"object","properties":{"workspace_guid":{"type":"string"},"user_guid":{"type":"string"}},"required":["workspace_guid","user_guid"]},"InviteUserDto":{"type":"object","properties":{"workspace_guid":{"type":"string"},"user_guid":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}},"required":["workspace_guid"]},"UserInfo":{"type":"object","properties":{"user_guid":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"}}},"AddUserPayload":{"type":"object","properties":{"workspace_guid":{"type":"string"},"users":{"description":"List of users to add to the workspace, up to 100 users","type":"array","items":{"$ref":"#/components/schemas/UserInfo"}}},"required":["workspace_guid","users"]},"AddedUser":{"type":"object","properties":{"user_guid":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"success":{"type":"boolean","description":"Whether the user was added successfully"},"message":{"type":"string","description":"Message about failure to add user"}},"required":["success"]},"AddUsersResponse":{"type":"object","properties":{"added_users":{"type":"array","items":{"$ref":"#/components/schemas/AddedUser"}},"failed_users":{"type":"array","items":{"$ref":"#/components/schemas/AddedUser"}}}},"VanityNameCheckResponse":{"type":"object","properties":{"name":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":"string","nullable":true}},"required":["name","available","reason"]},"AcceptOrDeclineJoinRequestPayload":{"type":"object","properties":{"user_id":{"type":"string"},"role":{"default":"member","allOf":[{"$ref":"#/components/schemas/Role"}]},"accept":{"type":"boolean"}},"required":["user_id","accept"]},"UpdateUserRoleParameters":{"type":"object","properties":{"workspace_id":{"type":"string"},"user_id":{"type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/Role"}]}},"required":["workspace_id","user_id","role"]},"WorkspaceType":{"type":"string","enum":["standard","webcontact","personallink"]},"PlanType":{"type":"string","enum":["standard","business-premium","team-premium","personal-premium","free"]},"WorkspaceUser":{"type":"object","properties":{"user_id":{"type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/Role"}]},"status_changed_at":{"format":"date-time","type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/UserMembershipStatus"}]}},"required":["user_id","role","status_changed_at","status"]},"DomainReferralMode":{"type":"string","enum":["do-not-inform","automatic","request","share-instructions"]},"WorkspaceV2":{"type":"object","properties":{"_id":{"type":"string"},"vanity_name":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/WorkspaceType"}]},"created_at":{"format":"date-time","type":"string"},"last_updated_at":{"format":"date-time","type":"string"},"plan_type":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PlanType"}]},"users":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceUser"}},"settings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettingValue"}},"phones":{"type":"array","items":{"$ref":"#/components/schemas/WorkspacePhone"}},"background_color":{"type":"string","nullable":true},"watermark_image_url":{"type":"string","nullable":true},"conversation_default":{"type":"boolean"},"invitation_mode":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InvitationMode"}]},"sso_email_domain":{"type":"string","nullable":true},"scim_provider":{"type":"string","nullable":true},"scim_connection_name":{"type":"string","nullable":true},"is_retention_enabled":{"type":"boolean","nullable":true},"retention_days":{"type":"number","nullable":true,"format":"int32"},"who_can_change_conversation_retention":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"who_can_mark_messages_as_preserved":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"retention_days_async_meeting":{"type":"number","nullable":true,"format":"int32"},"domain_referral_mode":{"nullable":false,"allOf":[{"$ref":"#/components/schemas/DomainReferralMode"}]},"domain_referral_message":{"type":"string","nullable":true},"domain_referral_title":{"type":"string","nullable":true},"domains":{"nullable":false,"type":"array","items":{"type":"string"}}},"required":["_id","name","created_at","last_updated_at","users","settings","phones","background_color","watermark_image_url","conversation_default","invitation_mode","sso_email_domain","scim_provider","scim_connection_name","domain_referral_mode","domains"]},"CreateWorkspace":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/WorkspaceType"}]},"vanity_name":{"type":"string","nullable":true}},"required":["name","description","type","vanity_name"]},"UpsertWorkspaceDto":{"type":"object","properties":{"workspace_guid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"vanity_name":{"type":"string","nullable":true},"invitation_mode":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InvitationMode"}]},"who_can_change_conversation_retention":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"who_can_mark_messages_as_preserved":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"domain_referral_mode":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/DomainReferralMode"}]},"domain_referral_message":{"type":"string","nullable":true},"domain_referral_title":{"type":"string","nullable":true}},"required":["workspace_guid"]},"JoinableWorkspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"watermark_url":{"type":"string"},"background_color":{"type":"string"},"image_url":{"type":"string"},"users":{"type":"number"},"channels":{"type":"number"},"domain_referral_mode":{"allOf":[{"$ref":"#/components/schemas/DomainReferralMode"}]},"domain_referral_message":{"type":"string"}},"required":["id","name","domains","users","channels","domain_referral_mode"]},"CreatableWorkspace":{"type":"object","properties":{"domain":{"type":"string"},"numberOfUsers":{"type":"number"},"existingWorkspaces":{"type":"array","items":{"type":"string"}}},"required":["domain","numberOfUsers","existingWorkspaces"]},"SuggestedWorkspacesResponse":{"type":"object","properties":{"joinableWorkspaces":{"type":"array","items":{"$ref":"#/components/schemas/JoinableWorkspace"}},"creatableWorkspaces":{"type":"array","items":{"$ref":"#/components/schemas/CreatableWorkspace"}}},"required":["joinableWorkspaces","creatableWorkspaces"]},"WorkspacePhoneV5":{"type":"object","properties":{"id":{"type":"string","description":"Phone ID"},"number":{"type":"string","description":"Phone number"},"type":{"description":"Phone type","allOf":[{"$ref":"#/components/schemas/PhoneType"}]},"label":{"type":"string","description":"Phone label"},"destination_workspace_id":{"type":"string","description":"Destination workspace ID","nullable":true},"parent_phone":{"type":"string","description":"Parent phone number","nullable":true},"message_url":{"type":"string","description":"Message URL","nullable":true},"phone_sid":{"type":"string","description":"Phone SID","nullable":true}},"required":["id","number","type","label"]},"WorkspaceV5":{"type":"object","properties":{"id":{"type":"string","description":"Workspace ID"},"name":{"type":"string","description":"Workspace name"},"vanity_name":{"type":"string","description":"Workspace vanity name","nullable":true},"description":{"type":"string","description":"Workspace description","nullable":true},"image_url":{"type":"string","description":"Workspace image URL","nullable":true},"type":{"description":"Workspace type","nullable":true,"allOf":[{"$ref":"#/components/schemas/WorkspaceType"}]},"created_at":{"format":"date-time","type":"string","description":"Workspace creation date"},"last_updated_at":{"format":"date-time","type":"string","description":"Last update date"},"owner_id":{"type":"string","description":"Workspace owner ID","nullable":true},"creator_id":{"type":"string","description":"Workspace creator ID","nullable":true},"plan_type":{"description":"Plan type","nullable":true,"allOf":[{"$ref":"#/components/schemas/PlanType"}]},"phones":{"description":"Workspace phone numbers (only included in single workspace response)","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/WorkspacePhoneV5"}},"background_color":{"type":"string","description":"Background color","nullable":true},"watermark_image_url":{"type":"string","description":"Watermark image URL","nullable":true},"conversation_default":{"type":"boolean","description":"Whether this workspace is the default for conversations","nullable":true},"invitation_mode":{"description":"Invitation mode","nullable":true,"allOf":[{"$ref":"#/components/schemas/InvitationMode"}]},"sso_email_domain":{"type":"string","description":"SSO email domain","nullable":true},"scim_provider":{"type":"string","description":"SCIM provider","nullable":true},"scim_connection_name":{"type":"string","description":"SCIM connection name","nullable":true},"is_retention_enabled":{"type":"boolean","description":"Whether retention is enabled","nullable":true},"retention_days":{"type":"number","description":"Retention days","nullable":true},"who_can_change_conversation_retention":{"type":"array","description":"Roles that can change conversation retention","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"who_can_mark_messages_as_preserved":{"type":"array","description":"Roles that can mark messages as preserved","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"retention_days_async_meeting":{"type":"number","description":"Retention days for async meetings","nullable":true},"domain_referral_mode":{"description":"Domain referral mode","allOf":[{"$ref":"#/components/schemas/DomainReferralMode"}]},"domain_referral_message":{"type":"string","description":"Domain referral message","nullable":true},"domain_referral_title":{"type":"string","description":"Domain referral title","nullable":true},"domains":{"description":"Associated domains","nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","name","created_at","last_updated_at"]},"WorkspacesFiltersV5":{"type":"object","properties":{"direction":{"description":"Sort direction","allOf":[{"$ref":"#/components/schemas/Direction"}]},"limit":{"type":"number","description":"Number of items per page","format":"int32"},"date":{"type":"string","description":"Anchor timestamp to start from","nullable":true},"starting_after":{"type":"string","description":"Cursor to fetch the next page","nullable":true},"ending_before":{"type":"string","description":"Cursor to fetch the previous page","nullable":true},"roles":{"type":"array","description":"List of roles filter","nullable":true,"items":{"$ref":"#/components/schemas/Role"}},"types":{"type":"array","description":"List of workspace types filter","nullable":true,"items":{"$ref":"#/components/schemas/WorkspaceType"}}},"required":["direction","limit"]},"GetWorkspacesResponseV5":{"type":"object","properties":{"results":{"description":"List of workspaces","type":"array","items":{"$ref":"#/components/schemas/WorkspaceV5"}},"next_cursor":{"type":"string","description":"Cursor to fetch the next page","nullable":true},"has_more":{"type":"boolean","description":"Whether there are more items to fetch"},"total":{"type":"number","description":"Total number of workspaces (filtered by the query). Only included when include_total=true is provided in the query.","format":"int32","nullable":true},"filters":{"description":"Applied filters","allOf":[{"$ref":"#/components/schemas/WorkspacesFiltersV5"}]}},"required":["results","has_more","filters"]},"SsoListPagination":{"type":"object","properties":{"skip":{"type":"number","minimum":0},"limit":{"type":"number","minimum":1,"maximum":100},"direction":{"type":"string","enum":["older","newer"],"nullable":true}},"required":["skip","limit"]},"SsoProviderResponse":{"type":"object","properties":{"id":{"type":"string","description":"SSO provider id"},"email_domain":{"type":"string","example":"axon.com"},"provider_id":{"type":"string","nullable":true,"example":"oidc.axon"},"keycloak_idp_alias":{"type":"string","nullable":true,"example":"axon"}},"required":["id","email_domain"]},"ListSsoProvidersResponse":{"type":"object","properties":{"total_results":{"type":"number","format":"int32"},"pagination":{"$ref":"#/components/schemas/SsoListPagination"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SsoProviderResponse"}}},"required":["total_results","pagination","results"]},"CreateSsoProvider":{"type":"object","properties":{"email_domain":{"type":"string","example":"axon.com","description":"Email domain this SSO provider applies to"},"provider_id":{"type":"string","example":"oidc.axon","description":"Identity provider id used for SSO validation"},"keycloak_idp_alias":{"type":"string","example":"axon","description":"Keycloak identity provider alias used for kc_idp_hint routing"}},"required":["email_domain"]},"UpdateSsoProvider":{"type":"object","properties":{"email_domain":{"type":"string","example":"axon.com","description":"Email domain this SSO provider applies to"},"provider_id":{"type":"string","example":"oidc.axon","description":"Identity provider id used for SSO validation"},"keycloak_idp_alias":{"type":"string","example":"axon","description":"Keycloak identity provider alias used for kc_idp_hint routing"}}},"ListSsoRequiredRolesResponse":{"type":"object","properties":{"total_results":{"type":"number","format":"int32"},"pagination":{"$ref":"#/components/schemas/SsoListPagination"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}},"required":["total_results","pagination","results"]},"AddSsoRequiredRole":{"type":"object","properties":{"role":{"description":"Workspace role that must authenticate through SSO","allOf":[{"$ref":"#/components/schemas/Role"}]}},"required":["role"]},"SsoRequiredRolesResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}},"required":["results"]},"UpdateSsoRequiredRoles":{"type":"object","properties":{"roles":{"type":"array","description":"Full set of workspace roles that must authenticate through SSO. An empty array means no roles are required to use SSO.","items":{"$ref":"#/components/schemas/Role"}}},"required":["roles"]},"PushInfo":{"type":"object","properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"body":{"type":"string"},"data":{"type":"object"},"badgeCounter":{"type":"number"},"category":{"type":"string"}},"required":["title","subtitle","body","data","badgeCounter"]},"Notification":{"type":"object","properties":{"_id":{"type":"string"},"user_id":{"type":"string"},"type":{"type":"string","enum":["message","tag","newUser"]},"workspace_id":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"parent_message_id":{"type":"string","nullable":true},"message_id":{"type":"string","nullable":true},"message":{"type":"string"},"created_on":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"from_user_id":{"type":"string","nullable":true},"pushInfo":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PushInfo"}]}},"required":["_id","user_id","type","workspace_id","channel_id","message_id","message","created_on","created_at"]},"NotificationModel":{"type":"object","properties":{}},"Reaction":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"image_url":{"type":"string"},"code":{"type":"string"},"reaction_tts":{"type":"string"}},"required":["id","name","image_url","code","reaction_tts"]},"AddEmojiReaction":{"type":"object","properties":{"reaction":{"type":"string","description":"The reaction to apply: either a curated reaction id (e.g. \"love\") or a single unicode emoji (e.g. \"🎉\")","example":"🎉"}},"required":["reaction"]},"Success":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates whether the operation was successful","example":true}}},"App":{"type":"object","properties":{"id":{"type":"string","title":"id","description":"The primary key of the resource."},"name":{"type":"string"},"description":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"access_token_lifetime_seconds":{"type":"number","description":"Access token lifetime in seconds"},"refresh_token_lifetime_seconds":{"type":"number","description":"Refresh token lifetime in seconds"},"allowed_callback_urls":{"type":"string","description":"Allowed callback URLs (comma separated list)"},"webhooks_url":{"type":"string","description":"Webhook URL to send the data (comma separated list)"},"webhooks_authentication_header":{"type":"object","additionalProperties":{"type":"string"},"example":{"x-api-key":"kNp7vXmL9RqWcYtH2sBnE4aD8fGjK3hU5xZwQ6yVcM1iPuA9nTbS7vFrL4mCxJoN"},"description":"Authentication header configuration for webhooks. Key-value pairs where both key and value are strings."},"allowed_logout_urls":{"type":"string","description":"Allowed logout URLs (comma separated list)"},"created_at":{"format":"date-time","type":"string","description":"Created at"},"updated_at":{"format":"date-time","type":"string","description":"Updated at"},"deleted_at":{"format":"date-time","type":"string","description":"Deleted at"},"webhooks_url_mode":{"type":"string","enum":["one_per_client","one_per_subscription"],"description":"Webhook URL mode"},"owner_id":{"type":"string"},"user_is_subscribed_with_valid_tokens":{"type":"boolean","description":"Indicates whether the user is subscribed to the app and has valid authentication tokens (access or refresh)."},"image_url":{"type":"string","description":"Image URL"},"is_default_subscription_client":{"type":"boolean","description":"When true, this app is the default portal client for webhook subscriptions (one webhook URL per subscription)."}},"required":["id","name","client_id","created_at","updated_at","webhooks_url_mode","user_is_subscribed_with_valid_tokens"]},"SubscriptionFilter":{"type":"object","properties":{"key":{"type":"string","description":"What is the key to filter the data before sending to the webhook","example":"name"},"value":{"description":"Must match `operator`: use a string or number for \"eq\" and \"ne\"; use a non-empty array only for \"in\".","example":"John","oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}}]},"operator":{"type":"string","description":"What is the operator to filter the data","enum":["eq","ne","in"],"example":"eq","default":"eq"}},"required":["key","value","operator"]},"ActionMetadata":{"type":"object","properties":{"conversation_id":{"type":"string","description":"The conversation/channel ID where the reminder message should be sent","example":"channel_123"},"send_as_bot":{"type":"boolean","description":"Whether the message should be sent as a bot. If true, bot_user_id should be provided","example":true},"message":{"type":"string","description":"The message text to send. Either message or from_message_id must be provided","example":"Daily standup reminder!"},"links":{"description":"Array of links to be attached to the message","example":["https://pxassets.s3.us-east-2.amazonaws.com/images/v2/logo.png","https://pxassets.s3.us-east-2.amazonaws.com/images/v2/Personal+CarbonLink.svg","https://www.youtube.com/watch?v=36Tn5cektlg"],"type":"array","items":{"type":"string"}}}},"SubscriptionAction":{"type":"object","properties":{"action_id":{"type":"string","description":"What is the action to perform","example":"run_ai_prompt","enum":["run_ai_prompt","send_channel_message_reminder"]},"entity_type":{"type":"string","description":"What is the entity_type to perform the action on (required when entity_id is provided)","example":"ai_prompt","enum":["ai_prompt","channel_reminder"]},"entity_id":{"type":"string","description":"What is the entity_id to perform the action on (required when entity_type is provided)"},"metadata":{"description":"Additional metadata for the action. Structure varies by entity_type","allOf":[{"$ref":"#/components/schemas/ActionMetadata"}]}},"required":["action_id"]},"SubscribeUserPayload":{"type":"object","properties":{"subscriptions":{"type":"array","description":"All events are subscribed by default: message.initializing, message.started, message.paused, message.resumed, message.offline, message.processing, message.finished, message.deleted, message.discussion-notes.added, message.label.added, message.attachment.added, message.attachment.uploaded, message.posted.to.channel, message.voicememo.created, channel.created, channel.deleted, channel.user.joined, channel.users.added, channel.user.left, channel.user.removed, channel.async-check.mid, channel.async-check.ending, channel.async.ended, channel.async.extended, channel.async.shortened, channel.ai-summary.generated, workspace.user.joined, workspace.user.added, workspace.user.left, workspace.user.removed, workspace.findable-channel.created, ai.prompt.response.generated, action-item.created, action-item.updated, action-item.deleted, action-item.status.changed, ask.answered. Also supports 'schedule' trigger for time-based triggers.","items":{"type":"string","enum":["message.initializing","message.started","message.paused","message.resumed","message.offline","message.processing","message.finished","message.deleted","message.discussion-notes.added","message.label.added","message.attachment.added","message.attachment.uploaded","message.posted.to.channel","message.voicememo.created","channel.created","channel.deleted","channel.user.joined","channel.users.added","channel.user.left","channel.user.removed","channel.async-check.mid","channel.async-check.ending","channel.async.ended","channel.async.extended","channel.async.shortened","channel.ai-summary.generated","workspace.user.joined","workspace.user.added","workspace.user.left","workspace.user.removed","workspace.findable-channel.created","ai.prompt.response.generated","action-item.created","action-item.updated","action-item.deleted","action-item.status.changed","ask.answered"]}},"webhookURL":{"type":"string","description":"Webhook URL to send the data"},"subscription_filters":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"subscription_actions":{"description":"Actions are used only for internal apps. (Not allowed to external apps)","type":"array","items":{"$ref":"#/components/schemas/SubscriptionAction"}},"webhook_headers":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]},"example":{"x-api-key":"secret","x-version":2},"description":"Custom HTTP headers Carbon Voice will forward on every webhook delivery for this subscription. Pass null to clear previously set headers; omit the field to leave existing headers unchanged.","nullable":true}}},"SubscribedUser":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time at which the resource was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"The date and time at which the resource was last updated."},"id":{"type":"string","title":"id","description":"The primary key of the resource."},"client_id":{"type":"string"},"user_id":{"type":"string"},"subscriptions":{"type":"array","example":["message.initializing","message.started","message.paused","message.resumed","message.offline","message.processing","message.finished","message.deleted","message.discussion-notes.added","message.label.added","message.attachment.added","message.attachment.uploaded","message.posted.to.channel","message.voicememo.created","channel.created","channel.deleted","channel.user.joined","channel.users.added","channel.user.left","channel.user.removed","channel.async-check.mid","channel.async-check.ending","channel.async.ended","channel.async.extended","channel.async.shortened","channel.ai-summary.generated","workspace.user.joined","workspace.user.added","workspace.user.left","workspace.user.removed","workspace.findable-channel.created","ai.prompt.response.generated","action-item.created","action-item.updated","action-item.deleted","action-item.status.changed","ask.answered"],"description":"Array of subscription events or triggers (including \"schedule\" for time-based triggers)","items":{"type":"string","enum":["message.initializing","message.started","message.paused","message.resumed","message.offline","message.processing","message.finished","message.deleted","message.discussion-notes.added","message.label.added","message.attachment.added","message.attachment.uploaded","message.posted.to.channel","message.voicememo.created","channel.created","channel.deleted","channel.user.joined","channel.users.added","channel.user.left","channel.user.removed","channel.async-check.mid","channel.async-check.ending","channel.async.ended","channel.async.extended","channel.async.shortened","channel.ai-summary.generated","workspace.user.joined","workspace.user.added","workspace.user.left","workspace.user.removed","workspace.findable-channel.created","ai.prompt.response.generated","action-item.created","action-item.updated","action-item.deleted","action-item.status.changed","ask.answered"]}},"webhookURL":{"type":"string","description":"Webhook URL to send the data"},"subscription_filters":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"subscription_actions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionAction"}},"webhook_headers":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":"Custom HTTP headers forwarded on webhook deliveries for this subscription."}},"required":["created_at","updated_at","id","client_id","user_id","subscriptions"]},"ListSubscriptionsPagination":{"type":"object","properties":{"skip":{"type":"number","default":0,"minimum":0,"format":"int32"},"limit":{"type":"number","nullable":true,"default":100,"maximum":100,"minimum":1,"description":"Max number of results allowed per page is: **100**"},"direction":{"type":"string","nullable":true,"enum":["older","newer"],"default":"newer"},"date":{"type":"string","description":"ISO 8601 date string for cursor pagination"}}},"Subscription":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The date and time at which the resource was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"The date and time at which the resource was last updated."},"id":{"type":"string","title":"id","description":"The primary key of the resource."},"client_id":{"type":"string"},"user_id":{"type":"string"},"subscriptions":{"type":"array","example":["message.initializing","message.started","message.paused","message.resumed","message.offline","message.processing","message.finished","message.deleted","message.discussion-notes.added","message.label.added","message.attachment.added","message.attachment.uploaded","message.posted.to.channel","message.voicememo.created","channel.created","channel.deleted","channel.user.joined","channel.users.added","channel.user.left","channel.user.removed","channel.async-check.mid","channel.async-check.ending","channel.async.ended","channel.async.extended","channel.async.shortened","channel.ai-summary.generated","workspace.user.joined","workspace.user.added","workspace.user.left","workspace.user.removed","workspace.findable-channel.created","ai.prompt.response.generated","action-item.created","action-item.updated","action-item.deleted","action-item.status.changed","ask.answered"],"description":"Array of subscription events or triggers (including \"schedule\" for time-based triggers)","items":{"type":"string","enum":["message.initializing","message.started","message.paused","message.resumed","message.offline","message.processing","message.finished","message.deleted","message.discussion-notes.added","message.label.added","message.attachment.added","message.attachment.uploaded","message.posted.to.channel","message.voicememo.created","channel.created","channel.deleted","channel.user.joined","channel.users.added","channel.user.left","channel.user.removed","channel.async-check.mid","channel.async-check.ending","channel.async.ended","channel.async.extended","channel.async.shortened","channel.ai-summary.generated","workspace.user.joined","workspace.user.added","workspace.user.left","workspace.user.removed","workspace.findable-channel.created","ai.prompt.response.generated","action-item.created","action-item.updated","action-item.deleted","action-item.status.changed","ask.answered"]}},"webhookURL":{"type":"string","description":"Webhook URL to send the data"},"subscription_filters":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"subscription_actions":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionAction"}},"webhook_headers":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":"Custom HTTP headers forwarded on webhook deliveries for this subscription."}},"required":["created_at","updated_at","id","client_id","user_id","subscriptions"]},"ListSubscriptionsResponse":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/ListSubscriptionsPagination"},"total_results":{"type":"number","format":"int32"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}},"required":["pagination","total_results","results"]},"UpdateSubscriptionPayload":{"type":"object","properties":{"subscriptions":{"type":"array","description":"Events to deliver. Omit to keep the subscription's current events. Also supports 'schedule' trigger for time-based triggers.","items":{"type":"string","enum":["message.initializing","message.started","message.paused","message.resumed","message.offline","message.processing","message.finished","message.deleted","message.discussion-notes.added","message.label.added","message.attachment.added","message.attachment.uploaded","message.posted.to.channel","message.voicememo.created","channel.created","channel.deleted","channel.user.joined","channel.users.added","channel.user.left","channel.user.removed","channel.async-check.mid","channel.async-check.ending","channel.async.ended","channel.async.extended","channel.async.shortened","channel.ai-summary.generated","workspace.user.joined","workspace.user.added","workspace.user.left","workspace.user.removed","workspace.findable-channel.created","ai.prompt.response.generated","action-item.created","action-item.updated","action-item.deleted","action-item.status.changed","ask.answered"]}},"webhookURL":{"type":"string","description":"Webhook URL to send the data"},"subscription_filters":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"subscription_actions":{"description":"Actions are used only for internal apps. (Not allowed to external apps)","type":"array","items":{"$ref":"#/components/schemas/SubscriptionAction"}},"webhook_headers":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"}]},"example":{"x-api-key":"secret","x-version":2},"description":"Custom HTTP headers Carbon Voice will forward on every webhook delivery for this subscription. Pass null to clear previously set headers; omit the field to leave existing headers unchanged.","nullable":true},"scheduler_job_metadata":{"type":"string","description":"JSON stringified scheduler metadata used for schedule-based subscriptions"}}},"GetMessageShareLinksBySharedMessageFilter":{"type":"object","properties":{"skip":{"type":"number","default":0,"minimum":0,"format":"int32"},"limit":{"type":"number","nullable":true,"default":50,"maximum":100,"minimum":1,"description":"Max number of results allowed per page is: **100**"},"direction":{"type":"string","nullable":true,"enum":["older","newer"],"default":"newer"}}},"SpecifiedAccess":{"type":"object","properties":{"type":{"type":"string","description":"What is the Specified access type for the MessageShareLink","enum":["channel","workspace","workspace_group","user"]},"ids":{"description":"List of IDs that have access to the MessageShareLink","type":"array","items":{"type":"string"}}},"required":["type","ids"]},"MessageShareLink":{"type":"object","properties":{"_id":{"type":"string","description":"Unique Identifier of share link"},"created_by":{"type":"string","description":"Identifier of the User who created the share/forward"},"channel_id":{"type":"string","description":"Channel ID where forwarded message was sent to","nullable":true},"message_id":{"type":"string","description":"Message ID that has the share_link_id attached to","nullable":true},"created_at":{"type":"number","example":1694313500106,"format":"int64"},"last_updated_at":{"type":"number","example":1694313500106,"format":"int64"},"end_access_at":{"type":"number","description":"Date when the access to shared message ends","nullable":true,"format":"int64"},"revoked_at":{"type":"number","example":1694313500106,"nullable":true,"format":"int64"},"revoked_by":{"type":"string","nullable":true},"share_type":{"type":"string","description":"What is the ShareType of the MessageShareLink","enum":["forward","link"]},"access_type":{"type":"string","description":"What is the access type for the MessageShareLink","enum":["public","specified","forward"]},"specified_access":{"description":"List of Specified Access for the MessageShareLink","type":"array","items":{"$ref":"#/components/schemas/SpecifiedAccess"}},"reply_type":{"type":"string","description":"How replies to this share link behave. Legacy links without the field are private_only.","enum":["shared","private_only"]},"reply_conversation_id":{"type":"string","description":"Conversation holding the shared replies to this link, if one was already created","nullable":true}},"required":["_id","created_by","created_at","last_updated_at","share_type","access_type","reply_type"]},"GetMessageShareLinksBySharedMessageResponse":{"type":"object","properties":{"filters":{"$ref":"#/components/schemas/GetMessageShareLinksBySharedMessageFilter"},"total_results":{"type":"number","format":"int32"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MessageShareLink"}}},"required":["filters","total_results","results"]},"OriginalMessageInfo":{"type":"object","properties":{"message_id":{"type":"string","description":"Original message ID"},"channel_id":{"type":"string","description":"Original message Channel ID"},"workspace_id":{"type":"string","description":"Original message Workspace ID"}},"required":["message_id","workspace_id"]},"SharedMessage":{"type":"object","properties":{"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"name":{"type":"string","nullable":true},"is_text_message":{"type":"boolean"},"audio_models":{"type":"array","items":{"$ref":"#/components/schemas/AudioModelV2"}},"text_models":{"type":"array","items":{"$ref":"#/components/schemas/TextModel"}},"duration_ms":{"type":"number","description":"The length of the message in milliseconds","format":"int32"},"creator_id":{"type":"string"},"original_message_info":{"description":"Original message info, only available if user has access to original message","allOf":[{"$ref":"#/components/schemas/OriginalMessageInfo"}]},"created_at":{"type":"number","example":1694313500106,"format":"int64"},"last_updated_at":{"type":"number","example":1694313500106,"format":"int64"}},"required":["attachments","is_text_message","audio_models","text_models","duration_ms","creator_id","created_at","last_updated_at"]},"MessageShareLinkWithSharedMessage":{"type":"object","properties":{"_id":{"type":"string","description":"Unique Identifier of share link"},"created_by":{"type":"string","description":"Identifier of the User who created the share/forward"},"channel_id":{"type":"string","description":"Channel ID where forwarded message was sent to","nullable":true},"message_id":{"type":"string","description":"Message ID that has the share_link_id attached to","nullable":true},"created_at":{"type":"number","example":1694313500106,"format":"int64"},"last_updated_at":{"type":"number","example":1694313500106,"format":"int64"},"end_access_at":{"type":"number","description":"Date when the access to shared message ends","nullable":true,"format":"int64"},"revoked_at":{"type":"number","example":1694313500106,"nullable":true,"format":"int64"},"revoked_by":{"type":"string","nullable":true},"share_type":{"type":"string","description":"What is the ShareType of the MessageShareLink","enum":["forward","link"]},"access_type":{"type":"string","description":"What is the access type for the MessageShareLink","enum":["public","specified","forward"]},"specified_access":{"description":"List of Specified Access for the MessageShareLink","type":"array","items":{"$ref":"#/components/schemas/SpecifiedAccess"}},"reply_type":{"type":"string","description":"How replies to this share link behave. Legacy links without the field are private_only.","enum":["shared","private_only"]},"reply_conversation_id":{"type":"string","description":"Conversation holding the shared replies to this link, if one was already created","nullable":true},"shared_message":{"$ref":"#/components/schemas/SharedMessage"}},"required":["_id","created_by","created_at","last_updated_at","share_type","access_type","reply_type","shared_message"]},"MessageShareLinkWithMessage":{"type":"object","properties":{"_id":{"type":"string","description":"Unique Identifier of share link"},"created_by":{"type":"string","description":"Identifier of the User who created the share/forward"},"channel_id":{"type":"string","description":"Channel ID where forwarded message was sent to","nullable":true},"message_id":{"type":"string","description":"Message ID that has the share_link_id attached to","nullable":true},"created_at":{"type":"number","example":1694313500106,"format":"int64"},"last_updated_at":{"type":"number","example":1694313500106,"format":"int64"},"end_access_at":{"type":"number","description":"Date when the access to shared message ends","nullable":true,"format":"int64"},"revoked_at":{"type":"number","example":1694313500106,"nullable":true,"format":"int64"},"revoked_by":{"type":"string","nullable":true},"share_type":{"type":"string","description":"What is the ShareType of the MessageShareLink","enum":["forward","link"]},"access_type":{"type":"string","description":"What is the access type for the MessageShareLink","enum":["public","specified","forward"]},"specified_access":{"description":"List of Specified Access for the MessageShareLink","type":"array","items":{"$ref":"#/components/schemas/SpecifiedAccess"}},"reply_type":{"type":"string","description":"How replies to this share link behave. Legacy links without the field are private_only.","enum":["shared","private_only"]},"reply_conversation_id":{"type":"string","description":"Conversation holding the shared replies to this link, if one was already created","nullable":true},"shared_message":{"$ref":"#/components/schemas/MessageV2"},"has_channel_access":{"type":"boolean"}},"required":["_id","created_by","created_at","last_updated_at","share_type","access_type","reply_type","shared_message","has_channel_access"]},"MessageShareLinkWithMessageV6":{"type":"object","properties":{"_id":{"type":"string","description":"Unique Identifier of share link"},"created_by":{"type":"string","description":"Identifier of the User who created the share/forward"},"channel_id":{"type":"string","description":"Channel ID where forwarded message was sent to","nullable":true},"message_id":{"type":"string","description":"Message ID that has the share_link_id attached to","nullable":true},"created_at":{"type":"number","example":1694313500106,"format":"int64"},"last_updated_at":{"type":"number","example":1694313500106,"format":"int64"},"end_access_at":{"type":"number","description":"Date when the access to shared message ends","nullable":true,"format":"int64"},"revoked_at":{"type":"number","example":1694313500106,"nullable":true,"format":"int64"},"revoked_by":{"type":"string","nullable":true},"share_type":{"type":"string","description":"What is the ShareType of the MessageShareLink","enum":["forward","link"]},"access_type":{"type":"string","description":"What is the access type for the MessageShareLink","enum":["public","specified","forward"]},"specified_access":{"description":"List of Specified Access for the MessageShareLink","type":"array","items":{"$ref":"#/components/schemas/SpecifiedAccess"}},"reply_type":{"type":"string","description":"How replies to this share link behave. Legacy links without the field are private_only.","enum":["shared","private_only"]},"reply_conversation_id":{"type":"string","description":"Conversation holding the shared replies to this link, if one was already created","nullable":true},"shared_message":{"$ref":"#/components/schemas/MessageV6"},"has_channel_access":{"type":"boolean"}},"required":["_id","created_by","created_at","last_updated_at","share_type","access_type","reply_type","shared_message","has_channel_access"]},"CreateMessageShareLink":{"type":"object","properties":{"shared_message_id":{"type":"string","description":"Message ID that will be shared/forwarded"},"share_type":{"type":"string","description":"What is the ShareType of the MessageShareLink","enum":["forward","link"]},"message_id":{"type":"string","description":"Message ID that will have the forward on it. Only required if share_type is forward.","nullable":true},"access_type":{"type":"string","description":"What is the access type for the MessageShareLink","enum":["public","specified","forward"]},"specified_access":{"description":"List of Specified Access for the MessageShareLink","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/SpecifiedAccess"}},"end_access_at":{"format":"date-time","type":"string","description":"Date when the access to MessageShareLink ends","nullable":true},"reply_type":{"type":"string","description":"How replies to this share link behave. \"shared\" allows replies to go to a shared conversation (POST /channels/sharelink/{share_link_id}); \"private_only\" keeps the legacy behavior where each reply is a private DM to the sharer. Only valid when share_type is link. Omitted = private_only (legacy default).","enum":["shared","private_only"],"nullable":true}},"required":["shared_message_id","share_type","access_type"]},"RevokeAccessToShareLink":{"type":"object","properties":{"share_link_id":{"type":"string","description":"ID of Message Share Link that will be revoked access.","nullable":true},"shared_message_id":{"type":"string","description":"Message ID that was Shared. (Will revoke access to all share links that have this shared_message_id)","nullable":true}}},"UpdateAccessPayload":{"type":"object","properties":{"access_type":{"type":"string","description":"What is the access type for the MessageShareLink","enum":["specified","public"]},"specified_access":{"description":"List of Specified Access for the MessageShareLink","nullable":true,"type":"array","items":{"$ref":"#/components/schemas/SpecifiedAccess"}},"end_access_at":{"format":"date-time","type":"string","description":"Date when the access to MessageShareLink ends","nullable":true},"reply_type":{"type":"string","description":"How replies to this share link behave. Switching to private_only stops new members from joining the reply conversation; an already-created conversation is kept.","enum":["shared","private_only"],"nullable":true}},"required":["access_type"]},"GetListOfSharelinksByMessageIds":{"type":"object","properties":{"message_ids":{"description":"List of Message IDs, Max allowed is 500","type":"array","items":{"type":"string"}},"start_date":{"format":"date-time","type":"string","description":"Start Date range","example":"2024-01-01T04:25:00.000Z"},"end_date":{"format":"date-time","type":"string","description":"End Date range","example":"2024-01-10T04:25:00.000Z"}},"required":["message_ids"]},"SharelinksByMessageIdResponse":{"type":"object","properties":{"message_id":{"type":"string","description":"Message ID"},"is_public_shared":{"type":"boolean","description":"Is the message shared publicly"},"sharelinks":{"description":"List of MessageShareLinks","type":"array","items":{"$ref":"#/components/schemas/MessageShareLink"}}},"required":["message_id"]}}}}