跳至主要内容

PATCH /api/chain/:slug/settings

Update one or more chain settings. Patch shape — only fields you include are changed; omitted fields are left alone. Admin+ on the chain.

Auth

Authorization: Bearer zeq_ak_… AND admin+ role on the entangled state.

Cost

0 ZEQ. Bookkeeping only — but writes a settings_updated admin-action transition for audit.

Request

curl -X PATCH https://YOUR-FRAMEWORK/api/chain/zeq07090490306/settings \
-H "Authorization: Bearer zeq_ak_..." \
-H "Content-Type: application/json" \
-d '{
"display_name": "Production pipeline",
"purpose": "ML inference receipts for the regulated workflow",
"is_public": false,
"inject_agent_rail": false,
"inject_pulse_orb": true
}'

Body

All fields optional. Send only what you want to change.

FieldTypeNotes
display_namestring (≤255)Human label for /portal/, /state/, etc. Empty string clears it.
purposestring (≤4000)Free-text description — what this chain records. Empty string clears.
is_publicboolMirror opt-in events to the public /state/ directory. Independent of share_enabled.
inject_agent_railboolWhen TRUE, the framework injects /embed/agent-rail.js into every served HTML page on /s/<slug>/. Default FALSE — opt-in only (Phase L3).
inject_pulse_orbboolWhen TRUE, the framework injects /pulse.js into every served HTML page on /s/<slug>/. Default FALSE — opt-in only (Phase L3).

The default canvas always ships with the Pulse. When no page has been uploaded yet and the user hits /s/<slug>/, the framework returns a default canvas with the Pulse pre-wired regardless of the inject_pulse_orb flag. The flag only governs user-uploaded HTML pages — the framework will not silently mutate bytes you uploaded.

Response · 200 OK

{
"ok": true,
"machine": {
"id": "5b7a9c12-...",
"slug": "zeq07090490306",
"display_name": "Production pipeline",
"purpose": "ML inference receipts for the regulated workflow",
"is_public": false,
"inject_agent_rail": false,
"inject_pulse_orb": true,
"status": "active",
"updated_at": "2026-05-10T13:08:32Z"
}
}

Errors

StatusCodeCause
400display_name_too_long> 255.
400purpose_too_long> 4000.
400no_changesEmpty body.
403Caller is below admin role.
404Slug doesn't resolve.

Where the toggles surface in UI

/state/admin/ai/ → "Auto-inject into hosted pages" card. Two checkboxes (inject-agent-rail, inject-pulse-orb), one Save button. Both default unchecked. The card explains:

Default: OFF — your HTML stays exactly as you uploaded it. Flip a toggle on if you want every visitor to see the bubble without changing your code.