Busabase
OpenAPI Reference

Spaces

Create a space for the key's owner. Cloud only. Needs a `manage`-level key that is not bound to a space, and counts against the same space quota as the web app.

POST
/api/v1/spaces

Creates a new space owned by the API key's owner, with the same quota as creating one in the web app (a Free account owns one space; a paid plan raises or removes the limit). Requires an API key that is manage-level and not bound to a space: a write key — the default from busabase-cli login — is refused with 403 and told how to get a manage key, and so is a key bound to one space. Browser sessions are not accepted. A reached quota is 403 with data.code USAGE_LIMIT_EXCEEDED. Every creation is recorded with the user, the key, the IP address, and the user agent. Then send the returned id as x-busabase-space to work in the new space with the same key.

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication. Get your API key from the dashboard.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/spaces" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "name": "string",  "slug": "string",  "createdAt": "string",  "url": "string"}