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

# Clone agent

> Creates a copy of an existing agent with a new name. The clone inherits the source agent's complete
configuration (voice, TTS, LLM, features, webhooks, tools) but is always created in a disabled state
and without inbound SIP config to avoid phone number routing conflicts.
            
**What is copied:**
- Voice and TTS configuration
- LLM and STT configuration
- Features (transfer settings, recording, ambient noise, RAG, etc.)
- Webhooks and MCP connections
- Custom tools
- Outbound SIP configuration
- Schedule
- AdditionalData (default prompt variables)
            
**What is NOT copied:**
- Inbound SIP config — each agent requires its own dedicated SIP endpoint; assign a phone number separately after cloning
- The clone is always created with `isEnabled: false` regardless of the source agent's state
            
**Response:** Returns only the new agent ID. Use the Get agent endpoint to retrieve the full configuration.



## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json post /api/v1/agents/{agentId}/clone
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/agents/{agentId}/clone:
    post:
      tags:
        - Agents
      summary: Clone agent
      description: >-
        Creates a copy of an existing agent with a new name. The clone inherits
        the source agent's complete

        configuration (voice, TTS, LLM, features, webhooks, tools) but is always
        created in a disabled state

        and without inbound SIP config to avoid phone number routing conflicts.
                    
        **What is copied:**

        - Voice and TTS configuration

        - LLM and STT configuration

        - Features (transfer settings, recording, ambient noise, RAG, etc.)

        - Webhooks and MCP connections

        - Custom tools

        - Outbound SIP configuration

        - Schedule

        - AdditionalData (default prompt variables)
                    
        **What is NOT copied:**

        - Inbound SIP config — each agent requires its own dedicated SIP
        endpoint; assign a phone number separately after cloning

        - The clone is always created with `isEnabled: false` regardless of the
        source agent's state
                    
        **Response:** Returns only the new agent ID. Use the Get agent endpoint
        to retrieve the full configuration.
      parameters:
        - name: agentId
          in: path
          description: Source agent identifier to clone
          required: true
          schema:
            type: string
      requestBody:
        description: Clone request containing the new agent name
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CloneAgentRequestDto'
              description: >-
                Request to clone an existing agent with a new name. The clone is
                created with the source agent's configuration but with inbound
                SIP config excluded to avoid routing conflicts.
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CloneAgentRequestDto'
              description: >-
                Request to clone an existing agent with a new name. The clone is
                created with the source agent's configuration but with inbound
                SIP config excluded to avoid routing conflicts.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CloneAgentRequestDto'
              description: >-
                Request to clone an existing agent with a new name. The clone is
                created with the source agent's configuration but with inbound
                SIP config excluded to avoid routing conflicts.
      responses:
        '201':
          description: Agent cloned successfully, returns new agent ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloneAgentResponseDto'
        '400':
          description: Invalid request — name is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Access denied or agent not in organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Source agent with specified ID does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred during agent clone
components:
  schemas:
    CloneAgentRequestDto:
      required:
        - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Display name for the cloned agent.
      additionalProperties: false
      description: >-
        Request to clone an existing agent with a new name. The clone is created
        with the source agent's configuration but with inbound SIP config
        excluded to avoid routing conflicts.
    CloneAgentResponseDto:
      required:
        - agentId
      type: object
      properties:
        agentId:
          type: string
          description: Unique identifier of the newly created agent clone.
          nullable: true
      additionalProperties: false
      description: >-
        Result of a successful agent clone operation. Contains only the new
        agent identifier — fetch the full agent using the Get agent endpoint if
        the complete configuration is needed.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````