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.
| Field | Type | Notes |
|---|---|---|
display_name | string (≤255) | Human label for /portal/, /state/, etc. Empty string clears it. |
purpose | string (≤4000) | Free-text description — what this chain records. Empty string clears. |
is_public | bool | Mirror opt-in events to the public /state/ directory. Independent of share_enabled. |
inject_agent_rail | bool | When 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_orb | bool | When 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 theinject_pulse_orbflag. 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
| Status | Code | Cause |
|---|---|---|
400 | display_name_too_long | > 255. |
400 | purpose_too_long | > 4000. |
400 | no_changes | Empty body. |
403 | — | Caller is below admin role. |
404 | — | Slug 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.
Related
- Pulse — what
inject_pulse_orbcontrols - Page hosting — what gets injected into
POST /:slug/audit/decrypt— owner-only audit access- Chain admin — full per-chain endpoint set