Account operations

The account that owns apps: members, keys and apps.

Docs menu

account

account.app.create

Create an app owned by the account. A region (a slug region.choices lists) places it there; one that is not listed is refused with REGION_UNAVAILABLE.

Route
POST /v1/_accounts/{id}/apps
Auth
Account key account
MCP tool
substrio_account_app_create
CLI
substrio op account.app.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugbodystringYes
regionbodystringNoA slug region.choices lists: the region to create the app in. Refused with REGION_UNAVAILABLE when it is not listed.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/apps" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"slug"}'

account.app.delete

Delete one of the account's apps and its data.

Route
DELETE /v1/_accounts/{id}/apps/{slug}
Auth
Account key account
MCP tool
substrio_account_app_delete
CLI
substrio op account.app.delete

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugpathstringYes

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/apps/$SLUG" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.app.list

List the apps an account owns.

Route
GET /v1/_accounts/{id}/apps
Auth
Account key account
MCP tool
substrio_account_app_list
CLI
substrio op account.app.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
limitqueryinteger (0 or more)Nothe most items per page (positive); absent returns every item.
cursorquerystringNoresume after the previous page: its next_cursor.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/apps" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.app.open.get

Read whether other accounts' keys may be scoped to one of the account's apps.

Route
GET /v1/_accounts/{id}/apps/{slug}/keys-open
Auth
Account key account
MCP tool
substrio_account_app_open_get
CLI
substrio op account.app.open.get

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugpathstringYes

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/apps/$SLUG/keys-open" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.app.open.set

Open one of the account's apps to other accounts' keys, or close it.

Route
PUT /v1/_accounts/{id}/apps/{slug}/keys-open
Auth
Account key account
MCP tool
substrio_account_app_open_set
CLI
substrio op account.app.open.set

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugpathstringYes
openbodybooleanYes

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/apps/$SLUG/keys-open" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"open":true}'

account.apps.order

Set the order the account's apps run in: apps lists every app id of the account once (any other list is refused, INVALID_ARGUMENT naming apps). The first max_apps run; the rest are paused, keeping every byte, and their requests answer APP_OVER_PLAN until they move up, an app is deleted or the plan allows more. Answers each app in order with active, and max_apps (0: no limit).

Route
PUT /v1/_accounts/{id}/apps/order
Auth
Account key account
MCP tool
substrio_account_apps_order
CLI
substrio op account.apps.order

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
appsbodyarray of integerYesEvery app id of the account (account.app.list's id), each once, in the order they run: the first max_apps run, the rest are paused (APP_OVER_PLAN).

Response

FieldTypePresentDescription
appsarray of objectAlways
max_appsintegerAlwaysthe apps the account may run; 0: no limit.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/apps/order" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"apps":[]}'

account.create

Create an account owned by the signed-in person.

Route
POST /v1/_accounts
Auth
Account key account
MCP tool
substrio_account_create
CLI
substrio op account.create

Parameters

NameInTypeRequiredDescription
namebodystringYes
owner_user_idbodyintegerNoSystem key only: the identity app user who owns the account. Minimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"name"}'

account.delete

Delete an account that owns no apps, with its members and keys.

Route
DELETE /v1/_accounts/{id}
Auth
Account key account
MCP tool
substrio_account_delete
CLI
substrio op account.delete

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.get

Read an account.

Route
GET /v1/_accounts/{id}
Auth
Account key account
MCP tool
substrio_account_get
CLI
substrio op account.get

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.invite.accept

Accept an invite as the signed-in person and join its account.

Route
POST /v1/_accounts/invites/accept
Auth
Account key account
MCP tool
substrio_account_invite_accept
CLI
substrio op account.invite.accept

Parameters

NameInTypeRequiredDescription
tokenbodystringYesThe token of the invite link.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/invites/accept" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"token":"token"}'

account.invite.create

Invite someone to join an account with a role; the link is returned once.

Route
POST /v1/_accounts/{id}/invites
Auth
Account key account
MCP tool
substrio_account_invite_create
CLI
substrio op account.invite.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
rolebody"developer" | "admin" | "owner"No
emailbodystringNoOnly this person, signed in with this verified email, may accept.
expires_in_secondsbodyintegerNoHow long the invite works (default account_invite_seconds, at most account_invite_max_seconds). Minimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/invites" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.invite.list

List an account's open and expired invites.

Route
GET /v1/_accounts/{id}/invites
Auth
Account key account
MCP tool
substrio_account_invite_list
CLI
substrio op account.invite.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/invites" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.invite.revoke

Revoke an invite; its link stops working at once.

