Skip to main content
PATCH
/
agents
/
{id}
Error
A valid request URL is required to generate request examples
{
  "success": true,
  "data": {
    "id": "<string>",
    "organizationId": "<string>",
    "name": "<string>",
    "version": 123,
    "persona": "<string>",
    "primaryLanguage": "<string>",
    "languages": [
      "<string>"
    ],
    "enabledChannels": [],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "goals": [
      "<string>"
    ],
    "neverDo": [
      "<string>"
    ],
    "tone": "<string>",
    "lexicon": {
      "preferred": [
        "<string>"
      ],
      "banned": [
        "<string>"
      ],
      "pronunciations": {}
    },
    "voiceMap": {},
    "defaultVoiceId": "<string>",
    "voiceSettings": {
      "stability": 123,
      "similarityBoost": 123,
      "style": 123,
      "useSpeakerBoost": true,
      "speed": 123
    },
    "llmModel": "<string>",
    "llmTemperature": 123,
    "ttsModel": "<string>",
    "sttModel": "<string>",
    "endpointing": {
      "minSilenceMs": 123,
      "maxSilenceMs": 123,
      "semantic": true
    },
    "greeting": "<string>",
    "handoffConfig": {
      "warm": true,
      "transferDestination": "<string>",
      "escalationThreshold": 123,
      "contextSummaryUrl": "<string>",
      "transferRules": [
        {
          "label": "<string>",
          "when": "<string>",
          "destination": "<string>"
        }
      ]
    },
    "callControl": {
      "maxCallSeconds": 123,
      "maxDurationMessage": "<string>",
      "idleReminderDelaySeconds": 123,
      "idleReminderIntervalSeconds": 123,
      "maxIdleReminders": 123,
      "endCallPhrasesEnabled": true
    },
    "businessHours": {
      "timezone": "<string>",
      "weekly": {},
      "holidays": [
        {
          "date": "<string>",
          "name": "<string>",
          "endDate": "<string>",
          "closed": true,
          "ranges": [
            {
              "start": "<string>",
              "end": "<string>"
            }
          ]
        }
      ],
      "afterHours": {
        "mode": "<string>",
        "message": "<string>",
        "allowHumanTransfer": true,
        "number": "<string>",
        "emergencyNumber": "<string>"
      }
    },
    "channelOverrides": {},
    "avgTicketCents": 123,
    "publishedVersionId": "<string>",
    "isActive": true,
    "createdBy": "<string>"
  },
  "message": "<string>",
  "errors": [
    {
      "field": "<string>",
      "message": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Flowyte secret API key (Authorization: Bearer flowyte_sk_live_…). Scope-gated; is scoped to your organization — a key can never reach another tenant. The listed scopes in each operation's apiKey requirement are the scopes that key must hold. The tokenUrl is nominal: keys are minted in the dashboard.

Headers

If-Match
string

Optimistic-concurrency token: the agent version the client last read. The server increments agents.version on every mutation; if If-Match is stale, the mutation is rejected 409 with the current version + current agent state so the client can rebase (refetch + re-apply pending field edits + retry).

Path Parameters

id
string
required

Body

application/json

Partial Agent (autosave). Any subset of editable Agent fields.

id
string
required
organizationId
string
required
name
string
required
version
integer
required
status
enum<string>
required
Available options:
draft,
published
persona
string
required
primaryLanguage
string
required
languages
string[]
required
sku
enum<string>
required
Available options:
code_switch,
single_language
enabledChannels
enum<string>[]
required

Open enum (future sms|whatsapp|email slot in with no schema change).

Available options:
voice,
chat
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
goals
string[]
neverDo
string[]
tone
string
lexicon
object
voiceMap
object
defaultVoiceId
string | null
voiceSettings
object
llmModel
string
llmTemperature
number
ttsModel
string
sttModel
string
endpointing
object
greeting
string | null
handoffConfig
object
callControl
object

Per-agent call-control guardrails (max duration, idle/no-response handling). All fields optional; an empty object means the runtime applies platform defaults (max call 10 min, idle reminders on, end on no response).

businessHours
object

Per-agent open/closed schedule so the agent knows whether it is currently OPEN or CLOSED, speaks the correct local time, and applies the configured after-hours behavior. Empty object = unconfigured (no hours constraint; the agent behaves as always available). A timezone is required whenever a schedule is set — even at 24/7 — so the spoken local time is correct.

channelOverrides
object

Per-channel overrides of the shared agent config, keyed by channel ("voice" | "chat"). Only set the keys that should DIFFER from the shared config. The common use is a chat-specific opening line, e.g. { "chat": { "enabled": true, "greeting": "Hi! How can I help?" } } — an empty/omitted chat greeting inherits the agent's main (voice) greeting. See ChannelPolicy for the per-channel fields.

avgTicketCents
integer | null

The customer's saved average ticket / job value in CENTS, used by the Observe summary to compute recovered revenue. null = unset (the read layer falls back to its conservative default).

publishedVersionId
string | null
isActive
boolean
createdBy
string

Response

Updated agent.

success
boolean
required
data
object
required
message
string
errors
object[]