Skip to main content
PATCH
/
v2
/
chat
/
agents
/
{id}
Update agent
curl --request PATCH \
  --url https://api.agntix.ai/v2/chat/agents/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "fullName": "Tier-1 Support — Updated",
  "systemPrompt": "You specialize in billing, returns, and account access. Be brief.",
  "isActive": true
}
'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "fullName": "Customer Support Bot",
  "description": "Handles tier-1 customer queries",
  "role": "You are a helpful support agent for Acme Inc.",
  "language": "en",
  "systemPrompt": "<string>",
  "voiceEnabled": false,
  "voicePipelineMode": "<string>",
  "isActive": true,
  "isPublic": false,
  "orgId": "org_2abc123",
  "modelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2026-04-28T11:42:11Z",
  "updatedAt": "2026-04-28T11:42:11Z"
}
Every endpoint on this page requires either a Clerk-issued JWT (Authorization: Bearer <token>) or an organization API key (x-api-key: pk_…). Anonymous calls return 401 Unauthorized. See Authentication for the full setup.
Tool attachments are replaced on update, not merged. To add a tool, send the full list of desired tools including existing ones. Pass "tools": [] to detach all tools.

Code examples

curl -X PATCH https://api.agntix.ai/v2/chat/agents/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "x-api-key: pk_live_••••" \
  -H "Content-Type: application/json" \
  -d '{
    "fullName": "Tier-1 Support — Updated",
    "systemPrompt": "You specialize in billing, returns, and account access. Be brief and friendly.",
    "isActive": true
  }'

Updating tools

To attach a new tool without removing existing ones, first fetch the agent, then send the merged list:
Node.js
const agent = await fetch(`https://api.agntix.ai/v2/chat/agents/${id}`, {
  headers: { 'x-api-key': 'pk_live_••••' },
}).then(r => r.json());

const existingToolIds = agent.agentTools.map(({ tool }) => ({ toolId: tool.id }));

await fetch(`https://api.agntix.ai/v2/chat/agents/${id}`, {
  method: 'PATCH',
  headers: { 'x-api-key': 'pk_live_••••', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    tools: [...existingToolIds, { toolId: 'new-tool-uuid' }],
  }),
});

Sample response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "fullName": "Tier-1 Support — Updated",
  "systemPrompt": "You specialize in billing, returns, and account access. Be brief and friendly.",
  "isActive": true,
  "updatedAt": "2026-04-29T09:30:00Z"
}

Authorizations

x-api-key
string
header
required

Organization API key. Obtain from the dashboard. Format: pk_live_…

Path Parameters

id
string<uuid>
required

Body

application/json

All fields are optional — only provided fields are updated.

fullName
string
description
string
role
string
language
string
systemPrompt
string
specialInstructions
string
modelId
string<uuid>
voiceEnabled
boolean
voicePipelineMode
enum<string>
Available options:
pipeline,
sts,
hybrid
isActive
boolean
isPublic
boolean
tools
object[]
subAgents
object[]

Pass [] to remove all sub-agents.

Response

Updated agent.

id
string<uuid>
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

fullName
string
Example:

"Customer Support Bot"

description
string
Example:

"Handles tier-1 customer queries"

role
string
Example:

"You are a helpful support agent for Acme Inc."

language
string
Example:

"en"

systemPrompt
string
voiceEnabled
boolean
Example:

false

voicePipelineMode
string | null
isActive
boolean
Example:

true

isPublic
boolean
Example:

false

orgId
string
Example:

"org_2abc123"

modelId
string<uuid>
createdAt
string<date-time>
Example:

"2026-04-28T11:42:11Z"

updatedAt
string<date-time>
Example:

"2026-04-28T11:42:11Z"