> ## Documentation Index
> Fetch the complete documentation index at: https://developers.chatwoot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an agent bot

> Update an agent bot's attributes



## OpenAPI

````yaml https://raw.githubusercontent.com/chatwoot/chatwoot/develop/swagger/tag_groups/application_swagger.json patch /api/v1/accounts/{account_id}/agent_bots/{id}
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/
security: []
tags:
  - name: Account AgentBots
    description: Account-specific Agent Bots
  - name: Agents
    description: Agent management APIs
  - name: Canned Responses
    description: Pre-defined responses for common queries
  - name: Contacts
    description: Contact management APIs
  - name: Contact Labels
    description: Manage contact labels
  - name: Conversation Assignments
    description: Manage conversation assignments
  - name: Conversation Labels
    description: Manage conversation labels
  - name: Conversations
    description: Conversation management APIs
  - name: Custom Attributes
    description: Custom fields for contacts and conversations
  - name: Custom Filters
    description: Saved filters for conversations
  - name: Inboxes
    description: Communication channels setup
  - name: Integrations
    description: Third-party integrations
  - name: Labels
    description: Account label management APIs
  - name: Messages
    description: Message management APIs
  - name: Profile
    description: User profile APIs
  - name: Reports
    description: Analytics and reporting APIs
  - name: Teams
    description: Team management APIs
  - name: Webhooks
    description: Event notification webhooks
  - name: Automation Rule
    description: Workflow automation rules
  - name: Help Center
    description: Knowledge base management
paths:
  /api/v1/accounts/{account_id}/agent_bots/{id}:
    parameters:
      - $ref: '#/components/parameters/account_id'
      - $ref: '#/components/parameters/agent_bot_id'
    patch:
      tags:
        - Account AgentBots
      summary: Update an agent bot
      description: Update an agent bot's attributes
      operationId: update-an-account-agent-bot
      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'
      security:
        - userApiKey: []
components:
  parameters:
    account_id:
      in: path
      name: account_id
      schema:
        type: integer
      required: true
      description: The numeric ID of the account
    agent_bot_id:
      in: path
      name: id
      schema:
        type: integer
      required: true
      description: The ID of the agentbot to be updated
  schemas:
    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: {}
    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
  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.

````