Route
DELETE /v1/_accounts/{id}/invites/{invite_id}
Auth
Account key account
MCP tool
substrio_account_invite_revoke
CLI
substrio op account.invite.revoke

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
invite_idpathstringYes

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/invites/$INVITE_ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.key.create

Create an account key (live or test); the secret is returned once.

Route
POST /v1/_accounts/{id}/keys
Auth
Account key account
MCP tool
substrio_account_key_create
CLI
substrio op account.key.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
namebodystringYes
modebody"live" | "test"No
appsbodyarray of stringNoScope the key to these apps of the account (slugs); it then works only there, as an app customer.
requests_per_minutebodyintegerNothe key's own request limit, independent of the app's; 0 or absent: no limit of its own. Minimum 0.
request_budgetbodyintegerNothe key's own request budget, a lifetime total of requests with no period, which never refills and is never reset; 0 or absent: no budget. Minimum 0.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/keys" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"name"}'

account.key.list

List an account's keys.

Route
GET /v1/_accounts/{id}/keys
Auth
Account key account
MCP tool
substrio_account_key_list
CLI
substrio op account.key.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
limitqueryinteger (0 or more)Nothe most items per page (positive); absent returns every item.
cursorquerystringNoresume after the previous page: its next_cursor.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/keys" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.key.publish

Create a publishable account key, safe in a web page's source: it answers only a browser request from one of its origins, at its apps; the secret is returned once.

Route
POST /v1/_accounts/{id}/publishable-keys
Auth
Account key account
MCP tool
substrio_account_key_publish
CLI
substrio op account.key.publish

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
namebodystringYes
modebody"live" | "test"No
appsbodyarray of stringYesThe apps of the account (slugs) the key works at, as an app customer.
originsbodyarray of stringYesThe only web origins the key answers, exactly as a browser sends its Origin header (https://host or https://host:port, lowercase, no path; http://localhost or http://127.0.0.1 for development).
requests_per_minutebodyintegerNothe key's own request limit, independent of the app's; 0 or absent: no limit of its own. Minimum 0.
request_budgetbodyintegerNothe key's own request budget, a lifetime total of requests with no period, which never refills and is never reset; 0 or absent: no budget. Minimum 0.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/publishable-keys" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"name","apps":[],"origins":[]}'

account.key.revoke

Revoke an account key; it stops working at once.

Route
DELETE /v1/_accounts/{id}/keys/{key_id}
Auth
Account key account
MCP tool
substrio_account_key_revoke
CLI
substrio op account.key.revoke

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
key_idpathstringYes

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/keys/$KEY_ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.key.update

Set or clear an account key's own requests_per_minute and request_budget, by key id; a field left out keeps its current value.

Route
PATCH /v1/_accounts/{id}/keys/{key_id}
Auth
Account key account
MCP tool
substrio_account_key_update
CLI
substrio op account.key.update

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
key_idpathstringYes
requests_per_minutebodyintegerNosets the key's own request limit; 0 clears it; absent keeps the current value. Minimum 0.
request_budgetbodyintegerNosets the key's own request budget, a lifetime total of requests with no period, which never refills and is never reset; 0 clears it; absent keeps the current value. Minimum 0.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PATCH "$SUBSTRIO_URL/v1/_accounts/$ID/keys/$KEY_ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.list

List the accounts the caller belongs to (every account for the system key).

Route
GET /v1/_accounts
Auth
Account key account
MCP tool
substrio_account_list
CLI
substrio op account.list

Parameters

No parameters.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.member.list

List an account's members and their roles.

Route
GET /v1/_accounts/{id}/members
Auth
Account key account
MCP tool
substrio_account_member_list
CLI
substrio op account.member.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/members" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.member.remove

Remove a person from an account.

Route
DELETE /v1/_accounts/{id}/members/{user_id}
Auth
Account key account
MCP tool
substrio_account_member_remove
CLI
substrio op account.member.remove

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
user_idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/members/$USER_ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.member.set

Add a person to an account, or change their role.

Route
PUT /v1/_accounts/{id}/members/{user_id}
Auth
Account key account
MCP tool
substrio_account_member_set
CLI
substrio op account.member.set

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
user_idpathintegerYesMinimum 1.
rolebody"developer" | "admin" | "owner"No

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/members/$USER_ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.mfa.set

Require every member of an account to sign in with 2FA, or stop requiring it.

Route
PUT /v1/_accounts/{id}/mfa
Auth
Account key account
MCP tool
substrio_account_mfa_set
CLI
substrio op account.mfa.set

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
requiredbodybooleanYesEvery member signs in with 2FA; one without it enrols at sign-in.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/mfa" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"required":true}'

account.overview

Read every app of the account with slug, tenant_id, suspended, live version and calls (invocations, status classes, p95_under_ms, from memory); stored_bytes and documents are present only when open is true (the app's database was already open: never opened here to total it), then the account's totals (apps, suspended, open, calls, stored_bytes, documents) across every app.

Route
GET /v1/_accounts/{id}/overview
Auth
Account key account
MCP tool
substrio_account_overview
CLI
substrio op account.overview

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

FieldTypePresentDescription
appsarray of objectAlways
totalsobjectAlways

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/overview" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.plan.change

Move the account to a free plan at once when its usage fits (else refused with the limit and by how much). The Substrio plan's items leave the account's subscription first (prorated); the subscription ends when they were all it paid for. A paid plan is bought through account.plan.checkout.

Route
PUT /v1/_accounts/{id}/plan
Auth
Account key account
MCP tool
substrio_account_plan_change
CLI
substrio op account.plan.change

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
planbodystringYesa plan id from account.plan.summary.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/plan" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan":"plan"}'

account.plan.checkout

Make a cart of a paid Substrio plan and return its checkout_url (and cart) to hand to the person, who pays on that page (billing.checkout.start). Nothing is sent to the provider and nothing changes until the payment is confirmed; the agent never handles payment details.

Route
POST /v1/_accounts/{id}/plan/checkout
Auth
Account key account
MCP tool
substrio_account_plan_checkout
CLI
substrio op account.plan.checkout

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
planbodystringYesa plan id from account.plan.summary.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/plan/checkout" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan":"plan"}'

