openapi: 3.0.3 info: title: Chatwoot Account AgentBots API 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/ tags: - name: Account AgentBots description: Account-specific Agent Bots paths: /api/v1/accounts/{account_id}/agent_bots: parameters: - $ref: '#/components/parameters/account_id' get: tags: - Account AgentBots operationId: list-all-account-agent-bots summary: List all AgentBots description: List all agent bots available for the current account security: - userApiKey: [] 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: - Account AgentBots operationId: create-an-account-agent-bot summary: Create an Agent Bot description: Create an agent bot in the account security: - userApiKey: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/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' /api/v1/accounts/{account_id}/agent_bots/{id}: parameters: - $ref: '#/components/parameters/account_id' - $ref: '#/components/parameters/agent_bot_id' get: tags: - Account AgentBots operationId: get-details-of-a-single-account-agent-bot summary: Get an agent bot details description: Get the details of an agent bot in the account security: - userApiKey: [] 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 in the account content: application/json: schema: $ref: '#/components/schemas/bad_request_error' patch: tags: - Account AgentBots operationId: update-an-account-agent-bot summary: Update an agent bot description: Update an agent bot's attributes security: - userApiKey: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/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: - Account AgentBots operationId: delete-an-account-agent-bot summary: Delete an AgentBot description: Delete an AgentBot from the account security: - userApiKey: [] 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 in the account content: application/json: schema: $ref: '#/components/schemas/bad_request_error' components: schemas: 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 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: {} 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 parameters: agent_bot_id: in: path name: id schema: type: integer required: true description: The ID of the agentbot to be updated account_id: in: path name: account_id schema: type: integer required: true description: The numeric ID of the account securitySchemes: userApiKey: type: apiKey in: header name: api_access_token description: This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user. agentBotApiKey: type: apiKey in: header name: api_access_token description: This token should be provided by system admin or obtained via rails console. This token can be used to build bot integrations and can only access limited apis. platformAppApiKey: type: apiKey in: header name: api_access_token description: This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles. x-tagGroups: - name: Platform tags: - Accounts - Account Users - AgentBots - Users - name: Application tags: - Account AgentBots - Account - Agents - Audit Logs - Canned Responses - Contacts - Contact Labels - Conversation Assignments - Conversation Labels - Conversations - Custom Attributes - Custom Filters - Inboxes - Integrations - Labels - Messages - Profile - Reports - Teams - Webhooks - Automation Rule - Help Center - name: Client tags: - Contacts API - Conversations API - Messages API - name: Others tags: - CSAT Survey Page