Skip to main content
POST
/
duplicate-agent
Duplicate an agent
curl --request POST \
  --url https://app.phonely.ai/api/duplicate-agent \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '{
  "uid": "<string>",
  "agentId": "<string>"
}'
{
  "uid": "<string>",
  "agentId": "<string>",
  "name": "<string>"
}
Creates a copy of an existing agent with all its settings and configurations.

Request

Method: POST
Endpoint: /api/duplicate-agent
Headers:
  • X-Authorization: Your API key (required)
  • Content-Type: application/json
Request Body:
{
  "uid": "string",
  "agentId": "string"
}
Parameters:
  • uid (string, required): Your user ID
  • agentId (string, required): The ID of the agent to duplicate

Response

Success Response (200):
{
  "uid": "string",
  "agentId": "string",
  "name": "string"
}
Error Responses:
  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Invalid or missing API key, or insufficient permissions
  • 500 Internal Server Error: Server error

Example

curl -X POST https://app.phonely.ai/api/duplicate-agent \
  -H "X-Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123",
    "agentId": "agent456"
  }'

Authorizations

X-Authorization
string
header
required

Body

application/json
uid
string
required

User ID

agentId
string
required

Agent ID to be duplicated

Response

Successful response

uid
string

User ID

agentId
string

New duplicated Agent ID

name
string

New duplicated Agent name

I