account.plan.summary

Read what the account's plan allows beside what it uses, and every plan with what it adds and its price. An agent explains the plans and the upgrade from this alone.

Route
GET /v1/_accounts/{id}/plan
Auth
Account key account
MCP tool
substrio_account_plan_summary
CLI
substrio op account.plan.summary

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/plan" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.storage

Read what each app of the account holds on disk (disk_bytes: its database, files, logs, backups, code and the rest, as of its last fold, open or not), the account's total (its apps and their sandboxes, the figure its space is held against) and the space in force (null while none). Supersedes account.overview's stored_bytes, which counts only open apps' document bytes.

Route
GET /v1/_accounts/{id}/storage
Auth
Account key account
MCP tool
substrio_account_storage
CLI
substrio op account.storage

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

FieldTypePresentDescription
appsarray of objectAlways
total_bytesintegerAlwayswhat the account's apps hold on disk, their sandboxes included: the figure its space is held against.
space_bytesinteger or nullAlwaysthe account's space in force; null while it has none.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/storage" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.update

Rename an account; the system key also sets its services, space and max_apps, and suspends it.

Route
PATCH /v1/_accounts/{id}
Auth
Account key account
MCP tool
substrio_account_update
CLI
substrio op account.update

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
namebodystringNo
servicesbodyintegerNoSystem key only. Minimum 0.
suspendedbodybooleanNoSystem key only.
platform_operatorbodybooleanNoSystem key only: its owners and admins who sign in to the identity app with 2FA operate the platform.
space_bytesbodyinteger or nullNoSystem key only: the bytes the account's apps may hold together, records and files; 0 is unlimited, null returns the account to the server-wide account_space_bytes (1 GiB by default). The account makes apps while they fit. Minimum 0.
max_appsbodyinteger or nullNoSystem key only: the apps the account may own, beside its space; 0 is unlimited, null returns the account to the server-wide account_max_apps (unlimited by default). Minimum 0. Maximum 4294967295.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PATCH "$SUBSTRIO_URL/v1/_accounts/$ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.usage

Read the account's plan and usage counters at each app it has a plan or usage at.

Route
GET /v1/_accounts/{id}/usage
Auth
Account key account
MCP tool
substrio_account_usage
CLI
substrio op account.usage

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/usage" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

account.usage.cpu

