Workspaces API
These endpoints work at the level of your user, not of one workspace. They answer only to an account key (ps_account_, created in Profile → API).
Only account keys. A workspace key, a number key or an OAuth/MCP token gets 403
ACCOUNT_KEY_REQUIRED. OAuth/MCP tokens are refused on purpose: these endpoints mint keys, and a key minted through a connector would keep working after the connector is revoked. x-workspace-id is ignored here: the workspace, when there is one, is in the path.Cache-Control: no-store. Errors are { "error": "English | Português", "code": "…" }.
List your workspaces
GET https://pilotstatus.com.br/v1/workspaces
Response (200)
- Only workspaces where your membership is active. Archived workspaces are left out.
roleis your role in that workspace:OWNER,ADMIN,AGENTorANALYST.planis the workspace’s current plan (FREE,PAY_AS_YOU_GO,ON_DEMAND, …).sharedCardsays whether the workspace is linked to a shared card:linkedand, when linked, thesourceWorkspaceIdwhose card backs it (nullwhen not linked). See Shared card per workspace.- Use the
idinx-workspace-idto act inside that workspace with the same account key.
Create a workspace
POST https://pilotstatus.com.br/v1/workspaces with { "name": "…" } and, optionally, "shareCard": true. You become the workspace’s Owner, and the response carries its primary key, shown this one time only.
string
required
1 to 60 characters, after trimming spaces.
true links the new workspace to your reserve card (the shared card), so it backs this customer’s renewals. false or absent: the workspace is not shared. Must be a JSON boolean: "true", 1 or null get 400 INVALID_SHARE_CARD.name and shareCard are the only fields accepted. Any other field gets 400 UNKNOWN_FIELDS.
apiKey.keycomes only in this response. Store it before doing anything else. Later reads show onlyprefixandlast4.apiKeycan benull. The workspace is saved first and the key is minted next. If minting fails, the answer is still201, so that a retry does not create a second workspace. Rotate the primary key withPOST /v1/api-keys/regenerate(account key plusx-workspace-id, Owner role), or create a named key withPOST /v1/workspaces/{id}/api-keys.- Creating is not idempotent. Two
POSTs create two workspaces. After a timeout, checkGET /v1/workspacesbefore trying again. sharedCardtells you how the workspace was born:{ "linked": false, "sourceWorkspaceId": null }withoutshareCard: true.- With
shareCard: true, the card is checked before anything is created. No reserve card configured for you (409SHARED_CARD_NOT_CONFIGURED), the source workspace archived (409SOURCE_ARCHIVED) or you no longer an active Owner of it (409NO_SHARED_OWNER): no workspace is created, so retrying withoutshareCardis safe.
How the new workspace is born
Reseller workspaces start with nothing charged: no plan fee, no numbers and no balance. The first charge is the first number that connects, or the first line you buy. The shared card is a backup: it pays a charge only when the workspace’s wallet does not cover it and the workspace has no card of its own. See Billing for resellers.
The reseller mark and the reseller prices are set by the Pilot Status team, not through the API. The team also configures which of your workspaces holds your reserve card — that is what allows you to share it. Which customer workspaces use it is your decision, per workspace:
shareCard on creation, or PUT/DELETE …/shared-card afterwards. Talk to us to set them up. They apply to workspaces created from then on; workspaces you already had keep their plan.How many workspaces you can own
Each user can own up to 10 workspaces by default, counting every workspace where you are the active Owner, your first one included. Over the limit, the answer is 409WORKSPACE_LIMIT_REACHED, with the limit in limit:
Response (409)
Shared card per workspace
Your reserve card is the card saved on one of your workspaces — the source workspace, chosen by the Pilot Status team for your user. A customer workspace linked to it falls back to that card when its own wallet does not cover a platform charge and it has no card of its own (its own card always comes first; the fallback is one hop: the source’s own shared card is not followed). You decide which customer workspaces are linked:- On creation:
"shareCard": trueonPOST /v1/workspaces. Absent orfalse, the workspace is not linked. - Afterwards:
PUTlinks,DELETEunlinks — below. Unlink a customer who stopped paying and your card no longer pays that customer’s renewals: a failed renewal then suspends only them.
{workspaceId} — not an active member, a workspace that does not exist or is archived get 403 WORKSPACE_MEMBERSHIP_REQUIRED, and a role below Owner gets 403 PERMISSION_DENIED. They take no body (an empty body or {}); any field gets 400 UNKNOWN_FIELDS.
Link the shared card
PUT https://pilotstatus.com.br/v1/workspaces/{workspaceId}/shared-card
Response (200)
- Idempotent. Already linked to the same source:
200with"changed": false, and nothing is recorded. - The link is recorded in the workspace’s History as Backup card linked. No e-mail is sent.
- 409
SHARED_CARD_NOT_CONFIGURED— the Pilot Status team has not configured a reserve card for you. - 400
SELF_SOURCE—{workspaceId}is the source workspace itself. - 409
SOURCE_ARCHIVED— the source workspace is archived. - 409
NO_SHARED_OWNER— you are no longer an active Owner of the source workspace.
Unlink the shared card
DELETE https://pilotstatus.com.br/v1/workspaces/{workspaceId}/shared-card
Response (200)
- Idempotent. Not linked:
200with"changed": false, and nothing is recorded. - The unlink is recorded in the workspace’s History as Backup card unlinked. No e-mail is sent.
- From then on, the workspace’s charges use only its own wallet and card. If they do not cover a renewal, that workspace is suspended — your card is not charged.
- 409
NO_SHARED_OWNER— the workspace is linked to a source workspace you are not an active Owner of. Ask the Pilot Status team.
Workspace keys
These three endpoints manage the workspace keys of one workspace, with your current role in it. Not being an active member, or a workspace that does not exist or is archived, all get the same 403WORKSPACE_MEMBERSHIP_REQUIRED.
List the keys
GET https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys — Owner or Admin.
Response (200)
/v1/api-keys.
Create a named key
POST https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys with { "name": "…" } — Owner or Admin.
string
required
1 to 60 characters, after trimming spaces. Use it to tell which integration holds the key.
Response (201)
key is shown this one time only. The key is recorded as created by you, so it is revoked if you are removed from the workspace. A workspace holds up to 50 live workspace keys — revoked keys do not count; over that, 409 WORKSPACE_KEY_LIMIT_REACHED with limit.
Revoke a named key
DELETE https://pilotstatus.com.br/v1/workspaces/{workspaceId}/api-keys/{keyId} — Owner or Admin. Answers { "id": "…", "revokedAt": "…" }. The key stops working on the next request. Revoking a key that is already revoked also answers 200, with its original revokedAt, so a retry is safe.
- The primary key cannot be revoked (409
PRIMARY_KEY_NOT_REVOCABLE): the in-app AI agent uses it. Rotate it instead withPOST /v1/api-keys/regenerate, sending your account key andx-workspace-id(Owner role). Only the primary changes; named keys keep working. - An id that is not a workspace key of this workspace gets 404
API_KEY_NOT_FOUND. Number keys are managed on/v1/api-keys.
Errors
On
POST /v1/workspaces the checks run in this order: UNKNOWN_FIELDS, INVALID_SHARE_CARD, NAME_REQUIRED / NAME_TOO_LONG, WORKSPACE_LIMIT_REACHED, and only then, with shareCard: true, the reserve card checks (SHARED_CARD_NOT_CONFIGURED, SOURCE_ARCHIVED, NO_SHARED_OWNER).