Skip to content

Clone agent

POST
/agents/{id}/clone
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.

id
required

MongoDB ObjectId

string
/^[a-fA-F0-9]{24}$/

MongoDB ObjectId

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
Allowed values: active under_review suspended removed
notice
required
string | null
updatedAt
required
string | null
preset
Any of:

The template's system-prompt preset the agent's prompt was copied from, and that preset's version then. Send it on create when settings holds a preset's prompt, so the dashboard can offer the preset's later versions.

object
id
required
string
>= 1 characters
version
required
integer
> 0
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
Allowed values: plan_required
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"
]
}