Read the CPU the account's apps used in each of the last 60 finished minutes, the hour's mean, the last 15 minutes' mean, the peak minute and the plan's CPU slices, each in CPU slices (1 is the Free plan's CPU under load; Standard holds 4). Explains how close the account runs to its plan's ceiling.

Route
GET /v1/_accounts/{id}/usage/cpu
Auth
Account key account
MCP tool
substrio_account_usage_cpu
CLI
substrio op account.usage.cpu

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

FieldTypePresentDescription
accountintegerAlways
minutesarray of objectAlwaysthe last 60 finished minutes, oldest first; a minute with no CPU is 0.
mean_usednumberAlwaysthe hour's mean, in CPU slices.
recent_usednumberAlwaysthe mean of its last 15 minutes, the trend against the hour.
peakobject or nullAlwaysthe busiest minute (the latest of equal ones); null in an hour with no CPU.
sharenumber or nullAlwaysthe CPU slices of the account's plan, the Free plan's 1 (the identity app's plans file, cpu_share); null when the plan sets none or no plans are set.
planstring or nullAlwaysthe account's plan id; null when no plans are set.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/usage/cpu" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent

agent.alert.list

List the account's agent alerts (a spent key used again revokes its session and leaves one), newest first.

Route
GET /v1/_accounts/{id}/agent/alerts
Auth
Account key account
MCP tool
substrio_agent_alert_list
CLI
substrio op agent.alert.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/agent/alerts" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.approval.approve

Approve one irreversible call an agent session asked for (people only, never an agent); the agent then repeats that exact call with the approval id, once.

Route
POST /v1/_accounts/{id}/agent/approvals/{approval_id}/approve
Auth
Account key account
MCP tool
substrio_agent_approval_approve
CLI
substrio op agent.approval.approve

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
approval_idpathstringYesThe approval's id, as agent.approval.list or the agent's approval-required answer gave it.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/agent/approvals/$APPROVAL_ID/approve" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.approval.deny

Deny one irreversible call an agent session asked for (people only); the agent's repeat of it is refused.

Route
POST /v1/_accounts/{id}/agent/approvals/{approval_id}/deny
Auth
Account key account
MCP tool
substrio_agent_approval_deny
CLI
substrio op agent.approval.deny

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
approval_idpathstringYesThe approval's id, as agent.approval.list or the agent's approval-required answer gave it.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/agent/approvals/$APPROVAL_ID/deny" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.approval.list

List the irreversible calls of the account's agent sessions that wait for a person's approval, oldest first, a page at a time (limit, cursor; next_cursor), or only those on one app (app) (people only).

Route
GET /v1/_accounts/{id}/agent/approvals
Auth
Account key account
MCP tool
substrio_agent_approval_list
CLI
substrio op agent.approval.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
appquerystringNoonly this app's rows: its slug, as account.app.list names it; a session whose grant names no app reaches every app.
limitqueryinteger (0 or more)Nothe most items per page (positive); absent returns every item.
cursorquerystringNoresume after the previous page: its next_cursor.
limitqueryintegerNoRows a page: 100 by default, capped at 1000. Minimum 1.
cursorquerystringNoThe next_cursor of the page before: the walk resumes past it.
appquerystringNoOnly the rows that reach this app (its slug): those naming it and those naming no app.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/agent/approvals" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.enroll.create

Make a one-time code that an AI agent exchanges for a session acting as you in the account; the code is returned once.

Route
POST /v1/_accounts/{id}/agent/enrollments
Auth
Account key account
MCP tool
substrio_agent_enroll_create
CLI
substrio op agent.enroll.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe account the agent will act in. Minimum 1.
namebodystringYesWhat you call the agent.
appsbodyarray of stringNoNarrow the session to these apps of the account (slugs); absent: every app.
capabilitiesbodyarray of stringNoNarrow the session to these capabilities (names from docs.capabilities); absent: all.
expires_in_secondsbodyintegerNoHow long the code can be exchanged (default agent_enroll_ttl_seconds). Minimum 1.
requests_per_minutebodyintegerNoA rolling limit on the session's requests per minute; absent: none. Minimum 1.
request_budgetbodyintegerNoThe most requests the session makes in its life; absent: none. Minimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/agent/enrollments" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"name"}'

agent.enroll.exchange

Exchange a one-time enrollment code (substrio_ae_...) for an agent session acting as the member who made it: a bearer one unless a kind is named or a public key is sent (key-bound). Answers the credential once and next, what to do with it; the code is spent. Over MCP it is the tool substrio_connect on any /mcp, with no credential.

Route
POST /v1/_agent/exchange
Auth
App key or user session; your security rules apply none
CLI
substrio op agent.enroll.exchange

Parameters

NameInTypeRequiredDescription
kindbody"key_bound" | "ratcheted" | "bearer"Nobearer: one static secret (substrio_ab_...), short-lived (agent_bearer_max_seconds), for an agent that can hold only one string; absent: key_bound with a public_key, else bearer. ratcheted: a key that changes on every request.
codebodystringYesThe one-time enrollment code (substrio_ae_...).
public_keybodystringNoMakes a key-bound session: the agent's public key, base64url (32 bytes Ed25519, or the 65-byte uncompressed P-256 point); absent: a bearer session, or the kind named.
algorithmbody"ed25519" | "p256"NoThe public key's algorithm (default ed25519).
durablebodybooleanNokind ratcheted only: every key rotation is made durable before the reply leaves.
key_countbodyintegerNokind ratcheted only: how many keys to start with, at most agent_ratchet_window (default 1). Minimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_agent/exchange" \
  -H "Authorization: Bearer $SUBSTRIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"code"}'

agent.session.delegate

An agent session makes a narrower child session for a sub-agent: the child's capabilities and apps are within the caller's, it ends no later than the caller, and it dies with the caller. Returns the child's credentials once.

Route
POST /v1/_accounts/{id}/agent/delegations
Auth
Account key account
MCP tool
substrio_agent_session_delegate
CLI
substrio op agent.session.delegate

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe account the calling session acts in. Minimum 1.
kindbody"key_bound" | "ratcheted" | "bearer"Nobearer: one static secret (substrio_ab_...), short-lived (agent_bearer_max_seconds), for an agent that can hold only one string; absent: key_bound with a public_key, else bearer. ratcheted: a key that changes on every request.
namebodystringYesWhat the sub-agent is called.
appsbodyarray of stringNoNarrow the child to these apps (slugs, each reachable by the caller); absent: the caller's apps.
capabilitiesbodyarray of stringNoNarrow the child to these capabilities (each held by the caller); absent: the caller's.
expires_in_secondsbodyintegerNoHow long the child lives, never past the caller's own end (default agent_max_seconds). Minimum 1.
requests_per_minutebodyintegerNoA rolling limit on the child's requests (the caller's limits apply too) per minute; absent: none. Minimum 1.
request_budgetbodyintegerNoThe most requests the session makes in its life; absent: none. Minimum 1.
public_keybodystringNoMakes a key-bound child: the sub-agent's public key, base64url; absent: a bearer child, or the kind named.
algorithmbody"ed25519" | "p256"NoThe public key's algorithm (default ed25519).
durablebodybooleanNokind ratcheted only: every key rotation is made durable before the reply leaves.
key_countbodyintegerNokind ratcheted only: how many keys to start with, at most agent_ratchet_window (default 1). Minimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/agent/delegations" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"name"}'

