AI Sync

AI Agents

Agent Configuration

Small reads, previewed changes, verification, revision history and restore for one V1 or V2 agent.

All routes sit under /api/ai/agent/config, need Authorization: Bearer {access_token}, and return { "success": true, "data": { ... } }. Refusals return { "success": false, "message": "..." }.

Access comes only from the token: the user's company, role permissions and package. No route accepts a company ID. Another account's agent returns 404, the same as an agent that does not exist. Credentials in any response appear as [redacted].

For the plain-language guide, see Manage Voice Agents by Chat. For every field, see the settings reference.

Routes#

MethodPathPurposeMCP tool
GET/agentsFind agents: search, agent_version, page, per_page (max 50)find_agents
GET/settings-catalogGroups, or field docs with group and agent_versionget_agent_settings_catalog
GET/{agent_id}/summaryVersion, status, active revision, section sizesget_agent_config_summary
GET/{agent_id}/promptComplete prompt or a section, in pagesget_agent_active_prompt
GET/{agent_id}/settings/{group}One group or category with current valuesget_agent_settings
POST/{agent_id}/changes/previewValidate and show differences. Saves nothing.preview_agent_change
POST/changes/{change_id}/applyCarry out an approved previewapply_agent_change
GET/{agent_id}/verifyCompare live configuration with the active revisionverify_agent_config
GET/{agent_id}/revisionsHistory, newest firstlist_agent_revisions
GET/{agent_id}/revisions/{id}One revision. include=prompt or include=settingsget_agent_revision
GET/{agent_id}/revisions/{from}/compare/{to}Differences between two revisionscompare_agent_revisions
POST/{agent_id}/revisions/{id}/restore-previewPreview going backpreview_agent_restore
POST/{agent_id}/revisions/{id}/activate-previewPreview putting a draft livepreview_agent_draft_activation
POST/{agent_id}/test-callBrowser test session. Never dials a phone.start_agent_test_session
GET/calls/{call_id}/revisionThe revision a past call ran onget_call_agent_revision

Read a prompt#

GET /api/ai/agent/config/{agent_id}/prompt

sectionstringquery

One section: project_instructions, prompt_greetings, prompt_character, prompt_transfer_instr, prompt_critical_instr, prompt_custom_vars, prompt_company_info, prompt_script_flow, prompt_call_flow, prompt_objections, prompt_appt_flow, prompt_faq_base

scopestringquerydefault: full

full is what the agent receives. own leaves out the automatic blocks.

offsetintegerquerydefault: 0

Character to start from

limitintegerquerydefault: 20000

Characters per page, up to 20000

textstring

This page of text

next_offsetinteger | null

Where the next page starts. null on the last page.

completeboolean

false means more text remains. Keep paging until this is true.

total_charsinteger

Length of the complete text

sha256string

Checksum of the complete text, to confirm you joined the pages correctly

hidden_platform_linksboolean

true if platform links were hidden from this text

Preview a change#

POST /api/ai/agent/config/{agent_id}/changes/preview

Send only what should change. Anything left out stays as it is.

prompt_sectionsobjectbody

Section name to complete new text. Empty text is refused.

clear_prompt_sectionsstring[]body

Sections to empty on purpose. project_instructions cannot be cleared.

prompt_editsobject[]body

Exact swaps: { "find": "...", "replace": "..." }. Each find must match exactly once.

settingsobjectbody

Group to fields, for example { "conversation": { "interruption_sensitivity": 0.5 } }. Null values are refused.

clear_settingsobjectbody

Group to fields to empty on purpose, for example { "webhook": ["webhook_url"] }

base_revision_idintegerbody

The revision this edit was based on. Returns 409 if the agent has moved on.

reasonstringbody

Why the change is being made. Kept on the revision.

agent_versionstringbody

V1 or V2. Refused if the agent is not this version.

Any other field is refused, including apply_to_agent_ids: a change applies to one agent.

cURL
curl --request POST \
 --url https://app.rizzdial.com/api/ai/agent/config/agent_123/changes/preview \
 --header 'Authorization: Bearer {{bearer_token}}' \
 --header 'Content-Type: application/json' \
 --data '{
  "prompt_sections": { "prompt_call_flow": "New call flow text" },
  "reason": "Shorter call flow"
 }'

The response holds change_id, base_revision_id, expires_at_utc (60 minutes) and preview with the exact differences. If callers would not get this change, preview.warning says so and names the agent to edit instead.

Apply a change#

POST /api/ai/agent/config/changes/{change_id}/apply

Applies edits, restores and draft activations.

approvedbooleanbodyrequired

Must be true, sent only after the person has seen the preview and said yes

idempotency_keystringbodyrequired

Up to 100 characters. Reuse it only to retry this approval. A retry returns the first result with replayed: true and does nothing twice.

activatebooleanbodydefault: true

false saves an edit as a draft. Callers do not hear a draft. Restores and draft activations always go live.

approval_notestringbody

The person's approval in their words

StatusstatusMeaning
200appliedSaved and read back. Check verification.call_serving.
200draftedStored only. is_live is false.
409staleThe agent changed after the preview. Nothing saved.
409Another change is saving, this one was interrupted, or the key belongs to another change
410The preview expired
422Missing approval or key, or invalid request
502failedNot saved. previous_configuration_preserved says whether the old configuration was confirmed intact.

Verify#

GET /api/ai/agent/config/{agent_id}/verify

Reads the live configuration from the voice platform. Places no call.

statusstring

matches_active_revision, changed_outside_this_flow or no_revision_yet

call_serving.statestring

confirmed (V2: the platform holds this configuration), pending_confirmation (V1: a test call must confirm which version callers get) or forwarded (a V2 replacement answers; see serving_agent_id)

verified_for_callsboolean

true only when live matches the active revision and call_serving.state is confirmed

differences_from_active_revisionobject[]

What changed, when live no longer matches

Revisions#

Revisions cannot be changed or deleted. Restoring adds a new one.

kindstring

observed (found live, made outside this flow), change, draft, activation or restore

statusstring

active, draft or failed

Each revision also has revision_id, parent_revision_id, restored_from_revision_id, activated_from_revision_id, config_hash, prompt_history_id, requested_by, approved_by, reason, changed_paths and created_at_utc.

Test session#

POST /api/ai/agent/config/{agent_id}/test-call

confirmbooleanbodyrequired

Must be true, sent only after the person has asked for a test

idempotency_keystringbodyrequired

A retry with the same key returns the same session for 30 minutes

The response has kind: "web_session", dials_a_phone: false and session, which holds access_token and, on V1, call_id, transport and ice_servers.