Clone agent
POST
/agents/{id}/clone
const url = 'https://api.somebodyai.co/api/v1/agents/507f1f77bcf86cd799439011/clone';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.somebodyai.co/api/v1/agents/507f1f77bcf86cd799439011/clone \ --header 'Authorization: Bearer <token>'Creates a new agent in the current organization with the source template, settings, and resource attachments. Player keys and sessions are not copied.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
MongoDB ObjectId
string
MongoDB ObjectId
Responses
Section titled “Responses”Agent cloned
Media typeapplication/json
object
id
required
string
name
required
string
templateId
required
string
playerUrl
required
string
shareLink
required
Anyone with the link can talk to this agent
boolean
moderation
required
object
status
required
string
notice
required
string | null
updatedAt
required
string | null
preset
settings
required
Values explicitly set on this agent. Never contains template defaults.
object
key
additional properties
effectiveSettings
required
Settings with the template defaults resolved over it — what the player receives. Read-only: writing this back would persist defaults.
object
key
additional properties
revisionId
required
The newest revision of the agent: the version token to send as X-Base-Revision-Id on PUT /agents/{id} and PATCH /agents/{id}/settings. null for an agent saved before revisions existed, until its next save.
string | null
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "id": "507f1f77bcf86cd799439011", "name": "My Voice Agent", "templateId": "gaussian", "playerUrl": "https://player.example.com/voice", "moderation": { "status": "active" }, "preset": { "id": "customer-support", "version": 2 }, "settings": { "transportService": "daily", "systemPrompt": "You are a helpful assistant" }, "effectiveSettings": { "transportService": "daily", "llmService": "openai", "systemPrompt": "You are a helpful assistant" }, "revisionId": "665f1f77bcf86cd799439099", "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z"}Unauthorized - missing or invalid auth
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}The organization's plan does not include this
Media typeapplication/json
object
error
required
string
code
required
string
capability
required
string
requiredPlan
required
string | null
Example
{ "code": "plan_required", "capability": "integrations.shopify", "requiredPlan": "team"}Resource not found
Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{ "error": "Resource not found", "details": [ "Field is required" ]}