agent.session.list

List the account's agent sessions, oldest first, a page at a time (limit, cursor; next_cursor), or only those reaching one app (app); never a key.

Route
GET /v1/_accounts/{id}/agent/sessions
Auth
Account key account
MCP tool
substrio_agent_session_list
CLI
substrio op agent.session.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
appquerystringNoonly this app's rows: its slug, as account.app.list names it; a session whose grant names no app reaches every app.
limitqueryinteger (0 or more)Nothe most items per page (positive); absent returns every item.
cursorquerystringNoresume after the previous page: its next_cursor.
limitqueryintegerNoRows a page: 100 by default, capped at 1000. Minimum 1.
cursorquerystringNoThe next_cursor of the page before: the walk resumes past it.
appquerystringNoOnly the rows that reach this app (its slug): those naming it and those naming no app.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/agent/sessions" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.session.log

List the requests an agent session made, oldest first, each with its operation, outcome (ran, refused, approval asked, approved, denied, spent), status, app and time; pages by limit and cursor (a member sees their own agents, an admin or owner the account's). Kept for agent_log_retention_seconds.

Route
GET /v1/_accounts/{id}/agent/sessions/{session_id}/log
Auth
Account key account
MCP tool
substrio_agent_session_log
CLI
substrio op agent.session.log

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
session_idpathstringYesThe session's id, as agent.session.list returned it.
limitqueryinteger (0 or more)Nothe most items per page (positive); absent returns every item.
cursorquerystringNoresume after the previous page: its next_cursor.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/agent/sessions/$SESSION_ID/log" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.session.revoke

Revoke one agent session (and every session it made); its keys fail at once.

Route
DELETE /v1/_accounts/{id}/agent/sessions/{session_id}
Auth
Account key account
MCP tool
substrio_agent_session_revoke
CLI
substrio op agent.session.revoke

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
session_idpathstringYesThe session's id, as agent.session.list returned it.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/agent/sessions/$SESSION_ID" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.session.revoke_all

Revoke every agent session of the account; their keys fail at once.

Route
DELETE /v1/_accounts/{id}/agent/sessions
Auth
Account key account
MCP tool
substrio_agent_session_revoke_all
CLI
substrio op agent.session.revoke_all

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/agent/sessions" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

agent.signup.finish

Prove the email with the mailed code and get an agent session acting as that person in account_id, else their personal account (one is made for a person with none): the person is made when nobody holds the address. Answers {account_id, account_created, person_created, user_id, account, app_defaults, session (credentials, shown once), next_steps}; a refusal names its reason: a code that proves nothing as auth.email.code_verify (MISSING, USED, EXPIRED, TOO_MANY_ATTEMPTS, WRONG and attempts_remaining), then MFA_REQUIRED, ACCOUNT_REQUIRED (with account_ids), NOT_MEMBER, PERSON_DISABLED, ACCOUNT_SUSPENDED, ACCOUNT_LIMIT.

Route
POST /v1/_agent/signup/finish
Auth
App key or user session; your security rules apply none
CLI
substrio op agent.signup.finish

Parameters

NameInTypeRequiredDescription
emailbodystringYesThe address agent.signup.start mailed the code to.
codebodystringYesThe code from that mail.
account_idbodyintegerNoOne of the person's accounts to act in; absent: their personal account (one is made for a person with none; a person with accounts but no personal one is refused ACCOUNT_REQUIRED with account_ids). Minimum 1.
namebodystringNoWhat the person will see the agent called (default agent).
public_keybodystringNoMakes a key-bound session: the agent's public key, base64url (32 bytes Ed25519, or the 65-byte uncompressed P-256 point); absent: a ratcheted session.
algorithmbody"ed25519" | "p256"NoThe public key's algorithm (default ed25519).
durablebodybooleanNoRatcheted: every key rotation is made durable before the reply leaves.
key_countbodyintegerNoRatcheted: how many keys to start with, at most agent_ratchet_window (default 1). Minimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_agent/signup/finish" \
  -H "Authorization: Bearer $SUBSTRIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"email","code":"code"}'

