Skip to main content
POST
/
api
/
agents
/
{agentId}
/
copy
cURL
curl -X POST "https://app.cotool.ai/api/agents/:agentId/copy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
{
  "agent": {
    "id": "<string>",
    "organizationId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "systemPrompt": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "deletedAt": "<string>",
    "toolNames": [
      "<string>"
    ],
    "toolActionConfigs": [
      {
        "type": "<string>",
        "allowedChannels": [
          {
            "id": "<string>",
            "name": "<string>"
          }
        ],
        "hideAgentButton": true
      }
    ],
    "inputs": [
      {
        "name": "<string>",
        "description": "<string>",
        "required": true
      }
    ],
    "modelAlias": "<unknown>",
    "isBuiltIn": true,
    "cliNames": [
      "<string>"
    ],
    "contextDocs": [
      {
        "id": "<string>",
        "name": "<string>",
        "mimeType": "<string>"
      }
    ],
    "tinesStoryImportId": "<string>",
    "triggerSummary": [
      {
        "id": "<string>",
        "name": "<string>",
        "enabled": true
      }
    ],
    "structuredOutputSchema": {
      "title": "<string>",
      "description": "<string>",
      "properties": {},
      "items": "<unknown>",
      "required": [
        "<string>"
      ],
      "enum": [
        "<string>"
      ],
      "additionalProperties": true,
      "x-cotool": {
        "viewerId": "<string>"
      }
    },
    "persistentWorkspaceEnabled": true,
    "tags": [
      "<string>"
    ],
    "skills": [
      {
        "skillId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "skill": {
          "name": "<string>",
          "description": "<string>",
          "requiredTools": [
            "<string>"
          ]
        },
        "skillVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "invocationCount30d": 123
      }
    ],
    "acceptanceCriteria": [
      "<string>"
    ],
    "syncKey": "<string>",
    "syncSource": "<string>",
    "syncFilePath": "<string>",
    "detectionQuery": "<string>",
    "siemType": "<string>",
    "isSuggestion": true,
    "lastDetectionRunAt": "<string>"
  },
  "parkedAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "parkedAgentName": "<string>",
  "transferredTriggerNames": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Path Parameters

agentId
string<uuid>
required

Unique identifier of the sync-managed agent to copy

Response

Successful response

The manual copy, the parked original, and which triggers were transferred

agent
object
required

The newly created, non-managed copy

parkedAgentId
string<uuid>
required

The now-parked (soft-deleted, recoverable) managed agent that was converted

parkedAgentName
string
required

Name of the parked managed agent

transferredTriggerNames
string[]
required

Names of the triggers transferred from the parked agent to the copy (rows re-pointed, bindings preserved)