Skip to main content
PUT
Update Agent

Overview

Updates an existing agent’s configuration. Send only the fields you want to modify — all other fields remain unchanged. Authentication: Session-based (Better Auth) Scope: Active organization from session

Request

Path Parameters: Headers:
Request Body:
Optional Fields:

Response

Status: 200 OK
Special Response (Missing API Keys):

Access Control

Commercial Agent Restriction:
  • Only Owners/Admins can update commercial agents
  • Creators cannot modify their own commercial agents

Validation Rules

Architecture-Specific Validation

Pipeline:
Realtime:
Text:

Field Validation

Mode Change Validation

Changing to Commercial:
  • ✅ Allowed for Owners/Admins
  • ❌ Forbidden for Members
  • Error: “Only organization owners and admins can set agent as commercial”

Error Responses

401 Unauthorized

403 Forbidden

400 Bad Request

404 Not Found

500 Server Error

Examples

cURL

JavaScript (Fetch)

Next.js (Client Component)

Update Languages

Change to Commercial Mode

Use Cases

Full Configuration Update

Architecture-Specific Update

Authorizations

x-api-key
string
header
required

Your TalkifAI API key. Generate from Studio → Settings → API Keys. Format: tk_live_...

Path Parameters

agentId
string
required

Body

application/json
name
string
description
string
sysMsg
string
model
string
stt
string
voiceId
string
realtimeProvider
enum<string>
Available options:
openai,
gemini
greetingType
enum<string>
Available options:
agentFirst,
userFirst
greetingMessage
string
lastMessage
string
temperature
number
inactivityTimeout
integer
Required range: 10 <= x <= 60
mode
enum<string>
Available options:
public,
private,
commercial
languages
string[]
functionCallingEnabled
boolean
enabledFunctions
string[]
enabledCustomFunctions
string[]

Response

Agent updated

success
boolean
data
object