agent.signup.start

Start here with no key: mail a sign-up or sign-in code to the person's email (the identity app's auth.email.code_request). Answers {accepted, expires_at} whether or not anyone holds the address; then agent.signup.finish with the code.

Route
POST /v1/_agent/signup/start
Auth
App key or user session; your security rules apply none
CLI
substrio op agent.signup.start

Parameters

NameInTypeRequiredDescription
emailbodystringYes

Response

FieldTypePresentDescription
acceptedanyAlways
expires_atintegerAlwaysUnix seconds.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_agent/signup/start" \
  -H "Authorization: Bearer $SUBSTRIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"email"}'

auth

auth.client.create

Let one of the account's apps sign people in through the identity app, sending them back only to these redirect URIs (exact match).

Route
POST /v1/_accounts/{id}/clients
Auth
Account key account
MCP tool
substrio_auth_client_create
CLI
substrio op auth.client.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugbodystringYesThe app, and its client_id.
redirect_urisbodyarray of stringYesWhere signed-in people may be sent back to, matched exactly: https, http to the loopback, or an app's own scheme.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/clients" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"slug","redirect_uris":[]}'

auth.client.delete

Stop an app signing people in through the identity app.

Route
DELETE /v1/_accounts/{id}/clients/{slug}
Auth
Account key account
MCP tool
substrio_auth_client_delete
CLI
substrio op auth.client.delete

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugpathstringYes

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/clients/$SLUG" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

auth.client.list

List the account's apps that sign people in through the identity app, with their redirect URIs.

Route
GET /v1/_accounts/{id}/clients
Auth
Account key account
MCP tool
substrio_auth_client_list
CLI
substrio op auth.client.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/clients" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

auth.client.redirect_uris.set

Replace the redirect URIs an app's sign-ins may return to.

Route
PUT /v1/_accounts/{id}/clients/{slug}
Auth
Account key account
MCP tool
substrio_auth_client_redirect_uris_set
CLI
substrio op auth.client.redirect_uris.set

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugpathstringYesThe app, and its client_id.
redirect_urisbodyarray of stringYesWhere signed-in people may be sent back to, matched exactly: https, http to the loopback, or an app's own scheme.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/clients/$SLUG" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"redirect_uris":[]}'

billing

billing.cart.create

