curl -X POST "https://app.cotool.ai/api/agents/:agentId/copy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/agents/{agentId}/copy"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/agents/{agentId}/copy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://app.cotool.ai/api/agents/{agentId}/copy")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/copy"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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,
"createsAlert": 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>",
"syncConfigId": "<string>",
"detectionQuery": "<string>",
"siemType": "<string>",
"isSuggestion": true,
"lastDetectionRunAt": "<string>"
},
"parkedAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parkedAgentName": "<string>",
"transferredTriggerNames": [
"<string>"
]
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Convert a disconnected managed agent into a manual agent
Convert a sync-managed (GitOps) agent whose integration is disconnected into an editable manual agent: copies its config + prompt, transfers its trigger rows (preserving email/webhook/Slack bindings), and parks the managed original as a recoverable soft-delete.
curl -X POST "https://app.cotool.ai/api/agents/:agentId/copy" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/agents/{agentId}/copy"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/agents/{agentId}/copy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://app.cotool.ai/api/agents/{agentId}/copy")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/copy"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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,
"createsAlert": 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>",
"syncConfigId": "<string>",
"detectionQuery": "<string>",
"siemType": "<string>",
"isSuggestion": true,
"lastDetectionRunAt": "<string>"
},
"parkedAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parkedAgentName": "<string>",
"transferredTriggerNames": [
"<string>"
]
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Authorizations
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Path Parameters
Unique identifier of the sync-managed agent to copy
Response
Successful response
The manual copy, the parked original, and which triggers were transferred
The newly created, non-managed copy
- Option 1
- Option 2
Show child attributes
Show child attributes
The now-parked (soft-deleted, recoverable) managed agent that was converted
Name of the parked managed agent
Names of the triggers transferred from the parked agent to the copy (rows re-pointed, bindings preserved)
Was this page helpful?