Change Business settings
const url = 'http://127.0.0.1:7700/api/business';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"on":true,"company":"Fogline","policy":"Over $10,000 goes to the Controller.\nEverything else goes to any approver."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:7700/api/business \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "on": true, "company": "Fogline", "policy": "Over $10,000 goes to the Controller.\nEverything else goes to any approver." }'Preview. For an admin or the owner. Only the owner turns Business on or off, or maps a work-account group to the owner role. Send only what changes. A policy line the box cannot read is a 400 that names it. Turning Business off keeps the people and the policy for next time. On a Business box, only people answer in SpacetimeDB.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
One rule per line, such as Over $10,000 goes to the Controller. The first match decides. # starts a comment.
object
Names of seats to run in shadow mode.
Work-account sign-in: {name, issuer, clientId, secretKey, domain?, groups}. null turns it off. secretKey is a vault key that starts with SSO_.
Example
{ "on": true, "company": "Fogline", "policy": "Over $10,000 goes to the Controller.\nEverything else goes to any approver."}Responses
Section titled “Responses”The settings after the change.
object
object
Names of the people who approve under it.
Who last changed the line, and when: {by, at}.
object
The sign-in settings. Never the secret.
The one-week pilot record.
object
Example generated
{ "on": true, "company": "example", "policy": "example", "rules": [ { "line": "example", "to": "example", "any": true, "overCents": 1, "phrase": "example", "app": "example", "blocked": true, "approvers": [ "example" ], "changed": "example" } ], "warnings": [ "example" ], "seats": [ {} ], "sso": "example", "shadow": [ "example" ], "pilot": {}, "paused": { "by": "example", "at": "2026-04-15T12:00:00Z", "via": "example" }}An unknown field or a bad value, with the reason.
object
What went wrong
Example generated
{ "error": "example"}The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.
object
What went wrong
Example
{ "error": "only this computer's own screen or the owner's paired device can do this"}