Chatwoot AgentBots API

Bot integrations

OpenAPI Specification

chatwoot-agentbots-api-openapi.yml Raw ↑
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: AgentBots
  description: Bot integrations
paths:
  /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'
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
    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
    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
  parameters:
    agent_bot_id:
      in: path
      name: id
      schema:
        type: integer
      required: true
      description: The ID of the agentbot to be updated
  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