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

# Get a chat agent

> Returns the full configuration of a chat agent.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/chat-agents/{agent_uuid}
openapi: 3.1.0
info:
  description: >-
    Manage your Klatt voice and chat agents, conversations, contacts and
    knowledge with an organization API key. Start with the
    [introduction](https://docs.klatt.ai/api-reference/introduction).
  title: Klatt API
  version: 1.0.0
servers:
  - url: https://api.klatt.ai
security:
  - bearerAuth: []
tags:
  - description: >-
      Agents that answer and place phone calls, and where they can transfer a
      call.
    name: Voice agents
  - description: Agents that answer WhatsApp chats.
    name: Chat agents
  - description: Calls and chats your agents have handled, with their analysis and state.
    name: Conversations
  - description: Lists of contacts and the custom fields each list defines.
    name: Contact lists
  - description: The people in a contact list.
    name: Contacts
  - description: Documents your agents read from, and their extracted text.
    name: Knowledge documents
  - description: >-
      Short question-and-answer and company-information entries your agents can
      use.
    name: Knowledge entries
paths:
  /api/v1/chat-agents/{agent_uuid}:
    get:
      tags:
        - Chat agents
      summary: Get a chat agent
      description: Returns the full configuration of a chat agent.
      operationId: getChatAgent
      parameters:
        - description: Unique identifier (UUID) of the agent.
          in: path
          name: agent_uuid
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatAgentResponse'
          description: Successful Response
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The agent does not exist in your organization.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: The request failed validation.
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ChatAgentResponse:
      properties:
        additional_languages:
          description: >-
            Other languages the agent also handles, besides the default
            `language`. Empty means the agent is single-language.
          items:
            enum:
              - es-ES
              - en
              - fr-FR
              - it-IT
              - de-DE
              - pt-PT
              - ca-ES
              - gl-ES
              - eu-ES
            type: string
          type: array
        agent_uuid:
          description: Unique identifier (UUID) of the agent.
          format: uuid
          type: string
        allowed_contact_fields:
          description: >-
            Contact data the agent may use in conversation: `first_name`,
            `last_name`, `company`, `notes`, `phones`, `emails`, or
            `field:<key>` for a custom field of the contact list.
          items:
            pattern: >-
              ^(first_name|last_name|company|notes|phones|emails|field:[a-zA-Z][a-zA-Z0-9_]{0,39})$
            type: string
          type: array
        contact_list_uuid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: >-
            UUID of the contact list the agent uses to recognize callers. `null`
            means none.
        conversation_rules:
          $ref: '#/components/schemas/ConversationRules'
          description: >-
            Rules for AI disclosure, communication style and how the agent
            handles unrelated questions, upset people and sales calls.
        created_at:
          description: When the agent was created (ISO 8601, UTC).
          format: date-time
          type: string
        document_uuids:
          description: >-
            UUIDs of the knowledge documents the agent uses when
            `knowledge_scope` is `selected`.
          items:
            format: uuid
            type: string
          type: array
        first_message:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Text added at the start of the first reply of each chat. `null`
            means none.
        kind:
          const: chat
          default: chat
          description: Always `chat`.
          type: string
        knowledge_scope:
          description: >-
            Which documents the agent may use: `company` for all your knowledge
            documents, `selected` for only those in `document_uuids`.
          enum:
            - company
            - selected
          type: string
        language:
          description: >-
            Language the agent speaks or writes: `es-ES` (Spanish, Spain), `en`
            (English), `fr-FR` (French), `it-IT` (Italian), `de-DE` (German),
            `pt-PT` (Portuguese, Portugal), `ca-ES` (Catalan), `gl-ES`
            (Galician) or `eu-ES` (Basque). Voice agents accept Catalan,
            Galician and Basque once Klatt has enabled them for voice
            (`cooficial_voice_unavailable` before that).
          enum:
            - es-ES
            - en
            - fr-FR
            - it-IT
            - de-DE
            - pt-PT
            - ca-ES
            - gl-ES
            - eu-ES
          type: string
        match_landlines:
          description: >-
            Whether callers using a landline number are matched to contacts. Off
            by default, because several people can share a landline.
          type: boolean
        name:
          description: Name of the agent, shown in the console and in conversation lists.
          type: string
        orb_color:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Color of the agent's orb in the console, as a hex code such as
            `#1A2B3C`. `null` means the default color.
        outcome_fields:
          description: >-
            Data the agent extracts when a conversation ends; webhooks read it
            as `{{outcome.<key>}}`. Empty means none.
          items:
            $ref: '#/components/schemas/OutcomeField'
          maxItems: 20
          type: array
        procedures:
          description: Procedures the agent follows when their trigger applies, up to 20.
          items:
            $ref: '#/components/schemas/AgentProcedure'
          type: array
        prompt:
          description: The instructions that define how the agent behaves.
          type: string
        text_settings:
          $ref: '#/components/schemas/AgentTextSettings'
          description: >-
            How the agent behaves on WhatsApp: who answers first, when, and how
            staff are notified.
        tool_count:
          description: >-
            Number of tools the agent uses: the tools of its integrations plus
            one for each transfer target.
          type: integer
        tool_limit:
          description: Maximum number of tools one agent can have.
          type: integer
        updated_at:
          description: When the agent was last changed (ISO 8601, UTC).
          format: date-time
          type: string
      required:
        - agent_uuid
        - name
        - orb_color
        - created_at
        - updated_at
        - prompt
        - language
        - additional_languages
        - outcome_fields
        - knowledge_scope
        - procedures
        - conversation_rules
        - document_uuids
        - contact_list_uuid
        - allowed_contact_fields
        - match_landlines
        - tool_count
        - tool_limit
        - first_message
        - text_settings
      type: object
    Error:
      description: Body of an error response.
      properties:
        detail:
          description: >-
            A stable error code such as `agent_not_found`. A few authentication
            errors carry a short text instead, such as `Invalid or expired API
            key`.
          type: string
        message:
          description: >-
            A human-readable explanation. Present only on errors raised before
            the request reaches the API, such as `api_key_wrong_host`.
          type: string
      required:
        - detail
      type: object
    HTTPValidationError:
      description: 'Body of a `422` response: the request failed validation.'
      properties:
        detail:
          anyOf:
            - items:
                $ref: '#/components/schemas/ValidationError'
              type: array
            - type: string
            - type: object
          description: >-
            A list of field errors when the body or a parameter is invalid, a
            string with an error code for some other refusals, or an object with
            a `code` when a knowledge limit is exceeded.
      type: object
    ConversationRules:
      additionalProperties: false
      properties:
        ai_disclosure:
          default: when_asked
          description: >-
            When the agent tells people it is an AI: `never`, `when_asked`,
            `at_start` or `at_start_with_consent`.
          enum:
            - never
            - when_asked
            - at_start
            - at_start_with_consent
          type: string
        ai_disclosure_text:
          anyOf:
            - maxLength: 300
              type: string
            - type: 'null'
          description: >-
            What the agent says to disclose it is an AI, up to 300 characters,
            on one line. `null` uses a default sentence in the agent's language.
        communication_style:
          default: default
          description: >-
            Tone of every reply: `default`, `professional_friendly`, `casual`,
            `formal` or `empathetic`.
          enum:
            - default
            - professional_friendly
            - casual
            - formal
            - empathetic
          type: string
        off_topic:
          $ref: '#/components/schemas/OffTopicRule'
          description: How the agent handles questions unrelated to your business.
        sales_calls:
          $ref: '#/components/schemas/SalesCallsRule'
          description: How the agent handles sales offers aimed at your business.
        upset_caller:
          $ref: '#/components/schemas/UpsetCallerRule'
          description: How the agent handles an upset person.
      type: object
    OutcomeField:
      additionalProperties: false
      properties:
        description:
          anyOf:
            - maxLength: 500
              type: string
            - type: 'null'
          description: Tells the analysis what to look for.
        key:
          description: >-
            Name of the value in webhooks (`{{outcome.<key>}}`): lowercase
            letters, digits and `_`, starting with a letter, up to 40
            characters.
          pattern: ^[a-z][a-z0-9_]{0,39}$
          type: string
        kind:
          description: >-
            Type of the value: `text`, `number`, `boolean`, `enum` (one of
            `options`) or `date` (YYYY-MM-DD).
          enum:
            - text
            - number
            - boolean
            - enum
            - date
          type: string
        label:
          description: Name shown in the console.
          maxLength: 80
          minLength: 1
          type: string
        options:
          anyOf:
            - items:
                maxLength: 80
                minLength: 1
                type: string
              maxItems: 50
              minItems: 1
              type: array
            - type: 'null'
          description: Allowed values; only for `enum`, unique.
      required:
        - key
        - label
        - kind
      type: object
    AgentProcedure:
      additionalProperties: false
      properties:
        enabled:
          default: true
          description: >-
            Whether the agent follows the procedure. A disabled procedure stays
            saved but is ignored.
          type: boolean
        instructions:
          description: What the agent does once the trigger applies.
          minLength: 1
          type: string
        name:
          description: Short name of the procedure.
          maxLength: 255
          minLength: 1
          type: string
        trigger:
          description: >-
            The situation in which the agent follows the procedure, written as a
            condition.
          maxLength: 1000
          minLength: 1
          type: string
      required:
        - name
        - trigger
        - instructions
      type: object
    AgentTextSettings:
      additionalProperties: false
      description: >-
        How a chat agent behaves on WhatsApp: who answers a new chat, when, and
        how long the agent waits for your team.
      properties:
        entry_instructions:
          anyOf:
            - maxLength: 3000
              type: string
            - type: 'null'
          description: >-
            Rule in plain words, up to 3000 characters, that the agent evaluates
            once for each new chat in `conditional` mode. Required when
            `entry_mode` is `conditional`.
        entry_mode:
          anyOf:
            - enum:
                - ai
                - team
                - conditional
              type: string
            - type: 'null'
          description: >-
            Who answers a new chat: `ai` (the agent), `team` (your team) or
            `conditional` (the agent decides from `entry_instructions`). `null`
            uses the default for the number: your team on numbers shared with
            the WhatsApp Business app, the agent otherwise.
        schedule_mode:
          default: always
          description: >-
            When the agent may reply immediately: `always`, `when_open` (only
            within your opening hours) or `when_closed` (only outside them).
          enum:
            - always
            - when_open
            - when_closed
          type: string
        staff_contact_number:
          anyOf:
            - pattern: ^\+[1-9][0-9]{7,14}$
              type: string
            - type: 'null'
          description: >-
            WhatsApp number, in international format, of the staff member who is
            notified when a customer asks for a person.
        staff_template:
          anyOf:
            - $ref: '#/components/schemas/WhatsAppStaffTemplate'
            - type: 'null'
          deprecated: true
          description: >-
            Deprecated: use `staff_templates`. In requests, the template is used
            for every WhatsApp Business account the agent answers on. In
            responses, it has a value only when there is exactly one entry in
            `staff_templates`. Requires `staff_contact_number`.
        staff_templates:
          description: >-
            Approved WhatsApp message templates used to notify the staff member
            outside their 24-hour window, at most one for each WhatsApp Business
            account the agent answers on. Without one for an account, the notice
            goes only by text within 24 hours. Requires `staff_contact_number`.
          items:
            $ref: '#/components/schemas/WhatsAppStaffAccountTemplate'
          type: array
        takeover_delay_hours:
          default: 12
          description: >-
            Hours without a reply from your team before the agent answers, from
            1 to 23.
          maximum: 23
          minimum: 1
          type: integer
      type: object
    ValidationError:
      description: One invalid field of a request.
      properties:
        ctx:
          description: Extra details about the error, such as the limit that was exceeded.
          type: object
        input:
          description: The value that failed validation, when it is returned.
        loc:
          description: 'Where the error is: `body`, `query` or `path`, then the field names.'
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          description: What is wrong with the value.
          type: string
        type:
          description: A short code for the kind of error.
          type: string
      required:
        - loc
        - msg
        - type
      type: object
    OffTopicRule:
      additionalProperties: false
      properties:
        active:
          default: false
          description: >-
            Whether the rule applies. When `false`, no instruction is added for
            this situation.
          type: boolean
        behavior:
          default: not_responsible
          description: >-
            What the agent does: `not_responsible` says kindly it cannot help,
            `refer_contact` tells the person to contact `redirect_target`,
            `explain_scope` explains what it can help with.
          enum:
            - not_responsible
            - refer_contact
            - explain_scope
          type: string
        redirect_target:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: >-
            Who or what to send the person to, up to 200 characters. Required
            when `behavior` is `refer_contact`.
        small_talk:
          default: brief_then_steer
          description: >-
            How the agent handles small talk: `brief_then_steer` answers briefly
            then steers back, `steer_friendly` steers back kindly, `match_mood`
            matches the mood for a moment first.
          enum:
            - brief_then_steer
            - steer_friendly
            - match_mood
          type: string
        take_message:
          default: true
          description: >-
            Whether the agent offers to take a message when the person needs
            something.
          type: boolean
      type: object
    SalesCallsRule:
      additionalProperties: false
      properties:
        active:
          default: false
          description: >-
            Whether the rule applies. When `false`, no instruction is added for
            this situation.
          type: boolean
        competitors:
          default: neutral
          description: >-
            What the agent says about competitors: `neutral` gives no opinion,
            `own_strengths` talks about your strengths, `note_forward` notes the
            question without promising an answer.
          enum:
            - neutral
            - own_strengths
            - note_forward
          type: string
        competitors_active:
          default: true
          description: >-
            Whether the agent follows the `competitors` rule when asked about
            competitors.
          type: boolean
        end_call:
          default: true
          description: Whether the agent ends the conversation after declining.
          type: boolean
        reaction:
          default: decline_politely
          description: >-
            How the agent declines: `decline_politely`, `decline_note` (and
            notes who is offering what) or `decline_briefly`.
          enum:
            - decline_politely
            - decline_note
            - decline_briefly
          type: string
      type: object
    UpsetCallerRule:
      additionalProperties: false
      properties:
        active:
          default: false
          description: >-
            Whether the rule applies. When `false`, no instruction is added for
            this situation.
          type: boolean
        behavior:
          default: stay_calm
          description: >-
            What the agent does: `stay_calm` keeps a steady tone,
            `empathize_solve` acknowledges the frustration and works on the
            problem, `factual_record` stays neutral and records the facts.
          enum:
            - stay_calm
            - empathize_solve
            - factual_record
          type: string
        offer_transfer:
          default: true
          description: Whether the agent offers to pass the person to someone on your team.
          type: boolean
      type: object
    WhatsAppStaffTemplate:
      additionalProperties: false
      description: >-
        An approved WhatsApp message template, identified by name and language,
        used to notify a staff member.
      properties:
        language:
          description: Language code of the template, for example `es` or `en_US`.
          pattern: ^[a-z]{2,3}(_[A-Za-z]{2,4})?$
          type: string
        name:
          description: >-
            Name of the approved WhatsApp template: lowercase letters, digits
            and underscores.
          pattern: ^[a-z0-9_]{1,512}$
          type: string
      required:
        - name
        - language
      type: object
    WhatsAppStaffAccountTemplate:
      additionalProperties: false
      properties:
        account_uuid:
          description: >-
            Identifier of the WhatsApp Business account the template belongs to.
            Only accounts the agent answers on are accepted.
          type: string
        language:
          description: Language code of the template, for example `es` or `en_US`.
          pattern: ^[a-z]{2,3}(_[A-Za-z]{2,4})?$
          type: string
        name:
          description: >-
            Name of the approved WhatsApp template: lowercase letters, digits
            and underscores.
          pattern: ^[a-z0-9_]{1,512}$
          type: string
      required:
        - name
        - language
        - account_uuid
      type: object
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The API key is missing, malformed, unknown, deleted or sent to the wrong
        host. `detail` is a code such as `api_key_required`,
        `console_token_not_accepted` or `api_key_wrong_host`, or a short text
        such as `Invalid or expired API key`. Keys do not expire.
      headers:
        WWW-Authenticate:
          description: Always `Bearer`.
          schema:
            type: string
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The key is valid but may not do this. `detail` is `permission_required`,
        `organization_deleted` or `Organization API keys cannot access this
        operation`.
    RateLimited:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: The key exceeded its request limit. `detail` is `rate_limited`.
      headers:
        Retry-After:
          description: Seconds to wait before sending the next request.
          schema:
            type: integer
    ServiceUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        A dependency the request needs is temporarily unavailable. `detail`
        names it, for example `rate_limit_unavailable` or
        `contacts_unavailable`. Retry with backoff.
  securitySchemes:
    bearerAuth:
      description: >-
        An organization API key created in the Klatt console, sent as
        `Authorization: Bearer <key>`. The key belongs to one organization.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.