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

# Create Agent

> Create a new agent (chatbot or voicebot)



## OpenAPI

````yaml POST /agent/
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /agent/:
    post:
      summary: Create Agent
      description: Create a new agent (chatbot or voicebot)
      requestBody:
        description: Agent creation details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCreate'
      responses:
        '200':
          description: Agent created successfully
          content:
            application/json:
              schema:
                type: string
                description: The ID of the newly created agent
        '400':
          description: Bad Request - Agent limit reached or failed to create assistant
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions (requires level 3)
      security:
        - CompanyApiKey: []
components:
  schemas:
    AgentCreate:
      oneOf:
        - $ref: '#/components/schemas/ChatAgentCreate'
        - $ref: '#/components/schemas/VoiceAgentCreate'
    ChatAgentCreate:
      title: Chat Agent
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: Name of the agent
        type:
          type: string
          enum:
            - chatbot
          description: Agent type discriminator
        assistant_id:
          type: string
          description: Internal assistant identifier (optional)
        description:
          type: string
          description: If present, used to generate the prompt
        prompt:
          type: string
          description: Used only if no description is provided
        first_message:
          type: string
          description: First message shown in supported chat surfaces
        timezone:
          type: string
          description: Timezone name (e.g. "America/New_York")
        webhook_url:
          type: string
          description: Webhook URL (if applicable)
        branding_colour:
          type: string
          description: '"" or hex #RGB / #RRGGBB'
        model:
          type: string
          default: gpt-4.1
          description: Chat model name (defaults to gpt-4.1)
    VoiceAgentCreate:
      title: Voice Agent
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: Name of the agent
        type:
          type: string
          enum:
            - voicebot
          description: Agent type discriminator
        description:
          type: string
          description: If present, used to generate the prompt
        prompt:
          type: string
          description: Used only if no description is provided
        first_message:
          type: string
          description: First spoken message (blank means wait for caller)
        timezone:
          type: string
          description: Timezone name (e.g. "America/New_York")
        webhook_url:
          type: string
          description: Webhook URL to receive call completion payloads
        branding_colour:
          type: string
          description: '"" or hex #RGB / #RRGGBB'
        language:
          type: string
          description: Language code (e.g. "en")
        model:
          type: object
          description: LLM configuration for voice calls
          properties:
            model:
              type: string
              description: Model name
            max_tokens:
              type: integer
              description: Max tokens for responses
            temperature:
              type: number
              description: Sampling temperature
        voice:
          type: object
          description: Voice provider + voice id
          required:
            - provider
            - id
          properties:
            provider:
              type: string
              enum:
                - 11labs
                - openai
              description: Voice provider
            id:
              type: string
              description: Provider voice id
            model:
              type: string
              description: '11labs voice model (default: eleven_turbo_v2)'
            similarityBoost:
              type: number
            style:
              type: number
            stability:
              type: number
            optimizeStreamingLatency:
              type: integer
            useSpeakerBoost:
              type: boolean
            autoMode:
              type: boolean
            speed:
              type: number
        hipaa_enabled:
          description: Accepts boolean or boolean-ish strings
          oneOf:
            - type: boolean
            - type: string
              enum:
                - 'true'
                - 'false'
        zdr_enabled:
          type: boolean
          description: >-
            Enable Zero Data Retention where supported so no call data is stored
            for this agent
        recording_enabled:
          type: boolean
          description: Controls whether call audio recordings are stored
        transcript_enabled:
          type: boolean
          description: Controls whether call transcripts are stored
        voicemail_message:
          type: string
          description: What the agent says if voicemail is detected
        end_call_message:
          type: string
          description: Last line the agent says before hanging up
        recording_consent_message:
          type: string
          description: >-
            What the agent says to inform the caller the call may be recorded
            ("" clears)
        success_prompt:
          type: string
          description: Prompt used to evaluate whether the call achieved the agent's goal
        unqualified_prompt:
          type: string
          description: >-
            Prompt used to evaluate whether the caller is not a fit for your
            services
        scoring_prompt:
          type: string
          description: Prompt used to rate call success from 0 to 100
        summary_prompt:
          type: string
          description: Prompt used to summarize the call
        keyterms:
          type: string
          description: >-
            Space-separated transcription hints (names, brands, locations) to
            improve speech-to-text accuracy ("" clears)
        background:
          type: string
          description: >-
            Background audio preset: "office", "lounge", or "off"; or a custom
            MP3 URL
        idle_messages:
          type: array
          items:
            type: string
          description: 'What to say when the caller is silent (default: none)'
        idle_message_max_spoken_count:
          type: integer
          minimum: 1
          maximum: 10
          description: Max number of idle messages per call
        idle_timeout_seconds:
          type: integer
          minimum: 0
          maximum: 60
          description: Seconds of silence before idle messages are eligible
        llm_request_delay_seconds:
          type: number
          minimum: 0
          maximum: 10
        max_call_duration_seconds:
          type: integer
          minimum: 10
          maximum: 7200
        interrupt_num_words:
          type: integer
          minimum: 0
          maximum: 50
        speech_end_of_turn:
          type: object
          properties:
            threshold:
              type: number
              minimum: 0
              maximum: 1
            timeout_ms:
              type: integer
              minimum: 0
              maximum: 60000
        speech_stop:
          type: object
          properties:
            num_words:
              type: integer
              minimum: 0
              maximum: 50
            voice_seconds:
              type: number
              minimum: 0
              maximum: 10
            backoff_seconds:
              type: number
              minimum: 0
              maximum: 30
        speech_start:
          type: object
          properties:
            wait_seconds:
              type: number
              minimum: 0
              maximum: 10
  securitySchemes:
    CompanyApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Company API Key

````