Instance admin

Provision a customer workspace in one step

Changed on

Instance admins only (session, or a personal so_ token — workspace Agent sot_ tokens are refused; a workspace owner/admin gets 403). Creates the workspace (or adopts the one on slug), applies branding, policy defaults and feature flags, creates starter folders, invites the admins with the normal invite email, and stores connectors through the normal encrypted connector path. Idempotent by slug: a re-run fills in what is missing and reports the rest unchanged — no second workspace, folder, membership or connector, no resent live invite, no overwritten credential. A failing step is reported in steps and the run continues (HTTP 207). Credential values are never returned or audited. Every step writes a workspace.provision.* audit row.

post/v1/admin/workspaces/provision

Request

  • Base URL
    https://shareout.site
  • URL
    https://shareout.site/v1/admin/workspaces/provision
  • Auth
    HTTP bearer

Request body

namestring required
slugstring required

Also the subdomain. 2–63 lowercase letters, digits, hyphens; reserved names (www, api, admin, …) refused.

locale'en' | 'es'
descriptionstring
owner_emailstring

Owner of a new workspace. Defaults to the first of admins; ignored when the workspace exists.

adminsstring[] required
if_exists'match' | 'update' | 'fail'

match adopts an existing slug only when its name matches; update adopts it and renames; fail refuses.

subdomainboolean
foldersstring[]
connectorsobject[]

Same body as POST /v1/workspaces/{workspaceId}/connections. An existing connector with the name is left untouched.

resend_invitesboolean
templatesstring

Template set to install. pending until the instance has templates.

custom_domainstring

Hostname to attach. pending until the instance has custom domains.

Response

Existing workspace, nothing failed

okboolean
createdboolean
next_stepsstring[]
duration_msinteger

Changes