Skip to main content

Organizations and workspaces

Workspace = event, in practice — the name in the code is workspace, but everything that applies to "event" in the rest of this documentation (participant, PDV, cashier) refers to a workspace created here.

Organizations

EndpointWhat it does
GET /v1/management/organizationsLists organizations where the authenticated manager has an active role.
POST /v1/management/organizationsCreates an organization; the creator becomes owner. slug is optional — if omitted, the API generates one from the name.
PATCH /v1/management/organizations/{organizationId}Only owner can change the name. Slug and the manager's role are read-only.
DELETE /v1/management/organizations/{organizationId}Only owner. Closes the organization and archives every workspace in it.

Available regions

EndpointWhat it does
GET /v1/management/regionsLists region codes that have at least one active cluster — this is the list that feeds the region selector when creating a workspace.

Workspaces (events)

EndpointWhat it does
GET /v1/management/organizations/{organizationId}/workspacesLists the organization's workspaces.
POST /v1/management/organizations/{organizationId}/workspacesCreates and provisions a workspace in a region. owner/admin only.
PATCH /v1/management/organizations/{organizationId}/workspaces/{workspaceId}Updates name, timezone, startsAt/endsAt. Region and currency are immutable after creation.
POST .../workspaces/{workspaceId}/provisioning/retryRetries regional provisioning when it failed (status=failed).
DELETE .../workspaces/{workspaceId}Archives the workspace (terminal — there's no "reactivate").

Example: create a workspace

curl -X POST http://127.0.0.1:8787/v1/management/organizations/{organizationId}/workspaces \
-H "Authorization: Bearer <manager accessToken>" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Festival",
"homeRegion": "br-east-1",
"timezone": "America/Sao_Paulo",
"currencyCode": "BRL"
}'

Provisioning is synchronous from the client's point of view

POST .../workspaces calls the chosen region's wallet-api synchronously, within the same request — the client already gets status: "active" or status: "failed" in the response, with no need to poll. If it fails (region momentarily unavailable, for example), the global record and the slug already exist; use the retry endpoint, don't create it again.

eventCode — the event's short code

Every workspace response includes eventCode, in the format AXY-9898 (3 letters excluding I/O, 4 digits excluding 0/1 — avoids visual ambiguity). This is the code the participant types or scans via QR to find the event and activate their own wallet in it — see Find an event and activate a wallet. It's generated automatically when the workspace is created; there's no way to choose or edit it.