Skip to main content
PUT
/
api
/
agents
/
batch
cURL
curl -X PUT "https://app.cotool.ai/api/agents/batch" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"name":"string","description":"string","systemPrompt":"string","toolNames":["string"],"cliNames":["string"],"toolActionConfigs":null,"inputs":[{"type":"text","name":"string","description":"string","required":true}],"modelAlias":null,"contextDocs":[{"provider":"googleDocs","id":"string","name":"string","mimeType":"string"}],"tinesStoryImportId":"string","planningMode":"never","structuredOutputSchema":null,"persistentWorkspaceEnabled":true,"tags":[null],"skills":[{"skillId":"string","skillVersionId":"string"}],"acceptanceCriteria":["string"],"id":"string"}]}'
{
  "agents": [
    {
      "id": "<string>",
      "organizationId": "<string>",
      "name": "<string>",
      "description": "<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>"
      ],
      "detectionQuery": "<string>",
      "siemType": "<string>",
      "isSuggestion": true,
      "lastDetectionRunAt": "<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

Body

application/json

Atomically update many agents in a single transaction. The entire batch succeeds or rolls back together.

items
object[]
required

Per-agent update payloads. The whole batch is applied in a single transaction.

Required array length: 1 - 200 elements

Response

Successful response

Updated agents from a batch update.

agents
object[]
required

The updated agents, in the same order as the request items. Items whose agent could not be found or read after update are omitted.

Agent configuration - can be either a built in (system-managed) or custom (user-created) agent