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

# Create chat agent

> Create a new UponAI chat agent for browser and messaging use cases.



## OpenAPI

````yaml /openapi.json post /api/chat-agents
openapi: 3.1.0
info:
  title: UponAI Platform API
  version: '2026-04-20'
  description: >-
    Programmatic control plane for configuring UponAI agents, LLM
    configurations, conversation flows, knowledge bases, calls, chats, voices,
    and test tooling. All endpoints require a bearer token obtained from your
    profile settings.
servers:
  - url: https://api.upon-ai.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Calls
    description: Initiate and manage UponAI powered voice and web calls.
  - name: Agents
    description: Configure agents that power calls and web sessions.
  - name: LLM Models
    description: Manage reusable large language model configurations for agents.
  - name: Chat Agents
    description: Configure agents for browser and messaging chat sessions.
  - name: Chats
    description: Start and manage live chat sessions.
  - name: Conversation Flows
    description: Build and maintain reusable dialog graphs for agents.
  - name: Knowledge Bases
    description: Store and curate grounded knowledge sources.
  - name: Voices
    description: Discover, search, add, and clone speech synthesis voices.
  - name: Test Case Definitions
    description: Define simulation test cases for response engines.
  - name: Test Runs
    description: Retrieve results for individual and batch test runs.
  - name: Account
    description: Account level utilities and limits.
  - name: Phone Numbers
    description: List and assign phone numbers to agents.
paths:
  /api/chat-agents:
    post:
      tags:
        - Chat Agents
      summary: Create chat agent
      description: Create a new UponAI chat agent for browser and messaging use cases.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChatAgentRequest'
            examples:
              default:
                value:
                  workspaceId: 42
                  agent_name: Website Concierge
                  response_engine:
                    type: uponai-llm
                    llm_id: llm_1ab234cde567fgh
                  auto_close_message: Thanks for chatting with UponAI.
                  end_chat_after_silence_ms: 600000
                  webhook_url: https://example.com/hooks/chat-events
                  webhook_events:
                    - chat_started
                    - chat_ended
                    - chat_analyzed
                  timezone: America/New_York
                  is_public: true
                  data_storage_setting: everything_except_pii
                  data_storage_retention_days: 30
                  post_chat_analysis_model: gpt-4.1-mini
                  post_chat_analysis_data:
                    - type: chat_summary
                      name: summary
                      description: Short summary of the completed chat.
                  uponai_dynamic_variables:
                    customer_tier: enterprise
      responses:
        '201':
          description: Newly created chat agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatAgent'
components:
  schemas:
    CreateChatAgentRequest:
      type: object
      required:
        - workspaceId
        - agent_name
        - response_engine
      properties:
        workspaceId:
          type: integer
        agent_name:
          type: string
        response_engine:
          $ref: '#/components/schemas/ResponseEngine'
        auto_close_message:
          type: string
        end_chat_after_silence_ms:
          type: integer
        webhook_url:
          type: string
          format: uri
        webhook_events:
          type: array
          items:
            type: string
        timezone:
          type: string
        is_public:
          type: boolean
        data_storage_setting:
          type: string
        data_storage_retention_days:
          type: integer
        post_chat_analysis_model:
          type: string
        post_chat_analysis_data:
          type: array
          items:
            type: object
        uponai_dynamic_variables:
          type: object
          additionalProperties:
            type: string
    ChatAgent:
      allOf:
        - $ref: '#/components/schemas/ChatAgentSummary'
        - type: object
          properties:
            end_chat_after_silence_ms:
              type: integer
              nullable: true
            webhook_url:
              type: string
              format: uri
              nullable: true
            webhook_events:
              type: array
              items:
                type: string
            timezone:
              type: string
              nullable: true
            data_storage_setting:
              type: string
              nullable: true
            data_storage_retention_days:
              type: integer
              nullable: true
            post_chat_analysis_model:
              type: string
              nullable: true
            post_chat_analysis_data:
              type: array
              items:
                type: object
            uponai_dynamic_variables:
              type: object
              additionalProperties:
                type: string
    ResponseEngine:
      type: object
      required:
        - type
      properties:
        type:
          type: string
        llm_id:
          type: string
    ChatAgentSummary:
      type: object
      properties:
        agent_id:
          type: string
        agent_name:
          type: string
        version:
          type: integer
        response_engine:
          $ref: '#/components/schemas/ResponseEngine'
        auto_close_message:
          type: string
          nullable: true
        is_public:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Generate tokens from your profile settings at app.uponai.com.

````