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

# Update agent

> Updates the properties of an agent specified by `id`. Can be [sent in batch](/api/configuration/v3.6/batch-requests).

**Required scopes:** `agents--my:rw`, <Tooltip tip="To update other agents within the same license.">`agents--all:rw`</Tooltip> <Tooltip tip="To update the agent role.">`accounts.roles.lc--all:rw`</Tooltip>


## OpenAPI

````yaml /api/configuration/v3.6/openapi.json post /action/update_agent
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.6
servers:
  - url: https://api.livechatinc.com/v3.6/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/update_agent:
    post:
      tags:
        - Agents
      summary: Update agent
      description: >-
        Updates the properties of an agent specified by `id`. Can be [sent in
        batch](/api/configuration/v3.6/batch-requests).
      operationId: update-agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentRequest'
            example:
              id: smith@example.com
              role: viceowner
              groups:
                - id: 5
                  priority: first
                - id: 2
                  priority: last
                - id: 1
                  priority: normal
              notifications:
                - new_visitor
                - new_goal
                - visitor_is_typing
              email_subscriptions:
                - weekly_summary
      responses:
        '200':
          description: Agent updated successfully.
components:
  schemas:
    UpdateAgentRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The agent ID.
        role:
          type: string
          enum:
            - viceowner
            - administrator
            - normal
          description: The agent role.
        login_status:
          type: string
          enum:
            - accepting chats
            - not accepting chats
          description: The agent's default status right after login.
          default: not accepting chats
        job_title:
          type: string
          description: The agent's job title.
        mobile:
          type: string
          description: The agent's mobile number.
        max_chats_count:
          type: integer
          description: The agent's maximum number of concurrent chats.
          maximum: 20
        groups:
          type: array
          items:
            $ref: '#/components/schemas/Group'
          description: Groups the agent belongs to.
        notifications:
          type: array
          items:
            type: string
            enum:
              - new_visitor
              - incoming_chat
              - returning_visitor
              - queued_visitor
              - visitor_is_typing
              - new_goal
              - unassigned_chats
              - unassigned_chat_messages
              - ticket
              - inactive_notifications
              - mute_all_sounds
              - repeat_sound_notifications
              - ticket_notifications
              - incoming_message_for_focused_chat
          description: Agent notifications that are turned on.
        email_subscriptions:
          type: array
          items:
            type: string
            enum:
              - daily_summary
              - weekly_summary
          description: Subscriptions that will be sent to the agent via email.
        work_scheduler:
          $ref: '#/components/schemas/WorkScheduler'
          description: The work scheduler options to set for the agent.
    Group:
      type: object
      properties:
        id:
          type: integer
          description: The group ID.
        name:
          type: string
          description: The group name.
        language_code:
          type: string
          description: The code of the group language.
        agent_priorities:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AgentPriority'
          description: >-
            The agents' priorities in the group as a map in the `"<id>":
            "<priority>"` format. Returned only when `agent_priorities` is
            passed in the `fields` parameter.
        routing_status:
          type: string
          description: >-
            The routing status of the group. Returned only when `routing_status`
            is passed in the `fields` parameter.
    WorkScheduler:
      type: object
      required:
        - timezone
        - schedule
      properties:
        timezone:
          type: string
          description: >-
            The timezone for the work scheduler. Falls back to the agent's
            timezone if empty. Required when `schedule` is not empty.
        schedule:
          type: array
          items:
            $ref: '#/components/schemas/WorkScheduleDay'
          description: The list of agent's working hours.
    AgentPriority:
      type: string
      enum:
        - first
        - normal
        - last
        - supervisor
      description: >-
        The agent's chat routing priority in a group.


        - `first` — the highest chat routing priority. Agents with the `first`
        priority get chats before others from the same group.

        - `normal` — the medium chat routing priority. Agents with the `normal`
        priority get chats before those with the `last` priority, when there are
        no agents with the `first` priority available with free slots in the
        group.

        - `last` — the lowest chat routing priority. Agents with the `last`
        priority get chats when there are no agents with the `first` or `normal`
        priority available with free slots in the group.

        - `supervisor` — agents with the `supervisor` priority will not get any
        chats assigned automatically.
    WorkScheduleDay:
      type: object
      required:
        - day
        - enabled
        - start
        - end
      properties:
        day:
          type: string
          enum:
            - sunday
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
          description: The day for which the working hours are set.
        enabled:
          type: boolean
          description: 'If set to `true`: the given set of working hours is enabled.'
        start:
          type: string
          description: The time when the working hours start.
        end:
          type: string
          description: The time when the working hours end.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````