Workspaces

Create workspace + auto-enrol caller as owner

Changed on

Wraps the bunkai_bootstrap_workspace SECURITY DEFINER RPC so the workspace row and the owner-membership row are inserted in a single transaction.

post/api/v1/workspaces

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/v1/workspaces
  • Auth: one of:
    • API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
    • HTTP bearer

Request body

namestring required
slugstring required

URL slug. Must match ^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$: lowercase letters and digits plus hyphens, 3 to 40 characters, and no leading or trailing hyphen. Uppercase, underscores, spaces and other characters are rejected with 422 validation_failed. A further 422 rejects 16 reserved slugs that would shadow app routes: admin, api, app, auth, docs, invites, login, logout, onboarding, projects, public, qa, settings, static, workspaces, _next. A slug already taken by another workspace returns 409 conflict.

Example request

{
  "name": "Acme QA",
  "slug": "acme-qa"
}

Response

Workspace created.

Changes

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status