Skip to main content
PUT
/
api
/
agents
/
{agentId}
cURL
curl --request PUT \
  --url https://app.cotool.ai/api/agents/{agentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "systemPrompt": "<string>",
  "toolNames": [
    "<string>"
  ],
  "inputs": [
    {
      "type": "text",
      "name": "<string>",
      "description": "<string>",
      "required": true
    }
  ],
  "modelAlias": "<any>",
  "contextDocs": [
    {
      "provider": "googleDocs",
      "id": "<string>",
      "name": "<string>",
      "mimeType": "<string>"
    }
  ],
  "tinesStoryImportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "planningMode": "never"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "deletedAt": "<string>",
  "toolNames": [
    "<string>"
  ],
  "inputs": [
    {
      "type": "text",
      "name": "<string>",
      "description": "<string>",
      "required": true
    }
  ],
  "modelAlias": "<any>",
  "contextDocs": [
    {
      "provider": "googleDocs",
      "id": "<string>",
      "name": "<string>",
      "mimeType": "<string>"
    }
  ],
  "tinesStoryImportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "triggerSummary": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "source": "jira",
      "name": "<string>",
      "enabled": true
    }
  ],
  "planningMode": "never"
}

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 agent to update

Body

application/json

Request body for updating agent configuration (all fields optional)

name
string

Optional new name for the agent

description
string

Optional new description for the agent

systemPrompt
string

Optional new system prompt for the agent

toolNames
string[]

Optional new array of tool names for the agent

inputs
object[]

Optional new input configuration for the agent

modelAlias
any

Model alias must be a valid model from the registry

contextDocs
object[]

Optional new context documents for the agent

tinesStoryImportId
string<uuid> | null

Optional reference to the Tines story import template (can be set to null to clear)

planningMode
enum<string>

Optional new planning behavior for this agent

Available options:
never,
always,
auto

Response

200 - application/json

Successful response

The updated agent with modified configuration

id
string<uuid>
required

Unique identifier for the agent

organizationId
string<uuid>
required

Organization this agent belongs to

name
string
required

Name of the agent

description
string
required

Description of what the agent does

createdAt
string
required

When the agent was created

updatedAt
string
required

When the agent was last updated

deletedAt
string | null
required

When the agent was deleted, if applicable

toolNames
string[]
required

Names of tools available to this agent

inputs
object[]
required

DEPRECATED Input configuration for the agent. This field is no longer used and will be removed in a future version.

modelAlias
any
required

Model alias used by this agent

contextDocs
object[]

Optional context documents

tinesStoryImportId
string<uuid> | null

Reference to the Tines story import template used to create this agent

triggerSummary
object[]

Summary of triggers configured for this agent

planningMode
enum<string>

Planning behavior for this agent

Available options:
never,
always,
auto