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

# Create Agent

> Creates a new agent within the specified organization with the given configuration, including extensions and call event hooks.



## OpenAPI

````yaml POST /api/v1/vendors/{vendorId}/organizations/{organizationId}/agents
openapi: 3.1.0
info:
  title: Deepslate
  description: OpenAPI specification of the public Deepslate API
  version: v1.0
servers:
  - url: https://app.deepslate.eu
    description: Generated server url
security: []
tags:
  - name: SIP Credentials Management
    description: API endpoints for managing SIP Credentials within an Organization
  - name: Assistant Management
    description: API endpoints for managing Assistants within an Organization
  - name: SIP Numbers Management
    description: API endpoints for managing SIP Numbers within an Organization
  - name: Agent Task Management
    description: API endpoints for retrieving Agent Tasks
  - name: Organization Management
    description: API endpoints for managing Organizations
  - name: Agent Management
    description: API endpoints for managing Agents within an Organization
  - name: LLM Generation Strategy Management
    description: >-
      API endpoints for managing LLM Generation Strategies within an
      Organization
paths:
  /api/v1/vendors/{vendorId}/organizations/{organizationId}/agents:
    post:
      tags:
        - Agent Management
      summary: Create Agent
      description: >-
        Creates a new agent within the specified organization with the given
        configuration, including extensions and call event hooks.
      operationId: createAgent
      parameters:
        - name: vendorId
          in: path
          description: ID of the Vendor (UUID)
          required: true
          schema:
            type: string
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
        - name: organizationId
          in: path
          description: ID of the Organization (UUID)
          required: true
          schema:
            type: string
          example: f0e9d8c7-b6a5-4321-fedc-ba9876543210
      requestBody:
        description: Agent creation data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCreate'
        required: true
      responses:
        '200':
          description: Agent successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDetailsResponse'
        '400':
          description: Bad Request - Invalid input data
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - User does not have permission
        '404':
          description: Organization or Vendor not found
