{ "openapi": "3.1.0", "info": { "title": "Chatwoot", "description": "This is the API documentation for Chatwoot server.", "version": "1.1.0", "termsOfService": "https://www.chatwoot.com/terms-of-service/", "contact": { "email": "hello@chatwoot.com" }, "license": { "name": "MIT License", "url": "https://opensource.org/licenses/MIT" } }, "servers": [ { "url": "https://app.chatwoot.com/" } ], "paths": { "/platform/api/v1/accounts": { "post": { "tags": [ "Accounts" ], "operationId": "create-an-account", "summary": "Create an Account", "description": "Create an Account", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/account_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/platform_account" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/accounts/{account_id}": { "parameters": [ { "$ref": "#/components/parameters/account_id" } ], "get": { "tags": [ "Accounts" ], "operationId": "get-details-of-an-account", "summary": "Get an account details", "description": "Get the details of an account", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/platform_account" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The given account does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "patch": { "tags": [ "Accounts" ], "operationId": "update-an-account", "summary": "Update an account", "description": "Update an account's attributes", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/account_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/platform_account" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "delete": { "tags": [ "Accounts" ], "operationId": "delete-an-account", "summary": "Delete an Account", "description": "Delete an Account", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The account does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/accounts/{account_id}/account_users": { "parameters": [ { "$ref": "#/components/parameters/account_id" } ], "get": { "tags": [ "Account Users" ], "operationId": "list-all-account-users", "summary": "List all Account Users", "description": "List all account users", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/account_user" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "post": { "tags": [ "Account Users" ], "operationId": "create-an-account-user", "summary": "Create an Account User", "description": "Create an Account User", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/account_user_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "account_id": { "type": "integer", "description": "The ID of the account" }, "user_id": { "type": "integer", "description": "The ID of the user" }, "role": { "type": "string", "description": "whether user is an administrator or agent" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "delete": { "tags": [ "Account Users" ], "operationId": "delete-an-account-user", "summary": "Delete an Account User", "description": "Delete an Account User", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The account does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/agent_bots": { "get": { "tags": [ "AgentBots" ], "operationId": "list-all-agent-bots", "summary": "List all AgentBots", "description": "List all agent bots available", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "description": "Array of agent bots", "items": { "$ref": "#/components/schemas/agent_bot" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "post": { "tags": [ "AgentBots" ], "operationId": "create-an-agent-bot", "summary": "Create an Agent Bot", "description": "Create an agent bot", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/platform_agent_bot_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/agent_bot" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/agent_bots/{id}": { "parameters": [ { "$ref": "#/components/parameters/agent_bot_id" } ], "get": { "tags": [ "AgentBots" ], "operationId": "get-details-of-a-single-agent-bot", "summary": "Get an agent bot details", "description": "Get the details of an agent bot", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/agent_bot" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The given agent bot ID does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "patch": { "tags": [ "AgentBots" ], "operationId": "update-an-agent-bot", "summary": "Update an agent bot", "description": "Update an agent bot's attributes", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/platform_agent_bot_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/agent_bot" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "delete": { "tags": [ "AgentBots" ], "operationId": "delete-an-agent-bot", "summary": "Delete an AgentBot", "description": "Delete an AgentBot", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The agent bot does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/users": { "post": { "tags": [ "Users" ], "operationId": "create-a-user", "summary": "Create a User", "description": "Create a User", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/users/{id}": { "parameters": [ { "$ref": "#/components/parameters/platform_user_id" } ], "get": { "tags": [ "Users" ], "operationId": "get-details-of-a-user", "summary": "Get an user details", "description": "Get the details of an user", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The given user does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "patch": { "tags": [ "Users" ], "operationId": "update-a-user", "summary": "Update a user", "description": "Update a user's attributes", "security": [ { "platformAppApiKey": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user_create_update_payload" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } }, "delete": { "tags": [ "Users" ], "operationId": "delete-a-user", "summary": "Delete a User", "description": "Delete a User", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The user does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } }, "/platform/api/v1/users/{id}/login": { "parameters": [ { "$ref": "#/components/parameters/platform_user_id" } ], "get": { "tags": [ "Users" ], "operationId": "get-sso-url-of-a-user", "summary": "Get User SSO Link", "description": "Get the sso link of a user", "security": [ { "platformAppApiKey": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "SSO url to autenticate the user" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } }, "404": { "description": "The given user does not exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bad_request_error" } } } } } } } }, "components": { "schemas": { "bad_request_error": { "title": "data", "type": "object", "properties": { "description": { "type": "string" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/request_error" } } } }, "request_error": { "type": "object", "properties": { "field": { "type": "string" }, "message": { "type": "string" }, "code": { "type": "string" } } }, "generic_id": { "type": "object", "properties": { "id": { "type": "number" } } }, "canned_response": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID of the canned response" }, "account_id": { "type": "integer", "description": "Account Id" }, "short_code": { "type": "string", "description": "Short Code for quick access of the canned response" }, "content": { "type": "string", "description": "Message content for canned response" }, "created_at": { "type": "string", "description": "The date and time when the canned response was created" }, "updated_at": { "type": "string", "description": "The date and time when the canned response was updated" } } }, "custom_attribute": { "type": "object", "properties": { "id": { "type": "integer", "description": "Identifier" }, "attribute_display_name": { "type": "string", "description": "Attribute display name" }, "attribute_display_type": { "type": "string", "description": "Attribute display type (text, number, currency, percent, link, date, list, checkbox)" }, "attribute_description": { "type": "string", "description": "Attribute description" }, "attribute_key": { "type": "string", "description": "Attribute unique key value" }, "regex_pattern": { "type": "string", "description": "Regex pattern" }, "regex_cue": { "type": "string", "description": "Regex cue" }, "attribute_values": { "type": "string", "description": "Attribute values" }, "attribute_model": { "type": "string", "description": "Attribute type(conversation_attribute/contact_attribute)" }, "default_value": { "type": "string", "description": "Attribute default value" }, "created_at": { "type": "string", "description": "The date and time when the custom attribute was created" }, "updated_at": { "type": "string", "description": "The date and time when the custom attribute was updated" } } }, "automation_rule": { "type": "object", "properties": { "payload": { "description": "Response payload that contains automation rule(s)", "oneOf": [ { "type": "array", "description": "Array of automation rules (for listing endpoint)", "items": { "$ref": "#/components/schemas/automation_rule_item" } }, { "type": "object", "description": "Single automation rule (for show/create/update endpoints)", "allOf": [ { "$ref": "#/components/schemas/automation_rule_item" } ] } ] } } }, "automation_rule_item": { "type": "object", "properties": { "id": { "type": "integer", "description": "The ID of the automation rule" }, "account_id": { "type": "integer", "description": "Account Id" }, "name": { "type": "string", "description": "The name of the rule", "example": "Add label on message create event" }, "description": { "type": "string", "description": "Description to give more context about the rule", "example": "Add label support and sales on message create event if incoming message content contains text help" }, "event_name": { "type": "string", "description": "Automation Rule event, on which we call the actions(conversation_created, conversation_updated, message_created)", "enum": [ "conversation_created", "conversation_updated", "message_created" ], "example": "message_created" }, "conditions": { "type": "array", "description": "Array of conditions on which conversation/message filter would work", "items": { "type": "object", "properties": { "values": { "type": "array", "items": { "type": "string" } }, "attribute_key": { "type": "string" }, "query_operator": { "type": "string" }, "filter_operator": { "type": "string" } }, "example": { "attribute_key": "content", "filter_operator": "contains", "values": [ "help" ], "query_operator": "and" } } }, "actions": { "type": "array", "description": "Array of actions which we perform when condition matches", "items": { "type": "object", "properties": { "action_name": { "type": "string" }, "action_params": { "type": "array", "items": { "type": "string" } } }, "example": { "action_name": "add_label", "action_params": [ "support", "sales" ] } } }, "created_on": { "type": "integer", "description": "The timestamp when the rule was created" }, "active": { "type": "boolean", "description": "Enable/disable automation rule" } } }, "portal": { "type": "object", "properties": { "payload": { "type": "array", "items": { "$ref": "#/components/schemas/portal_item" } } } }, "portal_single": { "type": "object", "properties": { "payload": { "$ref": "#/components/schemas/portal_item" } } }, "portal_config": { "type": "object", "description": "Configuration settings for the portal", "properties": { "allowed_locales": { "type": "array", "description": "List of allowed locales for the portal", "items": { "type": "object", "properties": { "code": { "type": "string", "description": "The language code" }, "articles_count": { "type": "integer", "description": "Number of articles in this locale" }, "categories_count": { "type": "integer", "description": "Number of categories in this locale" } } } } } }, "portal_logo": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID of the logo file" }, "portal_id": { "type": "integer", "description": "ID of the portal this logo belongs to" }, "file_type": { "type": "string", "description": "MIME type of the file" }, "account_id": { "type": "integer", "description": "ID of the account" }, "file_url": { "type": "string", "description": "URL to access the logo file" }, "blob_id": { "type": "integer", "description": "ID of the blob" }, "filename": { "type": "string", "description": "Name of the file" } } }, "portal_meta": { "type": "object", "properties": { "all_articles_count": { "type": "integer", "description": "Total number of articles" }, "archived_articles_count": { "type": [ "integer", "null" ], "description": "Number of archived articles" }, "published_count": { "type": [ "integer", "null" ], "description": "Number of published articles" }, "draft_articles_count": { "type": [ "integer", "null" ], "description": "Number of draft articles" }, "categories_count": { "type": "integer", "description": "Number of categories" }, "default_locale": { "type": "string", "description": "Default locale for the portal" } } }, "portal_item": { "type": "object", "properties": { "id": { "type": "integer", "description": "The ID of the portal" }, "archived": { "type": "boolean", "description": "Whether the portal is archived" }, "color": { "type": "string", "description": "The color code for the portal" }, "config": { "$ref": "#/components/schemas/portal_config" }, "custom_domain": { "type": "string", "description": "Custom domain for the portal" }, "header_text": { "type": "string", "description": "The header text for the portal" }, "homepage_link": { "type": "string", "description": "Homepage link for the portal" }, "name": { "type": "string", "description": "Name of the portal" }, "slug": { "type": "string", "description": "URL slug for the portal" }, "page_title": { "type": "string", "description": "Page title for the portal" }, "account_id": { "type": "integer", "description": "ID of the account the portal belongs to" }, "inbox": { "$ref": "#/components/schemas/inbox" }, "logo": { "$ref": "#/components/schemas/portal_logo" }, "meta": { "$ref": "#/components/schemas/portal_meta" } } }, "category": { "type": "object", "properties": { "id": { "type": "integer" }, "description": { "type": "string", "description": "The text content." }, "locale": { "type": "string" }, "name": { "type": "string" }, "slug": { "type": "string" }, "position": { "type": "integer" }, "portal_id": { "type": "integer" }, "account_id": { "type": "integer" }, "associated_category_id": { "type": "integer", "description": "To associate similar categories to each other, e.g same category of product documentation in different languages" }, "parent_category_id": { "type": "integer", "description": "To define parent category, e.g product documentation has multiple level features in sales category or in engineering category." } } }, "article": { "type": "object", "properties": { "id": { "type": "integer" }, "content": { "type": "string", "description": "The text content." }, "meta": { "type": "object" }, "position": { "type": "integer" }, "status": { "type": "integer", "enum": [ "draft", "published", "archived" ] }, "title": { "type": "string" }, "slug": { "type": "string" }, "views": { "type": "integer" }, "portal_id": { "type": "integer" }, "account_id": { "type": "integer" }, "author_id": { "type": "integer" }, "category_id": { "type": "integer" }, "folder_id": { "type": "integer" }, "associated_article_id": { "type": "integer", "description": "To associate similar articles to each other, e.g to provide the link for the reference." } } }, "contact": { "type": "object", "properties": { "payload": { "type": "array", "items": { "type": "object", "properties": { "additional_attributes": { "type": "object", "description": "The object containing additional attributes related to the contact" }, "availability_status": { "type": "string", "description": "The availability status of the contact" }, "email": { "type": "string", "description": "The email address of the contact" }, "id": { "type": "integer", "description": "The ID of the contact" }, "name": { "type": "string", "description": "The name of the contact" }, "phone_number": { "type": "string", "description": "The phone number of the contact" }, "blocked": { "type": "boolean", "description": "Whether the contact is blocked" }, "identifier": { "type": "string", "description": "The identifier of the contact" }, "thumbnail": { "type": "string", "description": "The thumbnail of the contact" }, "custom_attributes": { "type": "object", "description": "The custom attributes of the contact", "example": { "attribute_key": "attribute_value", "signed_up_at": "dd/mm/yyyy" } }, "last_activity_at": { "type": "integer", "description": "The last activity at of the contact" }, "created_at": { "type": "integer", "description": "The created at of the contact" }, "contact_inboxes": { "type": "array", "items": { "$ref": "#/components/schemas/contact_inboxes" } } } } } } }, "conversation": { "type": "object", "properties": { "id": { "type": "number", "description": "ID of the conversation" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/message" } }, "account_id": { "type": "number", "description": "Account Id" }, "uuid": { "type": "string", "description": "UUID of the conversation" }, "additional_attributes": { "type": "object", "description": "The object containing additional attributes related to the conversation" }, "agent_last_seen_at": { "type": "number", "description": "The last activity at of the agent" }, "assignee_last_seen_at": { "type": "number", "description": "The last activity at of the assignee" }, "can_reply": { "type": "boolean", "description": "Whether the conversation can be replied to" }, "contact_last_seen_at": { "type": "number", "description": "The last activity at of the contact" }, "custom_attributes": { "type": "object", "description": "The object to save custom attributes for conversation, accepts custom attributes key and value" }, "inbox_id": { "type": "number", "description": "ID of the inbox" }, "labels": { "type": "array", "items": { "type": "string" }, "description": "The labels of the conversation" }, "muted": { "type": "boolean", "description": "Whether the conversation is muted" }, "snoozed_until": { "type": [ "number", "null" ], "description": "The time at which the conversation will be unmuted" }, "status": { "type": "string", "enum": [ "open", "resolved", "pending" ], "description": "The status of the conversation" }, "created_at": { "type": "number", "description": "The time at which conversation was created" }, "updated_at": { "type": "number", "description": "The time at which conversation was updated" }, "timestamp": { "type": "number", "description": "The time at which conversation was created" }, "first_reply_created_at": { "type": [ "number", "null" ], "description": "The time at which the first reply was created" }, "unread_count": { "type": "number", "description": "The number of unread messages" }, "last_non_activity_message": { "oneOf": [ { "$ref": "#/components/schemas/message" }, { "type": "null" } ], "description": "The last non activity message" }, "last_activity_at": { "type": "number", "description": "The last activity at of the conversation" }, "priority": { "type": [ "string", "null" ], "description": "The priority of the conversation" }, "waiting_since": { "type": [ "number", "null" ], "description": "The time at which the conversation was waiting" }, "sla_policy_id": { "type": [ "number", "null" ], "description": "The ID of the SLA policy" }, "applied_sla": { "type": "object", "description": "The applied SLA" }, "sla_events": { "type": "array", "items": { "type": "object", "description": "SLA event objects" } } } }, "message": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the message" }, "content": { "type": "string", "description": "The text content of the message" }, "account_id": { "type": "number", "description": "The ID of the account" }, "inbox_id": { "type": "number", "description": "The ID of the inbox" }, "conversation_id": { "type": "number", "description": "The ID of the conversation" }, "message_type": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "description": "The type of the message" }, "created_at": { "type": "integer", "description": "The time at which message was created" }, "updated_at": { "type": [ "integer", "string" ], "description": "The time at which message was updated" }, "private": { "type": "boolean", "description": "The flags which shows whether the message is private or not" }, "status": { "type": [ "string", "null" ], "enum": [ "sent", "delivered", "read", "failed", null ], "description": "The status of the message" }, "source_id": { "type": [ "string", "null" ], "description": "The source ID of the message" }, "content_type": { "type": [ "string", "null" ], "enum": [ "text", "input_text", "input_textarea", "input_email", "input_select", "cards", "form", "article", "incoming_email", "input_csat", "integrations", "sticker", "voice_call", null ], "description": "The type of the template message" }, "content_attributes": { "type": "object", "description": "The content attributes for each content_type" }, "sender_type": { "type": [ "string", "null" ], "enum": [ "Contact", "User", "AgentBot", "Captain::Assistant", null ], "description": "The type of the sender" }, "sender_id": { "type": [ "number", "null" ], "description": "The ID of the sender" }, "external_source_ids": { "type": "object", "description": "The external source IDs of the message" }, "additional_attributes": { "type": "object", "description": "The additional attributes of the message" }, "processed_message_content": { "type": [ "string", "null" ], "description": "The processed message content" }, "sentiment": { "type": [ "object", "null" ], "description": "The sentiment of the message" }, "conversation": { "type": [ "object", "null" ], "description": "The conversation object" }, "attachment": { "type": [ "object", "null" ], "description": "The file object attached to the image" }, "sender": { "type": "object", "description": "User/Agent/AgentBot object" } } }, "user": { "type": "object", "properties": { "id": { "type": "number" }, "access_token": { "type": "string" }, "account_id": { "type": "number" }, "available_name": { "type": "string" }, "avatar_url": { "type": "string" }, "confirmed": { "type": "boolean" }, "display_name": { "type": [ "string", "null" ] }, "message_signature": { "type": [ "string", "null" ] }, "email": { "type": "string" }, "hmac_identifier": { "type": "string" }, "inviter_id": { "type": [ "number", "null" ] }, "name": { "type": "string" }, "provider": { "type": "string" }, "pubsub_token": { "type": "string" }, "role": { "type": "string", "enum": [ "agent", "administrator" ] }, "ui_settings": { "type": "object" }, "uid": { "type": "string" }, "type": { "type": [ "string", "null" ] }, "custom_attributes": { "type": "object", "description": "Available for users who are created through platform APIs and has custom attributes associated." }, "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number" }, "name": { "type": "string" }, "status": { "type": "string" }, "active_at": { "type": [ "string", "null" ], "format": "date-time" }, "role": { "type": "string", "enum": [ "administrator", "agent" ] }, "permissions": { "type": "array", "items": { "type": "string" } }, "availability": { "type": "string" }, "availability_status": { "type": "string" }, "auto_offline": { "type": "boolean" }, "custom_role_id": { "type": [ "number", "null" ] }, "custom_role": { "type": [ "object", "null" ] } } } } } }, "agent": { "type": "object", "properties": { "id": { "type": "integer" }, "account_id": { "type": "integer" }, "availability_status": { "type": "string", "enum": [ "online", "busy", "offline" ], "readOnly": true, "description": "The effective availability status of the agent, derived from the configured availability, auto-offline setting, and current presence. To update an agent's configured availability, use the availability field in create or update requests." }, "auto_offline": { "type": "boolean", "description": "Whether the agent is automatically marked offline when they are away." }, "confirmed": { "type": "boolean", "description": "Whether the agent has confirmed their email address." }, "email": { "type": "string", "description": "The email of the agent" }, "available_name": { "type": "string", "description": "The available name of the agent" }, "name": { "type": "string", "description": "The name of the agent" }, "role": { "type": "string", "enum": [ "agent", "administrator" ], "description": "The role of the agent" }, "thumbnail": { "type": "string", "description": "The thumbnail of the agent" }, "custom_role_id": { "type": [ "integer", "null" ], "description": "The custom role id of the agent" } } }, "inbox": { "type": "object", "properties": { "id": { "type": "number", "description": "ID of the inbox" }, "name": { "type": "string", "description": "The name of the inbox" }, "website_url": { "type": [ "string", "null" ], "description": "Website URL" }, "page_id": { "type": [ "string", "null" ], "description": "Facebook Page ID associated with the inbox" }, "instagram_id": { "type": [ "string", "null" ], "description": "Instagram account ID associated with the inbox" }, "business_id": { "type": [ "string", "null" ], "description": "TikTok business ID associated with the inbox" }, "provider_name": { "type": [ "string", "null" ], "description": "Provider username or page name associated with the social inbox" }, "profile_id": { "type": [ "string", "null" ], "description": "X profile ID associated with the inbox" }, "line_channel_id": { "type": [ "string", "null" ], "description": "LINE channel ID associated with the inbox" }, "email": { "type": [ "string", "null" ], "description": "Email address associated with the inbox" }, "bot_name": { "type": [ "string", "null" ], "description": "Telegram bot name associated with the inbox" }, "inbox_identifier": { "type": [ "string", "null" ], "description": "Public identifier associated with an API inbox" }, "channel_type": { "type": "string", "description": "The type of the inbox" }, "avatar_url": { "type": "string", "description": "The avatar image of the inbox" }, "widget_color": { "type": [ "string", "null" ], "description": "Widget Color used for customization of the widget" }, "website_token": { "type": [ "string", "null" ], "description": "Website Token" }, "enable_auto_assignment": { "type": "boolean", "description": "The flag which shows whether Auto Assignment is enabled or not" }, "web_widget_script": { "type": [ "string", "null" ], "description": "Script used to load the website widget" }, "welcome_title": { "type": [ "string", "null" ], "description": "Welcome title to be displayed on the widget" }, "welcome_tagline": { "type": [ "string", "null" ], "description": "Welcome tagline to be displayed on the widget" }, "greeting_enabled": { "type": "boolean", "description": "The flag which shows whether greeting is enabled" }, "greeting_message": { "type": [ "string", "null" ], "description": "A greeting message when the user starts the conversation" }, "channel_id": { "type": "number", "description": "ID of the channel this inbox belongs to" }, "working_hours_enabled": { "type": "boolean", "description": "The flag which shows whether working hours feature is enabled" }, "enable_email_collect": { "type": "boolean", "description": "The flag to enable collecting email from contacts" }, "csat_survey_enabled": { "type": "boolean", "description": "The flag to enable CSAT survey" }, "auto_assignment_config": { "type": "object", "description": "Configuration settings for auto assignment" }, "out_of_office_message": { "type": [ "string", "null" ], "description": "Message to show when agents are out of office" }, "working_hours": { "type": "array", "description": "Configuration for working hours of the inbox", "items": { "type": "object", "properties": { "day_of_week": { "type": "number", "description": "Day of the week (0-6, where 0 is Sunday)" }, "closed_all_day": { "type": "boolean", "description": "Whether the inbox is closed for the entire day" }, "open_hour": { "type": [ "number", "null" ], "description": "Hour when inbox opens (0-23)" }, "open_minutes": { "type": [ "number", "null" ], "description": "Minutes of the hour when inbox opens (0-59)" }, "close_hour": { "type": [ "number", "null" ], "description": "Hour when inbox closes (0-23)" }, "close_minutes": { "type": [ "number", "null" ], "description": "Minutes of the hour when inbox closes (0-59)" }, "open_all_day": { "type": "boolean", "description": "Whether the inbox is open for the entire day" } } } }, "timezone": { "type": "string", "description": "Timezone configuration for the inbox" }, "callback_webhook_url": { "type": [ "string", "null" ], "description": "Webhook URL for callbacks" }, "allow_messages_after_resolved": { "type": "boolean", "description": "Whether to allow messages after a conversation is resolved" }, "lock_to_single_conversation": { "type": "boolean", "description": "Whether to lock a contact to a single conversation" }, "sender_name_type": { "type": "string", "description": "Type of sender name to display (e.g., friendly)" }, "business_name": { "type": [ "string", "null" ], "description": "Business name associated with the inbox" }, "branded_email_layout": { "type": [ "string", "null" ], "description": "Liquid HTML layout for branded email replies. Available to administrators for Email inbox show/update responses." }, "hmac_mandatory": { "type": [ "boolean", "null" ], "description": "Whether HMAC verification is mandatory" }, "selected_feature_flags": { "type": [ "array", "null" ], "description": "Selected feature flags for the inbox", "items": { "type": "string" } }, "reply_time": { "type": [ "string", "null" ], "description": "Expected reply time" }, "messaging_service_sid": { "type": [ "string", "null" ], "description": "Messaging service SID for SMS providers" }, "phone_number": { "type": [ "string", "null" ], "description": "Phone number associated with the inbox" }, "medium": { "type": "string", "description": "Medium of communication (e.g., sms, email)" }, "provider": { "type": [ "string", "null" ], "description": "Provider of the channel" } } }, "branded_email_layout": { "type": "object", "properties": { "branded_email_layout": { "type": [ "string", "null" ], "description": "Account-scoped Liquid HTML layout for branded email replies.", "example": "
{{ content_for_layout }}" } } }, "inbox_contact": { "type": "object", "properties": { "id": { "type": "number", "description": "ID of the inbox" }, "avatar_url": { "type": "string", "description": "The avatar image of the inbox" }, "channel_id": { "type": "number", "description": "The ID of the channel" }, "name": { "type": "string", "description": "The name of the inbox" }, "channel_type": { "type": "string", "description": "The type of the inbox" }, "provider": { "type": "string", "description": "The provider of the inbox" } } }, "agent_bot": { "type": "object", "properties": { "id": { "type": "number", "description": "ID of the agent bot" }, "name": { "type": "string", "description": "The name of the agent bot" }, "description": { "type": "string", "description": "The description about the agent bot" }, "thumbnail": { "type": "string", "description": "The thumbnail of the agent bot" }, "outgoing_url": { "type": "string", "description": "The webhook URL for the bot" }, "bot_type": { "type": "string", "description": "The type of the bot" }, "bot_config": { "type": "object", "description": "The configuration of the bot" }, "account_id": { "type": "number", "description": "Account ID if it's an account specific bot" }, "access_token": { "type": "string", "description": "The access token for the bot" }, "system_bot": { "type": "boolean", "description": "Whether the bot is a system bot" } } }, "contact_inboxes": { "type": "object", "properties": { "source_id": { "type": "string", "description": "Contact Inbox Source Id" }, "inbox": { "$ref": "#/components/schemas/inbox_contact" } } }, "contactable_inboxes": { "type": "object", "properties": { "source_id": { "type": "string", "description": "Contact Inbox Source Id" }, "inbox": { "$ref": "#/components/schemas/inbox" } } }, "custom_filter": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the custom filter" }, "name": { "type": "string", "description": "The name of the custom filter" }, "type": { "type": "string", "enum": [ "conversation", "contact", "report" ], "description": "The description about the custom filter" }, "query": { "type": "object", "description": "A query that needs to be saved as a custom filter" }, "created_at": { "type": "string", "format": "date-time", "description": "The time at which the custom filter was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "The time at which the custom filter was updated" } } }, "webhook": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the webhook" }, "url": { "type": "string", "description": "The url to which the events will be send" }, "name": { "type": "string", "description": "The name of the webhook" }, "subscriptions": { "type": "array", "items": { "type": "string", "enum": [ "conversation_created", "conversation_status_changed", "conversation_updated", "contact_created", "contact_updated", "message_created", "message_updated", "webwidget_triggered", "conversation_typing_on", "conversation_typing_off" ] }, "description": "The list of subscribed events" }, "secret": { "type": "string", "nullable": true, "description": "Secret used to sign webhook requests. Signed webhook deliveries include `X-Chatwoot-Timestamp` and `X-Chatwoot-Signature`; the signature is `sha256=` followed by the HMAC-SHA256 of `{timestamp}.{raw_request_body}` using this secret. Deliveries also include `X-Chatwoot-Delivery` when a delivery id is available." }, "account_id": { "type": "number", "description": "The id of the account which the webhook object belongs to" } } }, "account": { "type": "object", "properties": { "id": { "type": "number", "description": "Account ID" }, "name": { "type": "string", "description": "Name of the account" }, "role": { "type": "string", "enum": [ "administrator", "agent" ], "description": "The user role in the account" } } }, "account_detail": { "type": "object", "properties": { "id": { "type": "number", "description": "Account ID" }, "name": { "type": "string", "description": "Name of the account" }, "locale": { "type": "string", "description": "The locale of the account" }, "domain": { "type": "string", "description": "The domain of the account" }, "support_email": { "type": "string", "description": "The support email of the account" }, "status": { "type": "string", "description": "The status of the account" }, "created_at": { "type": "string", "format": "date-time", "description": "The creation date of the account" }, "cache_keys": { "type": "object", "description": "Cache keys for the account" }, "features": { "type": "object", "description": "Enabled features for the account" }, "settings": { "type": "object", "description": "Account settings", "properties": { "auto_resolve_after": { "type": "number", "description": "Auto resolve conversations after specified minutes" }, "auto_resolve_message": { "type": "string", "description": "Message to send when auto resolving" }, "auto_resolve_ignore_waiting": { "type": "boolean", "description": "Whether to ignore waiting conversations for auto resolve" } } }, "custom_attributes": { "type": "object", "description": "Custom attributes of the account", "properties": { "plan_name": { "type": [ "string", "null" ], "description": "Subscription plan name" }, "subscribed_quantity": { "type": [ "number", "null" ], "description": "Subscribed quantity" }, "subscription_status": { "type": [ "string", "null" ], "description": "Subscription status" }, "subscription_ends_on": { "type": [ "string", "null" ], "format": "date", "description": "Subscription end date" }, "industry": { "type": "string", "description": "Industry type" }, "company_size": { "type": "string", "description": "Company size" }, "timezone": { "type": "string", "description": "Account timezone" }, "logo": { "type": "string", "description": "Account logo URL" }, "onboarding_step": { "type": "string", "description": "Current onboarding step" }, "marked_for_deletion_at": { "type": "string", "format": "date-time", "description": "When account was marked for deletion" }, "marked_for_deletion_reason": { "type": "string", "description": "Reason for account deletion" } } } } }, "account_show_response": { "allOf": [ { "$ref": "#/components/schemas/account_detail" }, { "type": "object", "properties": { "latest_chatwoot_version": { "type": [ "string", "null" ], "description": "Latest version of Chatwoot available", "example": "3.0.0" }, "subscribed_features": { "type": "array", "items": { "type": "string" }, "description": "List of subscribed enterprise features (if enterprise edition is enabled)" } } } ] }, "account_user": { "type": "array", "description": "Array of account users", "items": { "type": "object", "properties": { "account_id": { "type": "integer", "description": "The ID of the account" }, "user_id": { "type": "integer", "description": "The ID of the user" }, "role": { "type": "string", "description": "whether user is an administrator or agent" } } } }, "platform_account": { "type": "object", "properties": { "id": { "type": "number", "description": "Account ID" }, "name": { "type": "string", "description": "Name of the account" } } }, "team": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the team" }, "name": { "type": "string", "description": "The name of the team" }, "description": { "type": [ "string", "null" ], "description": "The description about the team" }, "allow_auto_assign": { "type": "boolean", "description": "If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team" }, "account_id": { "type": "number", "description": "The ID of the account with the team is a part of" }, "is_member": { "type": "boolean", "description": "This field shows whether the current user is a part of the team" } } }, "label": { "type": "object", "properties": { "id": { "type": "number", "description": "The ID of the label" }, "title": { "type": "string", "description": "The title of the label" }, "description": { "type": "string", "description": "The description of the label" }, "color": { "type": "string", "description": "Hex color code for the label" }, "show_on_sidebar": { "type": "boolean", "description": "Whether the label should appear in the sidebar" } } }, "integrations_app": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration" }, "name": { "type": "string", "description": "The name of the integration" }, "description": { "type": "string", "description": "The description about the team" }, "hook_type": { "type": "string", "description": "Whether the integration is an account or inbox integration" }, "enabled": { "type": "boolean", "description": "Whether the integration is enabled for the account" }, "allow_multiple_hooks": { "type": "boolean", "description": "Whether multiple hooks can be created for the integration" }, "hooks": { "type": "array", "items": { "type": "object" }, "description": "If there are any hooks created for this integration" } } }, "integrations_hook": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration hook" }, "app_id": { "type": "string", "description": "The ID of the integration app" }, "inbox_id": { "type": "string", "description": "Inbox ID if its an Inbox integration" }, "account_id": { "type": "string", "description": "Account ID of the integration" }, "status": { "type": "boolean", "description": "Whether the integration hook is enabled for the account" }, "hook_type": { "type": "boolean", "description": "Whether its an account or inbox integration hook" }, "settings": { "type": "object", "description": "The associated settings for the integration" } } }, "audit_log": { "type": "object", "properties": { "id": { "type": "integer", "description": "Unique identifier for the audit log entry" }, "auditable_id": { "type": "integer", "description": "The ID of the audited object" }, "auditable_type": { "type": "string", "description": "The type of the audited object (e.g., Conversation, Contact, User)" }, "auditable": { "type": "object", "description": "The audited object data" }, "associated_id": { "type": "integer", "description": "The ID of the associated object (typically the account ID)" }, "associated_type": { "type": "string", "description": "The type of the associated object" }, "user_id": { "type": "integer", "description": "The ID of the user who performed the action" }, "user_type": { "type": "string", "description": "The type of user who performed the action" }, "username": { "type": "string", "description": "The email/username of the user who performed the action" }, "action": { "type": "string", "enum": [ "create", "update", "destroy" ], "description": "The action performed on the object" }, "audited_changes": { "type": "object", "description": "JSON object containing the changes made to the audited object" }, "version": { "type": "integer", "description": "Version number of the audit log entry" }, "comment": { "type": [ "string", "null" ], "description": "Optional comment associated with the audit log entry" }, "request_uuid": { "type": "string", "description": "UUID to identify the request that generated this audit log" }, "created_at": { "type": "integer", "description": "Unix timestamp when the audit log entry was created" }, "remote_address": { "type": [ "string", "null" ], "description": "IP address from which the action was performed" } } }, "public_contact": { "type": "object", "properties": { "id": { "type": "integer", "description": "Id of the contact" }, "source_id": { "type": "string", "description": "The session identifier of the contact" }, "name": { "type": [ "string", "null" ], "description": "Name of the contact when available" }, "email": { "type": [ "string", "null" ], "description": "Email of the contact" }, "phone_number": { "type": [ "string", "null" ], "description": "Phone number of the contact" }, "pubsub_token": { "type": "string", "description": "The token to be used to connect to chatwoot websocket" } } }, "public_contact_record": { "type": "object", "additionalProperties": true, "description": "Full serialized contact record returned when the public API renders a Contact model directly.", "properties": { "id": { "type": "integer", "description": "Id of the contact" }, "name": { "type": [ "string", "null" ], "description": "Name of the contact when available" }, "email": { "type": [ "string", "null" ], "description": "Email of the contact" }, "phone_number": { "type": [ "string", "null" ], "description": "Phone number of the contact" }, "identifier": { "type": [ "string", "null" ], "description": "Identifier of the contact" }, "blocked": { "type": "boolean", "description": "Whether the contact is blocked" }, "additional_attributes": { "type": [ "object", "null" ], "description": "Additional attributes of the contact when present" }, "custom_attributes": { "type": [ "object", "null" ], "description": "Custom attributes of the contact when present" }, "contact_type": { "type": [ "string", "null" ], "description": "Contact type of the contact when available" }, "country_code": { "type": [ "string", "null" ], "description": "Country code of the contact" }, "last_activity_at": { "type": [ "string", "null" ], "description": "Last activity timestamp of the contact in ISO 8601 format" }, "created_at": { "type": [ "string", "null" ], "description": "Created timestamp of the contact in ISO 8601 format" }, "updated_at": { "type": [ "string", "null" ], "description": "Updated timestamp of the contact in ISO 8601 format" }, "last_name": { "type": [ "string", "null" ], "description": "Last name of the contact" }, "middle_name": { "type": [ "string", "null" ], "description": "Middle name of the contact" }, "location": { "type": [ "string", "null" ], "description": "Location of the contact" }, "account_id": { "type": "integer", "description": "Account id of the contact" }, "company_id": { "type": [ "integer", "null" ], "description": "Company id of the contact" }, "label_list": { "type": "array", "description": "Labels applied to the contact", "items": { "type": "string" } } } }, "public_conversation": { "type": "object", "properties": { "id": { "type": "integer", "description": "Id of the conversation" }, "uuid": { "type": "string", "description": "UUID of the conversation" }, "inbox_id": { "type": "integer", "description": "The inbox id of the conversation" }, "contact_last_seen_at": { "type": "integer", "description": "Timestamp of when the contact last seen the conversation (Unix timestamp)" }, "status": { "type": "string", "enum": [ "open", "resolved", "pending", "snoozed" ], "description": "The status of the conversation" }, "agent_last_seen_at": { "type": "integer", "description": "Timestamp of when the agent last seen the conversation (Unix timestamp)" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/public_message" }, "description": "Messages in the conversation" }, "contact": { "$ref": "#/components/schemas/public_contact_record" } } }, "public_message": { "type": "object", "properties": { "id": { "type": "integer", "description": "Id of the message" }, "content": { "type": [ "string", "null" ], "description": "Text content of the message. Can be null for attachment-only messages." }, "message_type": { "type": "integer", "description": "Denotes the message type. Possible values: 0 (incoming), 1 (outgoing), 2 (activity), 3 (template)" }, "content_type": { "type": "string", "description": "Content type of the message" }, "content_attributes": { "type": "object", "description": "Additional content attributes of the message" }, "created_at": { "type": "integer", "description": "Created at Unix timestamp of the message" }, "conversation_id": { "type": "integer", "description": "Display Id of the conversation the message belongs to" }, "attachments": { "type": "array", "description": "Attachments if any", "items": { "$ref": "#/components/schemas/public_message_attachment" } }, "sender": { "$ref": "#/components/schemas/public_message_sender" } } }, "public_message_attachment": { "type": "object", "additionalProperties": true, "description": "Attachment payload. Available fields vary by attachment file_type.", "properties": { "id": { "type": "integer", "description": "Id of the attachment" }, "message_id": { "type": "integer", "description": "Id of the parent message" }, "file_type": { "type": "string", "enum": [ "image", "audio", "video", "file", "location", "fallback", "share", "story_mention", "contact", "ig_reel", "ig_post", "ig_story", "embed" ], "description": "Type of the attached file" }, "account_id": { "type": "integer", "description": "Id of the account" }, "extension": { "type": [ "string", "null" ], "description": "File extension" }, "data_url": { "type": [ "string", "null" ], "description": "URL of the file. Can be null when an attachment variant has no external URL." }, "thumb_url": { "type": "string", "description": "URL of the file thumbnail" }, "file_size": { "type": "integer", "description": "File size in bytes" }, "width": { "type": [ "integer", "null" ], "description": "Width of the attachment when available" }, "height": { "type": [ "integer", "null" ], "description": "Height of the attachment when available" }, "coordinates_lat": { "type": "number", "description": "Latitude for location attachments" }, "coordinates_long": { "type": "number", "description": "Longitude for location attachments" }, "fallback_title": { "type": [ "string", "null" ], "description": "Fallback title for location, fallback, and contact attachments when available" }, "meta": { "type": "object", "description": "Metadata for contact attachments" }, "transcribed_text": { "type": "string", "description": "Transcribed text for audio attachments" } } }, "public_message_sender": { "type": "object", "additionalProperties": true, "description": "Polymorphic sender payload returned by push_event_data. Available fields vary by sender type.", "properties": { "id": { "type": "integer", "description": "Id of the sender" }, "name": { "type": [ "string", "null" ], "description": "Name of the sender when available" }, "avatar_url": { "type": "string", "description": "Avatar URL of the sender. Present for senders of type user, agent_bot, and captain_assistant. Not present for contact senders (use thumbnail instead)." }, "thumbnail": { "type": "string", "description": "Avatar/thumbnail URL of the sender. Contact senders use this field; user senders may also include it." }, "type": { "type": "string", "enum": [ "contact", "user", "agent_bot", "captain_assistant" ], "description": "Type of the sender" }, "available_name": { "type": [ "string", "null" ], "description": "Display name for user senders" }, "availability_status": { "type": [ "string", "null" ], "description": "Availability status for user senders" }, "email": { "type": [ "string", "null" ], "description": "Email of the sender when the sender is a contact" }, "phone_number": { "type": [ "string", "null" ], "description": "Phone number of the sender when the sender is a contact" }, "identifier": { "type": [ "string", "null" ], "description": "Identifier of the sender when the sender is a contact" }, "blocked": { "type": "boolean", "description": "Whether the sender is blocked when the sender is a contact" }, "additional_attributes": { "type": [ "object", "null" ], "description": "Additional attributes when the sender is a contact and available" }, "custom_attributes": { "type": [ "object", "null" ], "description": "Custom attributes when the sender is a contact and available" }, "description": { "type": [ "string", "null" ], "description": "Description when the sender is a captain assistant" }, "created_at": { "type": [ "string", "null" ], "description": "Created timestamp in ISO 8601 format when the sender is a captain assistant" } } }, "public_inbox": { "type": "object", "properties": { "identifier": { "type": "string", "description": "Inbox identifier" }, "name": { "type": "string", "description": "Name of the inbox" }, "timezone": { "type": "string", "description": "The timezone defined on the inbox" }, "working_hours": { "type": "array", "description": "The working hours defined on the inbox", "items": { "type": "object", "properties": { "day_of_week": { "type": "integer", "description": "Day of the week as a number. Sunday -> 0, Saturday -> 6" }, "open_all_day": { "type": "boolean", "description": "Whether or not the business is open the whole day" }, "closed_all_day": { "type": "boolean", "description": "Whether or not the business is closed the whole day" }, "open_hour": { "type": "integer", "description": "Opening hour. Can be null if closed all day" }, "open_minutes": { "type": "integer", "description": "Opening minute. Can be null if closed all day" }, "close_hour": { "type": "integer", "description": "Closing hour. Can be null if closed all day" }, "close_minutes": { "type": "integer", "description": "Closing minute. Can be null if closed all day" } } } }, "working_hours_enabled": { "type": "boolean", "description": "Whether of not the working hours are enabled on the inbox" }, "csat_survey_enabled": { "type": "boolean", "description": "Whether of not the Customer Satisfaction survey is enabled on the inbox" }, "greeting_enabled": { "type": "boolean", "description": "Whether of not the Greeting Message is enabled on the inbox" }, "identity_validation_enabled": { "type": "boolean", "description": "Whether of not the User Identity Validation is enforced on the inbox" } } }, "account_create_update_payload": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the account", "example": "My Account" }, "locale": { "type": "string", "description": "The locale of the account", "example": "en" }, "domain": { "type": "string", "description": "The domain of the account", "example": "example.com" }, "support_email": { "type": "string", "description": "The support email of the account", "example": "support@example.com" }, "status": { "type": "string", "enum": [ "active", "suspended" ], "description": "The status of the account", "example": "active" }, "limits": { "type": "object", "description": "The limits of the account", "example": {} }, "custom_attributes": { "type": "object", "description": "The custom attributes of the account", "example": {} } } }, "account_update_payload": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the account", "example": "My Account" }, "locale": { "type": "string", "description": "The locale of the account", "example": "en" }, "domain": { "type": "string", "description": "The domain of the account", "example": "example.com" }, "support_email": { "type": "string", "description": "The support email of the account", "example": "support@example.com" }, "auto_resolve_after": { "type": [ "integer", "null" ], "minimum": 10, "maximum": 1439856, "description": "Auto resolve conversations after specified minutes", "example": 1440 }, "auto_resolve_message": { "type": [ "string", "null" ], "description": "Message to send when auto resolving", "example": "This conversation has been automatically resolved due to inactivity" }, "auto_resolve_ignore_waiting": { "type": [ "boolean", "null" ], "description": "Whether to ignore waiting conversations for auto resolve", "example": false }, "industry": { "type": "string", "description": "Industry type", "example": "Technology" }, "company_size": { "type": "string", "description": "Company size", "example": "50-100" }, "timezone": { "type": "string", "description": "Account timezone", "example": "UTC" } } }, "account_user_create_update_payload": { "type": "object", "required": [ "user_id", "role" ], "properties": { "user_id": { "type": "integer", "description": "The ID of the user", "example": 1 }, "role": { "type": "string", "description": "whether user is an administrator or agent", "example": "administrator" } } }, "platform_agent_bot_create_update_payload": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the agent bot", "example": "My Agent Bot" }, "description": { "type": "string", "description": "The description of the agent bot", "example": "This is a sample agent bot" }, "outgoing_url": { "type": "string", "description": "The webhook URL for the bot", "example": "https://example.com/webhook" }, "account_id": { "type": "integer", "description": "The account ID to associate the agent bot with", "example": 1 }, "avatar": { "type": "string", "format": "binary", "description": "Send the form data with the avatar image binary or use the avatar_url" }, "avatar_url": { "type": "string", "description": "The url to a jpeg, png file for the agent bot avatar", "example": "https://example.com/avatar.png" } } }, "agent_bot_create_update_payload": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the agent bot", "example": "My Agent Bot" }, "description": { "type": "string", "description": "The description of the agent bot", "example": "This is a sample agent bot" }, "outgoing_url": { "type": "string", "description": "The webhook URL for the bot", "example": "https://example.com/webhook" }, "avatar": { "type": "string", "format": "binary", "description": "Send the form data with the avatar image binary or use the avatar_url" }, "avatar_url": { "type": "string", "description": "The url to a jpeg, png file for the agent bot avatar", "example": "https://example.com/avatar.png" }, "bot_type": { "type": "integer", "description": "The type of the bot (0 for webhook)", "example": 0 }, "bot_config": { "type": "object", "description": "The configuration for the bot", "example": {} } } }, "user_create_update_payload": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the user", "example": "Daniel" }, "display_name": { "type": "string", "description": "Display name of the user", "example": "Dan" }, "email": { "type": "string", "description": "Email of the user", "example": "daniel@acme.inc" }, "password": { "type": "string", "description": "Password must contain uppercase, lowercase letters, number and a special character", "example": "Password2!" }, "custom_attributes": { "type": "object", "description": "Custom attributes you want to associate with the user", "example": {} } } }, "canned_response_create_update_payload": { "type": "object", "properties": { "content": { "type": "string", "description": "Message content for canned response", "example": "Hello, {{contact.name}}! Welcome to our service." }, "short_code": { "type": "string", "description": "Short Code for quick access of the canned response", "example": "welcome" } } }, "custom_attribute_create_update_payload": { "type": "object", "properties": { "attribute_display_name": { "type": "string", "description": "Attribute display name", "example": "Custom Attribute" }, "attribute_display_type": { "type": "integer", "description": "Attribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7)", "example": 0 }, "attribute_description": { "type": "string", "description": "Attribute description", "example": "This is a custom attribute" }, "attribute_key": { "type": "string", "description": "Attribute unique key value", "example": "custom_attribute" }, "attribute_values": { "type": "array", "description": "Attribute values", "items": { "type": "string" }, "example": [ "value1", "value2" ] }, "attribute_model": { "type": "integer", "description": "Attribute type(conversation_attribute- 0, contact_attribute- 1)", "example": 0 }, "regex_pattern": { "type": "string", "description": "Regex pattern (Only applicable for type- text). The regex pattern is used to validate the attribute value(s).", "example": "^[a-zA-Z0-9]+$" }, "regex_cue": { "type": "string", "description": "Regex cue message (Only applicable for type- text). The cue message is shown when the regex pattern is not matched.", "example": "Please enter a valid value" } } }, "agent_create_payload": { "type": "object", "required": [ "name", "email", "role" ], "properties": { "name": { "type": "string", "description": "Full Name of the agent", "example": "John Doe" }, "email": { "type": "string", "description": "Email of the Agent", "example": "john.doe@acme.inc" }, "role": { "type": "string", "enum": [ "agent", "administrator" ], "description": "Whether its administrator or agent", "example": "agent" }, "availability": { "type": "string", "enum": [ "online", "busy", "offline" ], "description": "The configured availability of the agent.", "example": "online" }, "auto_offline": { "type": "boolean", "description": "Whether the agent is automatically marked offline when they are away.", "example": true } } }, "agent_update_payload": { "type": "object", "required": [ "role" ], "properties": { "role": { "type": "string", "enum": [ "agent", "administrator" ], "description": "Whether its administrator or agent", "example": "agent" }, "availability": { "type": "string", "enum": [ "online", "busy", "offline" ], "description": "The configured availability of the agent.", "example": "online" }, "auto_offline": { "type": "boolean", "description": "Whether the agent is automatically marked offline when they are away.", "example": true } } }, "contact_create_payload": { "type": "object", "required": [ "inbox_id" ], "properties": { "inbox_id": { "type": "number", "description": "ID of the inbox to which the contact belongs", "example": 1 }, "name": { "type": "string", "description": "name of the contact", "example": "Alice" }, "email": { "type": "string", "description": "email of the contact", "example": "alice@acme.inc" }, "blocked": { "type": "boolean", "description": "whether the contact is blocked or not", "example": false }, "phone_number": { "type": "string", "description": "phone number of the contact", "example": "+123456789" }, "avatar": { "type": "string", "format": "binary", "description": "Send the form data with the avatar image binary or use the avatar_url" }, "avatar_url": { "type": "string", "description": "The url to a jpeg, png file for the contact avatar", "example": "https://example.com/avatar.png" }, "identifier": { "type": "string", "description": "A unique identifier for the contact in external system", "example": "1234567890" }, "additional_attributes": { "type": "object", "description": "An object where you can store additional attributes for contact. example {\"type\":\"customer\", \"age\":30}", "example": { "type": "customer", "age": 30 } }, "custom_attributes": { "type": "object", "description": "An object where you can store custom attributes for contact. example {\"type\":\"customer\", \"age\":30}, this should have a valid custom attribute definition.", "example": {} } } }, "contact_update_payload": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the contact", "example": "Alice" }, "email": { "type": "string", "description": "email of the contact", "example": "alice@acme.inc" }, "blocked": { "type": "boolean", "description": "whether the contact is blocked or not", "example": false }, "phone_number": { "type": "string", "description": "phone number of the contact", "example": "+123456789" }, "avatar": { "type": "string", "format": "binary", "description": "Send the form data with the avatar image binary or use the avatar_url" }, "avatar_url": { "type": "string", "description": "The url to a jpeg, png file for the contact avatar", "example": "https://example.com/avatar.png" }, "identifier": { "type": "string", "description": "A unique identifier for the contact in external system", "example": "1234567890" }, "additional_attributes": { "type": "object", "description": "An object where you can store additional attributes for contact. example {\"type\":\"customer\", \"age\":30}", "example": { "type": "customer", "age": 30 } }, "custom_attributes": { "type": "object", "description": "An object where you can store custom attributes for contact. example {\"type\":\"customer\", \"age\":30}, this should have a valid custom attribute definition.", "example": {} } } }, "conversation_create_payload": { "type": "object", "required": [ "source_id" ], "properties": { "source_id": { "type": "string", "description": "Conversation source id", "example": "1234567890" }, "inbox_id": { "type": "integer", "description": "Id of inbox in which the conversation is created