Skip to main content
POST
https://jwhite.tail8bf327.ts.net
/
api
/
v1
/
agents
/
{id}
/
duplicate
Duplicate Agent
curl --request POST \
  --url https://jwhite.tail8bf327.ts.net/api/v1/agents/{id}/duplicate \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "agent": {
    "agent_id": 124,
    "name": "Sales Support Agent (Copy)",
    "avatar_id": 1,
    "language": "en",
    "custom_greeting": "Welcome! How can I assist you today?",
    "context": "You are a helpful sales assistant.",
    "status": "active",
    "created_at": "2024-01-15T11:00:00Z"
  },
  "message": "Agent duplicated successfully"
}

Authentication

Requires JWT authentication (cookie-based) or API key authentication.
Authorization: Bearer <jwt_token>

Parameters

id
integer
required
The ID of the agent to duplicate

Request

POST https://jwhite.tail8bf327.ts.net/api/v1/agents/123/duplicate
Authorization: Bearer <jwt_token>

Response

{
  "success": true,
  "agent": {
    "agent_id": 124,
    "name": "Sales Support Agent (Copy)",
    "avatar_id": 1,
    "language": "en",
    "custom_greeting": "Welcome! How can I assist you today?",
    "context": "You are a helpful sales assistant.",
    "status": "active",
    "created_at": "2024-01-15T11:00:00Z"
  },
  "message": "Agent duplicated successfully"
}
{
  "error": "Agent not found"
}

Notes

  • The duplicated agent will have ” (Copy)” appended to its name
  • All configuration settings are copied (avatar, greeting, context, properties, memories, knowledge_base)
  • The voice comes from the avatar, so the duplicate will use the same voice if it uses the same avatar
  • Session history is NOT copied - the new agent starts fresh
  • You must own the original agent to duplicate it

Use Cases

  • Template Creation: Create variations of successful agent configurations
  • Testing: Duplicate a production agent for testing changes
  • Backup: Create a backup before making significant changes
  • Multi-language: Create language variants of the same agent

Error Responses

For information about error responses and status codes, see Error Responses.

Common Errors for This Endpoint

  • 401 Unauthorized - Invalid or missing authentication
  • 403 Forbidden - Insufficient permissions
  • 404 Not Found - Agent not found
  • 500 Internal Server Error - Server error