logo
AgentsUpdate agent
Agents

Update agent

Updates agent configuration. All fields are optional — only provided fields are changed. For companyInfo and persona, provided fields are merged into the existing object (not replaced).

curl -X PATCH "https://api.sendkit.ai/v1/agents/example_string" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Enterprise Sales Agent v2"
}'
{
  "success": true,
  "data": {
    "_id": "664a1b2c3d4e5f6a7b8c9d0e",
    "name": "Enterprise Sales Agent v2",
    "userId": "user_123",
    "workspaceId": "ws_123",
    "companyInfo": {
      "name": "Acme Inc",
      "description": "AI-powered email outreach platform with 10k+ customers"
    },
    "persona": {
      "tone": "friendly",
      "role": "sales representative",
      "communicationStyle": "concise",
      "customInstructions": "Always ask about their current tooling."
    },
    "isDefault": true,
    "isActive": true,
    "createdAt": "2024-06-01T10:00:00.000Z",
    "updatedAt": "2024-06-05T14:30:00.000Z"
  }
}
PATCH
/v1/agents/{id}
PATCH
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer Token
Bearer Tokenstring
Required

API key as Bearer token

API key as Bearer token
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring

Agent name (trimmed)

companyInfoobject

Fields to merge into company info

personaobject

Fields to merge into persona

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

header
Authorizationstring
Required

Bearer token. API key as Bearer token

Path Parameters

idstring
Required

Resource ID

Body

application/json
namestring

Agent name (trimmed)

companyInfoobject

Fields to merge into company info

personaobject

Fields to merge into persona

Responses

successboolean
dataobject