Make a cart of plans (a featured app's a la carte, or a Substrio plan) and funds for the account's credit. The answer prices it from the plans files, offers the Substrio plan that covers its apps for less, and gives checkout_url: the page the person pays on. Nothing is charged.

Route
POST /v1/_accounts/{id}/billing/carts
Auth
Account key account
MCP tool
substrio_billing_cart_create
CLI
substrio op billing.cart.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
itemsbodyarray of objectNo
fundsbodyintegerNocredit to add, in the minor unit (cents), 500 to 1000000. Minimum 0.
space_blocksbodyintegerNothe space add-on blocks the account holds once the cart is paid (a plan with space_addon, Scale); 0 releases them. Minimum 0. Maximum 100000.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/billing/carts" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.cart.get

Read one of the account's carts, priced as the plans are now, with its state (open, paying, paid) and checkout_url.

Route
GET /v1/_accounts/{id}/billing/carts/{cart}
Auth
Account key account
MCP tool
substrio_billing_cart_get
CLI
substrio op billing.cart.get

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
cartpathstringYesthe cart's id, as billing.cart.create answered it.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/billing/carts/$CART" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.cart.update

Replace what an open cart buys (its items and funds), for example to take the Substrio plan it offers; a cart whose checkout started no longer changes.

Route
PUT /v1/_accounts/{id}/billing/carts/{cart}
Auth
Account key account
MCP tool
substrio_billing_cart_update
CLI
substrio op billing.cart.update

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
cartpathstringYes
itemsbodyarray of objectNo
fundsbodyintegerNoMinimum 0.
space_blocksbodyintegerNoMinimum 0. Maximum 100000.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/billing/carts/$CART" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.catalog

What the account can buy: the Substrio plans (each with the featured apps it bundles), every featured app's own plans a la carte with prices, the plan the account is on at each, and whether checkout is ready.

Route
GET /v1/_accounts/{id}/billing/catalog
Auth
Account key account
MCP tool
substrio_billing_catalog
CLI
substrio op billing.catalog

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/billing/catalog" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.checkout.confirm

After the person paid on the page: reads the provider's word for the cart's payment and applies the cart once (its plans put on, its funds added to credit); the webhook applies it too, whichever comes first. Answers the cart, state paid.

Route
POST /v1/_accounts/{id}/billing/carts/{cart}/confirm
Auth
Account key account
MCP tool
substrio_billing_checkout_confirm
CLI
substrio op billing.checkout.confirm

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
cartpathstringYesthe cart's id, as billing.cart.create answered it.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/billing/carts/$CART/confirm" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.checkout.start

Start paying a cart (the person's own session only, never an agent's or a key): the provider's payment is made for its plans and funds and the answer gives the client_secret and publishable_key the checkout page's Payment Element pays with. A change the saved card pays at once is applied and answers paid true.

Route
POST /v1/_accounts/{id}/billing/carts/{cart}/checkout
Auth
Account key account
MCP tool
substrio_billing_checkout_start
CLI
substrio op billing.checkout.start

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
cartpathstringYesthe cart's id, as billing.cart.create answered it.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/billing/carts/$CART/checkout" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.credit.get

Read the account's credit: the funds it added, in the minor unit, and how many payments made it.

Route
GET /v1/_accounts/{id}/billing/credit
Auth
Account key account
MCP tool
substrio_billing_credit_get
CLI
substrio op billing.credit.get

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/billing/credit" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.person_cart.create

Make a cart of plans that are the person's own, paid by the account: they hold them at every app wherever they sign in, apart from the account's (subscriptions.mine lists them). The plans, the offer and checkout_url as billing.cart.create gives them; the subject is the person whose own session starts the checkout. No space_blocks: the add-on is the account's.

Route
POST /v1/_accounts/{id}/billing/person-carts
Auth
Account key account
MCP tool
substrio_billing_person_cart_create
CLI
substrio op billing.person_cart.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesthe account that pays. Minimum 1.
itemsbodyarray of objectNo
fundsbodyintegerNocredit to add to the account, in the minor unit (cents), 500 to 1000000. Minimum 0.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/billing/person-carts" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

billing.subscription.cancel

End the account's subscription, at the end of the period paid for (the default) or now. When it ends, the Substrio plan and every featured app it paid for go back to their free plans, still enabled.

Route
POST /v1/_accounts/{id}/billing/subscription/cancel
Auth
Account key account
MCP tool
substrio_billing_subscription_cancel
CLI
substrio op billing.subscription.cancel

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
at_period_endbodybooleanNotrue (the default): the subscription runs to the end of the period paid for; false: it ends now.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/billing/subscription/cancel" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

dashboard

dashboard.get

Read the dashboard an app declares, the file its live version shipped (nav items and their panels, canonical), for the console to draw. The app is one of the account's own or a featured app the account has enabled; any other answers TENANT_NOT_FOUND. An app that declares none answers an empty nav. With version (a number or id), that version's dashboard instead, checked against its own routes as a push's is: what the console will draw once it goes live (an app of the account's own).

Route
GET /v1/_accounts/{id}/apps/{slug}/dashboard
Auth
Account key account
MCP tool
substrio_dashboard_get
CLI
substrio op dashboard.get

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
slugpathstringYes
versionquerystringNothe dashboard of this version instead of the live one, by number or id (64 hex digits), checked against that version's own routes as version.check checks a push's; an app of the caller's own account only.

Response

FieldTypePresentDescription
navarray of objectAlwaysthe console's nav items in order, each {id, title, icon, panels, role?, params?}; empty when the app declares no dashboard.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/apps/$SLUG/dashboard" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

featured.disable

Disable a featured app for the account: its plan there is removed, every account key scoped to that app alone is revoked (a key scoped to several apps loses this one), so each stops at its next request. The answer counts the keys revoked. The use already counted stays.

Route
DELETE /v1/_accounts/{id}/featured/{jet}
Auth
Account key account
MCP tool
substrio_featured_disable
CLI
substrio op featured.disable

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
jetpathstringYesthe featured app's slug (featured.list names it app).

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X DELETE "$SUBSTRIO_URL/v1/_accounts/$ID/featured/$JET" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

