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

# Create a new web agent



## OpenAPI

````yaml post /web-agent
openapi: 3.0.0
info:
  title: ClearTalk API
  description: The ClearTalk API Documentation
  version: '1.0'
  contact:
    name: Developer Support
    email: devsupport@cleartalk.ai
servers:
  - url: https://api.cleartalk.ai
    description: ClearTalk AI API Server
security: []
tags: []
paths:
  /web-agent:
    post:
      tags:
        - Web Agent
      summary: Create a new web agent
      operationId: WebAgentController_storeWebAgent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebAgentDto'
      responses:
        '200':
          description: The web agent has been successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Agent created successfully
                  agent_id:
                    type: string
                    example: agent_123456
        '408':
          description: Request timeout.
        '500':
          description: Internal server error.
      security:
        - apiKey: []
components:
  schemas:
    CreateWebAgentDto:
      type: object
      properties:
        phoneNumber:
          type: string
          description: Phone number for the agent
          example: '+1234567890'
        max_duration:
          type: number
          description: Maximum duration for the agent in seconds
          example: 300
        temperature:
          type: number
          description: Temperature setting for the agent
          example: 0.7
        voiceSpeed:
          type: number
          description: Voice speed setting
          example: 1
        similarity:
          type: number
          description: Similarity setting for voice
          example: 0.75
        stability:
          type: number
          description: Stability setting for voice
          example: 0.5
        background_track:
          type: string
          description: Background track for the agent
          example: background_music.mp3
        interruptionThreshold:
          type: number
          description: Interruption threshold in milliseconds
          example: 1000
        calendarID:
          type: string
          description: Calendar ID for appointments
          example: cal_123456
        calendarName:
          type: string
          description: Calendar name
          example: Business Hours
        pathwayID:
          type: string
          description: Pathway ID
          example: path_123456
        customTool:
          description: Custom tools metadata
          example: []
          type: array
          items:
            type: string
        inboundCustomTool:
          description: Inbound custom tools
          example: []
          type: array
          items:
            type: string
        waitForGreeting:
          type: boolean
          description: Wait for greeting setting
          example: true
        questionsData:
          description: Agent questions data
          example:
            - question: What is your name?
              questionType: text
          type: array
          items:
            type: string
        appointmentAgent:
          type: boolean
          description: Appointment agent setting
          example: true
        task:
          type: string
          description: Task description
          example: Handle customer inquiries
        knowledgeName:
          type: string
          description: Knowledge base name
          example: customer_support
        transferPhoneNumber:
          type: string
          description: Transfer phone number
          example: '+1987654321'
        selectedVoice:
          type: string
          description: Selected voice
          example: Maya
        model:
          type: string
          description: AI model to use
          example: enhanced
        firstSentence:
          type: string
          description: First sentence for the agent
          example: Hello, how can I help you today?
        selectedLanguage:
          type: string
          description: Selected language
          example: en
        agentName:
          type: string
          description: Agent name
          example: Customer Support Agent
        store:
          type: boolean
          description: Store setting
          example: true
        webSettings:
          description: Web agent settings
          allOf:
            - $ref: '#/components/schemas/WebAgentSettingsDto'
      required:
        - phoneNumber
        - max_duration
        - temperature
        - voiceSpeed
        - similarity
        - stability
        - background_track
        - interruptionThreshold
        - calendarID
        - calendarName
        - pathwayID
        - customTool
        - inboundCustomTool
        - waitForGreeting
        - questionsData
        - appointmentAgent
        - task
        - knowledgeName
        - transferPhoneNumber
        - selectedVoice
        - model
        - firstSentence
        - selectedLanguage
        - agentName
        - store
    WebAgentSettingsDto:
      type: object
      properties:
        button_text:
          type: string
        button_background_color:
          type: string
        text_color:
          type: string
        font_size:
          type: string
        button_hover_background_color:
          type: string
        border_radius:
          type: string
        show_avatar:
          type: boolean
          default: false
        avatar_image_url:
          type: string
        icon_color:
          type: string
        container_background_color:
          type: string
        base_url_for_embed:
          type: string
        generated_iframe_url:
          type: string
        iframe_embed_code:
          type: string
        mobile_logo_url:
          type: string
        mobile_brand_name:
          type: string
        mobile_brand_tagline:
          type: string
        mobile_logo_position:
          type: string
        mobile_brand_name_position:
          type: string
        mobile_background_color:
          type: string
        mobile_gradient_start_color:
          type: string
        mobile_gradient_end_color:
          type: string
        mobile_text_color:
          type: string
        mobile_secondary_text_color:
          type: string
        mobile_answer_button_color:
          type: string
        mobile_end_button_color:
          type: string
        mobile_slide_bar_color:
          type: string
        mobile_slide_bar_opacity:
          type: string
        mobile_remember_me_icon:
          type: string
        mobile_message_icon:
          type: string
        mobile_phone_icon:
          type: string
        mobile_end_call_icon:
          type: string
        mobile_remind_me_text:
          type: string
        mobile_message_text:
          type: string
        mobile_slide_to_answer_text:
          type: string
        mobile_base_url_for_embed:
          type: string
        mobile_generated_iframe_url:
          type: string
        mobile_iframe_embed_code:
          type: string
        orb_button_border_radius:
          type: string
        orb_button_size:
          type: string
        orb_blink_color:
          type: string
        orb_icon_color:
          type: string
        orb_icon_size:
          type: string
        orb_button_bg_color:
          type: string
        orb_base_url:
          type: string
        orb_iframe_url:
          type: string
        orb_iframe_embed_code:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication

````