components:
  schemas:
    AgentCreate:
      type: object
      description: Data required to create a new Agent
      properties:
        name:
          type: string
          description: Name of the agent.
          example: Sales Bot Alpha
        userValueTypes:
          type: object
          additionalProperties:
            type: string
            enum:
              - STRING
              - STRING_REDACTED
              - INTEGER
              - FLOAT
          description: Map defining user-specific value types the agent can handle.
          example:
            customer_name: STRING
            product_interest: STRING
            order_id: NUMBER
        systemPromptTemplate:
          type: string
          description: Template for the system prompt used by the agent's underlying LLM.
          example: >-
            You are a helpful sales assistant for ACME Corp. Your goal is to
            qualify leads.
        telephoneNumberId:
          type: string
          description: ID of the telephone number assigned to this agent (UUID).
          example: 11223344-5566-7788-9900-aabbccddeeff
        llmAudioContentGenerationStrategyId:
          type: string
          description: >-
            ID of the LLM Audio Content Generation Strategy used by the agent
            (UUID).
          example: abcdef01-2345-6789-abcd-ef0123456789
        extensions:
          type: array
          description: List of LLM extensions configured for this agent.
          items:
            $ref: '#/components/schemas/AgentCreateLlmExtension'
        callEventHooks:
          type: array
          description: List of Call Event Hooks configured for this agent.
          items:
            $ref: '#/components/schemas/AgentCreateCallEventHook'
      required:
        - callEventHooks
        - extensions
        - llmAudioContentGenerationStrategyId
        - name
        - systemPromptTemplate
        - telephoneNumberId
        - userValueTypes
    AgentDetailsResponse:
      type: object
      description: Standard API response wrapper
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
          example: true
        message:
          type: string
          description: Human-readable message
        data:
          $ref: '#/components/schemas/AgentDetails'
          description: Payload data object
        timestamp:
          type: string
          format: date-time
          description: Response timestamp in ISO-8601 format
          example: '2025-04-17T14:23:30Z'
        traceId:
          type: string
          description: Correlation or trace ID
      required:
        - success
        - timestamp
    AgentCreateLlmExtension:
      type: object
      description: Configuration for an LLM Extension (without ID, as it's being created)
      properties:
        type:
          type: string
          description: Type identifier for the LLM extension.
          example: crm_lookup_v1
        parameters:
          type: object
          additionalProperties:
            type: object
          description: >-
            Specific parameters for this extension instance (structure depends
            on the extension type).
          example:
            crm_system_url: https://mycrm.example.com/api
            api_key_secret: secret_crm_key
      required:
        - parameters
        - type
    AgentCreateCallEventHook:
      type: object
      description: Configuration for a Call Event Hook (without ID, as it's being created)
      properties:
        type:
          type: string
          description: Type identifier for the call event hook.
          example: webhook_call_ended_v1
        parameters:
          type: object
          additionalProperties:
            type: string
          description: >-
            Specific parameters for this hook instance (structure depends on the
            hook type).
          example:
            target_url: https://my.service.com/call_event
            auth_token: bearer_abc123
      required:
        - parameters
        - type
    AgentDetails:
      type: object
      description: Detailed view of an Agent's configuration.
      properties:
        id:
          type: string
          description: Unique identifier of the agent (UUID).
          example: 98765432-10fe-dcba-9876-543210fedcba
        name:
          type: string
          description: Name of the agent.
          example: Sales Bot Alpha
        systemPromptTemplate:
          type: string
          description: Template for the system prompt used by the agent's underlying LLM.
          example: >-
            You are a helpful sales assistant for ACME Corp. Your goal is to
            qualify leads.
        userValueTypes:
          type: object
          additionalProperties:
            type: string
            enum:
              - STRING
              - STRING_REDACTED
              - INTEGER
              - FLOAT
          description: Map defining user-specific value types the agent can handle.
          example:
            customer_name: STRING
            product_interest: STRING
            order_id: NUMBER
        llmAudioContentGenerationStrategyId:
          type: string
          description: >-
            ID of the LLM Audio Content Generation Strategy used by the agent
            (UUID).
          example: abcdef01-2345-6789-abcd-ef0123456789
        telephoneNumberId:
          type: string
          description: ID of the telephone number assigned to this agent (UUID).
          example: 11223344-5566-7788-9900-aabbccddeeff
        extensions:
          type: array
          description: List of LLM extensions configured for this agent.
          items:
            $ref: '#/components/schemas/AgentDetailsLlmExtension'
        callEventHooks:
          type: array
          description: List of Call Event Hooks configured for this agent.
          items:
            $ref: '#/components/schemas/AgentDetailsCallEventHook'
      required:
        - callEventHooks
        - extensions
        - id
        - llmAudioContentGenerationStrategyId
        - name
        - systemPromptTemplate
        - telephoneNumberId
        - userValueTypes
    AgentDetailsLlmExtension:
      type: object
      description: Configuration details for an existing LLM Extension.
      properties:
        id:
          type: string
          description: Unique identifier of the LLM extension instance (UUID).
          example: deadbeef-cafe-babe-feed-faceabadb001
        name:
          type: string
          description: Name of the LLM extension.
          example: CRM Lookup
        type:
          type: string
          description: Type identifier for the LLM extension.
          example: crm_lookup_v1
        parameters:
          type: object
          additionalProperties:
            type: object
          description: >-
            Specific parameters for this extension instance (structure depends
            on the extension type).
          example:
            crm_system_url: https://mycrm.example.com/api
            api_key_secret: secret_crm_key
      required:
        - id
        - name
        - parameters
        - type
    AgentDetailsCallEventHook:
      type: object
      description: Configuration details for an existing Call Event Hook.
      properties:
        id:
          type: string
          description: Unique identifier of the call event hook instance (UUID).
          example: b00bface-1337-badd-cafe-d00df00dcafe
        type:
          type: string
          description: Type identifier for the call event hook.
          example: webhook_call_ended_v1
        parameters:
          type: object
          additionalProperties:
            type: string
          description: >-
            Specific parameters for this hook instance (structure depends on the
            hook type).
          example:
            target_url: https://my.service.com/call_event
            auth_token: bearer_abc123
      required:
        - id
        - parameters
        - type

````