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

# Create Agent

> Creates a new agent.



## OpenAPI

````yaml /api-reference/openapi.json post /api/agents
openapi: 3.1.0
info:
  title: Ello.AI API
  description: API for managing agents and calls in Ello.AI
  version: 1.0.0
servers:
  - url: https://api.getello.ai/
security: []
paths:
  /api/agents:
    post:
      tags:
        - Agents
      summary: Create Agent
      description: Creates a new agent.
      operationId: createAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
              example: {}
              properties:
                type:
                  type: string
                  enum:
                    - inbound
                    - outbound
                    - chat
                    - hybrid
                  example: hybrid
                workspaceId:
                  type: string
                  example: 6970c2f3948cfbce1932d99d
                templateId:
                  type: string
                  example: 69cf92ec643b415327cab0ae
                timezone:
                  type: string
                  example: Asia/Kolkata
                dynamic_variables:
                  type: array
                  items:
                    type: string
                  example:
                    - customer_name
                    - order_id
                metaData:
                  type: object
                  properties:
                    type:
                      type: number
                      example: 1
                    placement:
                      type: number
                      example: 2
                    varient:
                      type: number
                      example: 1
                    colorPalette:
                      type: object
                      properties:
                        widgetBackground:
                          type: string
                          example: '#FFFFFF'
                        widgetText:
                          type: string
                          example: '#000000'
      responses:
        '200':
          description: Agent created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: agent created successfully
                  data:
                    type: object
                    example:
                      _id: 69cf98f0643b415327cab0af
                      workspaceId: 6970c2f3948cfbce1932d99d
                      userId: 6970c2f3948cfbce1932d99c
                      name: My Hybrid Agent
                      type: hybrid
        '400':
          description: Bad Request / Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Validation Error
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          example: body.type
                        message:
                          type: string
                          example: '"type" is required'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized access
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 403
                  message:
                    type: string
                    examples:
                      - No active subscription found
                      - Agent creation limit exceeded
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Prompt template not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Error while creating agent
                  error:
                    type: object
                    properties:
                      details:
                        type: string
                        example: Some internal error message
      security:
        - apiKey: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````