featured.enable

Enable a featured app for the account: the account is put on the app's default plan there (an account already enabled keeps its plan) and may then make keys scoped to it (featured.key.create). Every call to the app is metered against that plan.

Route
PUT /v1/_accounts/{id}/featured/{jet}
Auth
Account key account
MCP tool
substrio_featured_enable
CLI
substrio op featured.enable

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
jetpathstringYesthe featured app's slug (featured.list names it app).

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X PUT "$SUBSTRIO_URL/v1/_accounts/$ID/featured/$JET" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

featured.key.create

Make an account key scoped to one featured app the account has enabled; the secret is returned once. An unscoped account key may make one (it is narrower than the key that makes it); a scoped key may not.

Route
POST /v1/_accounts/{id}/featured/{jet}/keys
Auth
Account key account
MCP tool
substrio_featured_key_create
CLI
substrio op featured.key.create

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.
jetpathstringYesthe featured app the key is scoped to; the account must have it enabled.
namebodystringYes
modebody"live" | "test"No
requests_per_minutebodyintegerNothe key's own request limit; 0 or absent: no limit of its own. Minimum 0.
request_budgetbodyintegerNothe key's own lifetime request budget; 0 or absent: none. Minimum 0.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_accounts/$ID/featured/$JET/keys" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"name"}'

featured.list

List the featured apps (the jets: MapJet, SendJet, AuthJet and every later one) with what each does, its admin in the console, whether the account has it enabled, the plan it is metered against and its use this day and month against that plan's limits.

Route
GET /v1/_accounts/{id}/featured
Auth
Account key account
MCP tool
substrio_featured_list
CLI
substrio op featured.list

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

A JSON object.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/featured" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

region

region.choices

List the regions an app can be created in: those that are available and serving, each with its slug, public name and country. Empty until a region serves. Pass a slug as region to account.app.create to place the app there.

Route
GET /v1/_accounts/{id}/regions
Auth
Account key account
MCP tool
substrio_region_choices
CLI
substrio op region.choices

Parameters

NameInTypeRequiredDescription
idpathintegerYesMinimum 1.

Response

FieldTypePresentDescription
regionsarray of objectAlways

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_accounts/$ID/regions" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

subscriptions

subscriptions.cancel

End one of the signed-in person's own subscriptions now: a paid one leaves the account's provider subscription that pays it (that line, or the whole subscription when it was the last) and the person falls back to what else they hold there (a bundle's plan, else the app's default). A bundle child ends only with its Substrio plan (SUBSCRIPTION_NOT_FOUND). The person's own session only, never a key or an agent (SUBSCRIPTION_PERSON_REQUIRED). Answers the subscription, ended.

Route
POST /v1/_subscriptions/{id}/cancel
Auth
Account key account
MCP tool
substrio_subscriptions_cancel
CLI
substrio op subscriptions.cancel

Parameters

NameInTypeRequiredDescription
idpathstringYesThe subscription's id, from subscriptions.mine.

Response

FieldTypePresentDescription
idintegerWhen set0: the plan the app granted.
subjectobjectWhen set
appstringWhen setthe seller: the app whose plans file the plan is in.
planstringWhen set
source"grant" | "purchase" | "bundle"When set
status"active" | "canceling" | "ended"When set
parentintegerWhen seta bundle: the Substrio plan's subscription it came with.
sinceintegerWhen set
period_endinteger or nullWhen set
ended_atintegerWhen set

Errors

A failed call answers the error envelope with a typed code.

Example

curl -X POST "$SUBSTRIO_URL/v1/_subscriptions/$ID/cancel" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"

subscriptions.mine

List the signed-in person's own subscriptions at every app, active and ended: what they bought for themselves (a cart for the person), each Substrio plan's bundle children, and the plans apps granted them. A person's session only (at the console or at any app); a key is refused SUBSCRIPTION_PERSON_REQUIRED.

Route
GET /v1/_subscriptions/mine
Auth
Account key account
MCP tool
substrio_subscriptions_mine
CLI
substrio op subscriptions.mine

Parameters

No parameters.

Response

FieldTypePresentDescription
subscriptionsarray of objectAlways
entitlementsarray of objectWhen setsubscriptions.mine: the plan in force at each app where one is active (the highest of the stack per counter and period).
cursorstring or nullWhen setthe next page's cursor; null at the end.

Errors

A failed call answers the error envelope with a typed code.

Example

curl "$SUBSTRIO_URL/v1/_subscriptions/mine" \
  -H "Authorization: Bearer $SUBSTRIO_ACCOUNT_KEY"