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

# Create agent

> Creates a new SuperU voice agent.



## OpenAPI

````yaml /api-reference/openapi.json post /agent/create
openapi: 3.1.0
info:
  title: SuperU API
  description: >-
    Comprehensive API reference for SuperU voice agents, calls, tools, contacts,
    audiences, and knowledge bases.
  version: 1.0.0
servers:
  - url: https://voip-middlware.superu.ai
    description: Production
security:
  - superUApiKey: []
tags:
  - name: Calls
    description: Create and analyze calls.
  - name: Agents
    description: Create, list, import, update, and delete agents.
  - name: Agent Versions
    description: Manage versions for existing agents.
  - name: Phone Numbers
    description: Fetch phone numbers available in your account.
  - name: Call Logs
    description: Retrieve call history with filters.
  - name: Tools
    description: Create and manage callable tools.
  - name: Folders
    description: Organize agents into folders.
  - name: Contacts
    description: Create and list contacts.
  - name: Audiences
    description: Create and manage audiences and contacts.
  - name: Knowledge Base
    description: Upload and manage knowledge bases.
  - name: Campaigns
    description: Create and manage outbound campaigns with automated workflows.
paths:
  /agent/create:
    post:
      tags:
        - Agents
      summary: Create agent
      description: Creates a new SuperU voice agent.
      operationId: createAgent
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCreateRequest'
            example:
              type: outbound
              name: Demo Assistant
              company_name: SuperU
              assistant_name: Ava
              first_message: Hi, thanks for taking the call.
              voice_id: 90ipbRoKi4CpHXvKVtl0
              voice_provider: 11labs
              system_prompt: You are a friendly assistant.
              industry: Blank Template
              useCase: Blank Template
              form_model:
                key: value
              assistant_data:
                key: value
              knowledgeBase:
                - kb_abc123
              tools:
                - tool_01HXR9259WDZ2X3ZZKQ7HDG4C2
              call_forwarding:
                key: value
        description: Request body for Create agent.
      responses:
        '200':
          description: Agent created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
              example:
                status: success
                agent_id: ag_01HXR8FM5QYCVXAK4TYFJ4AEP0
                message: Agent created successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '501':
          $ref: '#/components/responses/NotImplemented'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \\
              --url https://voip-middlware.superu.ai/agent/create \\
              --header 'superU-Api-Key: YOUR_SUPERU_API_KEY' \\
              --data '{
              "type": "outbound",
              "name": "Demo Assistant",
              "company_name": "SuperU",
              "assistant_name": "Ava",
              "first_message": "Hi, thanks for taking the call.",
              "voice_id": "90ipbRoKi4CpHXvKVtl0",
              "voice_provider": "11labs",
              "system_prompt": "You are a friendly assistant.",
              "industry": "Blank Template",
              "useCase": "Blank Template",
              "form_model": {
                "key": "value"
              },
              "assistant_data": {
                "key": "value"
              },
              "knowledgeBase": [
                "kb_abc123"
              ],
              "tools": [
                "tool_01HXR9259WDZ2X3ZZKQ7HDG4C2"
              ],
              "call_forwarding": {
                "key": "value"
              }
            }'
        - lang: python
          label: Python
          source: |-
            from superu import SuperU

            client = SuperU("YOUR_SUPERU_API_KEY")

            payload = {
                "type": "outbound",
                "name": "Demo Assistant",
                "company_name": "SuperU",
                "assistant_name": "Ava",
                "first_message": "Hi, thanks for taking the call.",
                "voice_id": "90ipbRoKi4CpHXvKVtl0",
                "voice_provider": "11labs",
                "system_prompt": "You are a friendly assistant.",
                "industry": "Blank Template",
                "useCase": "Blank Template",
                "form_model": {
                    "key": "value"
                },
                "assistant_data": {
                    "key": "value"
                },
                "knowledgeBase": [
                    "kb_abc123"
                ],
                "tools": [
                    "tool_01HXR9259WDZ2X3ZZKQ7HDG4C2"
                ],
                "call_forwarding": {
                    "key": "value"
                }
            }

            response = client.agents.create_agent(**payload)
            print(response)
components:
  schemas:
    AgentCreateRequest:
      allOf:
        - type: object
          properties:
            type:
              type: string
              description: Agent type
              enum:
                - inbound
                - outbound
              example: outbound
            name:
              type: string
              description: Internal agent name
              example: Demo Assistant
            company_name:
              type: string
              description: Company name
              example: SuperU
            assistant_name:
              type: string
              description: Assistant display name
              example: Ava
            first_message:
              type: string
              description: First message spoken by the assistant
              example: Hi, thanks for taking the call.
            voice_id:
              type: string
              description: Voice ID
              example: 90ipbRoKi4CpHXvKVtl0
            voice_provider:
              type: string
              description: Voice provider
              example: 11labs
            system_prompt:
              type: string
              description: >-
                System prompt template.


                Variable syntax:

                - Use {{ variable_name }}

                - Spaces inside braces are required (e.g., {{ name }})

                - Keep them same when passing the variables in the [Create Call
                request](/api-reference/calls/create-outbound-call#body-variable-values)
              example: You are a helpful assistant.
            industry:
              type: string
              description: Industry template
              example: Blank Template
            useCase:
              type: string
              description: Use case template
              example: Blank Template
            form_model:
              $ref: '#/components/schemas/JsonObject'
              description: Form model value.
            assistant_data:
              $ref: '#/components/schemas/JsonObject'
              description: Assistant data value.
            knowledgeBase:
              type: array
              items:
                type: string
              example:
                - kb_abc123
              description: List of knowledge base UUIDs (kb_uuid) to attach to the agent.
            tools:
              type: array
              items:
                type: string
              example:
                - tool_01HXR9259WDZ2X3ZZKQ7HDG4C2
              description: Tools value.
            call_forwarding:
              $ref: '#/components/schemas/JsonObject'
              description: Call forwarding value.
      description: Agent Create Request schema.
    GenericResponse:
      type: object
      properties:
        status:
          type: string
          description: Indicates if the request was successful.
          example: success
        message:
          type: string
          description: A descriptive message about the result of the request.
          example: Request completed successfully
        data:
          type: object
          additionalProperties: true
          description: The payload of the response, if any.
      additionalProperties: true
      description: A generic response schema for successful API calls.
    JsonObject:
      type: object
      description: Flexible JSON object
      additionalProperties: true
      example:
        key: value
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        status:
          type: string
          example: error
          description: Status value.
        message:
          type: string
          example: Invalid request payload
          description: Message value.
        error:
          type: string
          example: Bad Request
          description: Error value.
        code:
          type: string
          example: BAD_REQUEST
          description: Code value.
      additionalProperties: true
      description: Error Response schema.
  responses:
    BadRequest:
      description: Bad Request - invalid parameters or payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: BAD_REQUEST
            message: Request validation failed.
    Unauthorized:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: UNAUTHORIZED
            message: Invalid or missing superU-Api-Key.
    NotFound:
      description: Not Found - requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: NOT_FOUND
            message: Resource not found.
    InternalServerError:
      description: Internal Server Error - unexpected backend error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: INTERNAL_SERVER_ERROR
            message: An unexpected server error occurred.
    NotImplemented:
      description: >-
        Not Implemented - this action is not available in the current
        deployment.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: NOT_IMPLEMENTED
            message: This endpoint is not implemented for your workspace.
  securitySchemes:
    superUApiKey:
      type: apiKey
      in: header
      name: superU-Api-Key
      description: Your SuperU API key.

````