staqlydocs
REST APIAPI referenceSetup

Create a cloud workspace

Create a cloud workspace (with billing it has no plan until a subscription starts; without billing the server-side trial)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/workspaces

Without cloud accounts (AUTH_DEV_SIGNIN) only; with Google sign-in new people start at GET /v1/auth/google/start (409 here) and account owners add workspaces with POST /v1/account/workspaces. Cloud mode only; each call" creates a new isolated workspace. Rate-limited to 5 per hour per client IP (429). Requires setup_token when the server sets SETUP_TOKEN. Creates the workspace, an admin API key (scope admin, the credential that signs in to the dashboard; see POST /v1/sessions/api-key), a single-use recovery key and a browser session cookie. Secrets are returned only in this response.

Request Body

application/json
  1. body
name?string

Workspace name (defaults to "My Workspace")

Lengthlength <= 100
setup_token?string

Required when the server sets SETUP_TOKEN

Response Body

Created

application/json
  1. response
workspace*
api_key*
recovery_key*string
csrf_token*string
curl -X POST 'https://staqly.example.com/v1/workspaces' \  -H 'Content-Type: application/json' \  -d '{}'
{  "workspace": {    "id": "string",    "name": "string",    "plan": "plus",    "recovery_rotated_at": "string",    "created_at": "string",    "timezone": "Europe/Warsaw"  },  "api_key": {    "id": "string",    "name": "string",    "prefix": "string",    "scopes": [      "collections:read"    ],    "created_at": "string",    "last_used_at": "string",    "expires_at": "string",    "revoked_at": "string",    "key": "string"  },  "recovery_key": "string",  "csrf_token": "string"}