> ## 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.

# Get agent

> Returns the info about an agent specified by `id`.

**Required scopes:** `agents--my:ro`, `agents--all:ro`


## OpenAPI

````yaml /api/configuration/v3.7/openapi.json post /action/get_agent
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.7
servers:
  - url: https://api.livechatinc.com/v3.7/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/get_agent:
    post:
      tags:
        - Agents
      summary: Get agent
      description: Returns the info about an agent specified by `id`.
      operationId: get-agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAgentRequest'
            example:
              id: smith@example.com
      responses:
        '200':
          description: Agent details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
              example:
                id: smith@example.com
                account_id: d24fa41e-bc16-41b8-a15b-9ca45ff7e0cf
                name: Agent Smith
                avatar: https://domain.com/avatar.image.jpg
                role: administrator
                login_status: accepting chats
components:
  schemas:
    GetAgentRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The agent ID.
        fields:
          $ref: '#/components/schemas/AgentFields'
    Agent:
      type: object
      properties:
        id:
          type: string
          description: The agent ID.
        account_id:
          type: string
          description: Unique identifier of the agent's account.
        name:
          type: string
          description: The agent name.
        avatar:
          type: string
          description: The URL of the agent's avatar.
        role:
          type: string
          enum:
            - owner
            - viceowner
            - administrator
            - normal
          description: The agent role.
        login_status:
          type: string
          enum:
            - accepting chats
            - not accepting chats
          description: The agent's current login status.
        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.
        suspended:
          type: boolean
          description: 'If `true`: the agent is suspended.'
        awaiting_approval:
          type: boolean
          description: 'If `true`: the agent is awaiting approval.'
        last_logout:
          type: string
          description: >-
            The RFC 3339 date-time of the agent's last logout. Omitted when no
            logout occurred.
        notifications:
          type: array
          items:
            type: string
          description: Agent notifications that are enabled.
        email_subscriptions:
          type: array
          items:
            type: string
          description: Subscriptions sent to the agent via email.
        groups:
          type: array
          items:
            $ref: '#/components/schemas/Group'
          description: Groups the agent belongs to.
        work_scheduler:
          $ref: '#/components/schemas/WorkScheduler'
    AgentFields:
      type: array
      items:
        type: string
        enum:
          - work_scheduler
          - groups
          - email_subscriptions
          - notifications
          - job_title
          - mobile
          - max_chats_count
          - suspended
          - awaiting_approval
          - last_logout
      description: >-
        Additional agent fields to include in the response.


        - `work_scheduler` — The work scheduler object for the agent.

        - `groups` — The groups the agent belongs to.

        - `email_subscriptions` — A list of the agent's active email
        subscriptions.

        - `notifications` — A list of the agent's enabled notifications.

        - `job_title` — The agent's job title.

        - `mobile` — The agent's mobile number.

        - `max_chats_count` — The agent's maximum number of concurrent chats.

        - `suspended` — If `true`: the agent is suspended.

        - `awaiting_approval` — If `true`: the agent is awaiting approval.

        - `last_logout` — The RFC 3339 date-time of the agent's last logout.
        Omitted when no logout occurred.
    Group:
      type: object
      properties:
        id:
          type: integer
          description: The group ID.
        name:
          type: string
          description: The name of the group.
        language_code:
          type: string
          description: The code of the group language.
        agent_priorities:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AgentPriority'
          description: >-
            Agent 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: A 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

````