Skip to content
OpenSmartRoute
Documentation
Hosted platformREST API reference

Workspaces

Organization workspaces: members, roles, invitations, teams (rosters, leads, tenant bindings), organization SSO (browser sessions only) and the SCIM provisioning token.

Hosted platformAPI version 2.1.0

patch/api/v1/workspace

Patch Workspace

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyWorkspacePatch

FieldTypeDefaultDescription
namestring | null
slugstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/workspace" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "default", "slug": "eu-health" }'
Bodyjson
{
  "name": "default",
  "slug": "eu-health"
}

delete/api/v1/workspace

Leave Workspace

Leave the current organization (owners must hand over first).

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/workspace/audit

Workspace Audit

Account-lifecycle events of this workspace (sign-ins, invitations, roles, removals). Admins only.

Requires an API key

Parameters

NameInTypeDefaultDescription
limitqueryinteger100
beforequerynumber | null
actionquerystring | null
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspace/audit?limit=100" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspace/convert

Convert Workspace

Turn the personal workspace into an organization so teammates can be invited. The plan, the subscription, the API keys, the tenants and the usage history stay exactly where they are; the user receives a fresh free personal workspace. Browser sessions stay on the converted workspace.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyWorkspaceConvertIn

FieldTypeDefaultDescription
name(required)string
slugstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/convert" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "default" }'
Bodyjson
{
  "name": "default"
}

post/api/v1/workspace/delete

Delete Workspace

Delete the current organization - an owner's own exit, not a support ticket. Its keys, tenants, policy, members, invitations, SSO connection, usage and outcomes go at once; a live subscription is cancelled immediately so nothing more is billed (the paid remainder is not refunded here). Owner only, from a browser session; type the organization's name (or slug) to confirm, plus the password when one is set. Personal workspaces go with their user (POST /api/v1/me/delete). Every member's session moves to their personal workspace.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyDeleteWorkspaceIn

FieldTypeDefaultDescription
confirmstring""
passwordstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/delete" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "password": "string" }'
Bodyjson
{
  "password": "string"
}

post/api/v1/workspace/invites

Invite

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyInviteIn

FieldTypeDefaultDescription
email(required)string
rolestring"member"

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/invites" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "ada@example.com" }'
Bodyjson
{
  "email": "ada@example.com"
}

delete/api/v1/workspace/invites/{invite_id}

Revoke Invite

Requires an API key

Parameters

NameInTypeDefaultDescription
invite_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace/invites/<invite_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspace/invites/{invite_id}/resend

Resend Invite

Send a pending invitation again with a fresh link and a full validity period; the previous link stops working. The new link is returned once, as on creation.

Requires an API key

Parameters

NameInTypeDefaultDescription
invite_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/invites/<invite_id>/resend" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/workspace/members

Members

The roster: every member with their workspace role and teams; pending invitations for admins.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspace/members" \
  -H "Authorization: Bearer $OSR_API_KEY"

patch/api/v1/workspace/members/{user_id}

Set Role

Requires an API key

Parameters

NameInTypeDefaultDescription
user_id(required)pathstring
x-goog-api-keyheaderstring | null

Request bodyRoleIn

FieldTypeDefaultDescription
role(required)string

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/workspace/members/<user_id>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "role": "user" }'
Bodyjson
{
  "role": "user"
}

delete/api/v1/workspace/members/{user_id}

Remove Member

Requires an API key

Parameters

NameInTypeDefaultDescription
user_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace/members/<user_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/workspace/scim

Scim Status

Whether provisioning is on, the live token's age and use, how many people it provisioned, the base URL.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspace/scim" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspace/scim/token

Scim Token

Mint the provisioning token (owner role; shown once; replaces an earlier one). Paste it, with the base URL, into the identity provider's SCIM connector.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/scim/token" \
  -H "Authorization: Bearer $OSR_API_KEY"

delete/api/v1/workspace/scim/token

Scim Revoke

Revoke the provisioning token; the identity provider's calls fail with 401 from now on.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace/scim/token" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/workspace/sso

Sso Get

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspace/sso" \
  -H "Authorization: Bearer $OSR_API_KEY"

put/api/v1/workspace/sso

Sso Put

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodySsoConnectionIn

FieldTypeDefaultDescription
client_id(required)string
client_secretstring | null
default_rolestring"member"
domainsstring[]
issuerstring | null
kindstring"oidc"
labelstring"Company SSO"
role_mapobject
scopesstring[]

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PUT "$OSR_URL/api/v1/workspace/sso" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "client_id": "string" }'
Bodyjson
{
  "client_id": "string"
}

delete/api/v1/workspace/sso

Sso Delete

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace/sso" \
  -H "Authorization: Bearer $OSR_API_KEY"

get/api/v1/workspace/teams

List Teams

Every team of the workspace with its size, its leads, the keys pinned to its tenant and, when bound to a tenant, that tenant's usage this month and today. mine names the caller's own teams.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspace/teams" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspace/teams

Create Team

Create a team (admin role). slug defaults to the name; tenant binds it to one of the workspace's tenants; members seeds the roster with workspace members (role member or lead).

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyTeamIn

FieldTypeDefaultDescription
descriptionstring""
membersTeamMemberIn[]
name(required)string
slugstring | null
tenantstring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/teams" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "default" }'
Bodyjson
{
  "name": "default"
}

get/api/v1/workspace/teams/{slug}

Team Detail

The team with its roster (each person's profile, team role and workspace role) and its keys (prefixes).

Requires an API key

Parameters

NameInTypeDefaultDescription
slug(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspace/teams/<slug>" \
  -H "Authorization: Bearer $OSR_API_KEY"

patch/api/v1/workspace/teams/{slug}

Patch Team

Rename, describe or re-bind a team (admin role). tenant: "" unbinds it.

Requires an API key

Parameters

NameInTypeDefaultDescription
slug(required)pathstring
x-goog-api-keyheaderstring | null

Request bodyTeamPatch

FieldTypeDefaultDescription
descriptionstring | null
namestring | null
tenantstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X PATCH "$OSR_URL/api/v1/workspace/teams/<slug>" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "description": "string", "name": "default", "tenant": "string" }'
Bodyjson
{
  "description": "string",
  "name": "default",
  "tenant": "string"
}

delete/api/v1/workspace/teams/{slug}

Delete Team

Delete a team (admin role). Its members stay in the workspace; its keys keep working under the tenant but are no longer the team's.

Requires an API key

Parameters

NameInTypeDefaultDescription
slug(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace/teams/<slug>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspace/teams/{slug}/members

Add Team Member

Put a workspace member on the team (admin role, or a lead of the team). Only admins make leads.

Requires an API key

Parameters

NameInTypeDefaultDescription
slug(required)pathstring
x-goog-api-keyheaderstring | null

Request bodyTeamMemberIn

FieldTypeDefaultDescription
rolestring"member"
user_id(required)string

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/teams/<slug>/members" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "user_id": "string" }'
Bodyjson
{
  "user_id": "string"
}

delete/api/v1/workspace/teams/{slug}/members/{user_id}

Remove Team Member

Take a person off the team (admin role, or a lead of the team; a lead cannot remove another lead).

Requires an API key

Parameters

NameInTypeDefaultDescription
slug(required)pathstring
user_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X DELETE "$OSR_URL/api/v1/workspace/teams/<slug>/members/<user_id>" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspace/transfer

Transfer Ownership

Hand the organization to another member in one step: they become an owner, the caller keeps the role named by keep_role (default admin; leave removes the caller). Owner only, audited as workspace.transferred; both people are e-mailed.

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyTransferIn

FieldTypeDefaultDescription
keep_rolestring"admin"
user_id(required)string

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspace/transfer" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "user_id": "string" }'
Bodyjson
{
  "user_id": "string"
}

get/api/v1/workspaces

Workspaces

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s "$OSR_URL/api/v1/workspaces" \
  -H "Authorization: Bearer $OSR_API_KEY"

post/api/v1/workspaces

Create Workspace

Requires an API key

Parameters

NameInTypeDefaultDescription
x-goog-api-keyheaderstring | null

Request bodyWorkspaceIn

FieldTypeDefaultDescription
name(required)string
slugstring | null

Responses

201Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspaces" \
  -H "Authorization: Bearer $OSR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "default" }'
Bodyjson
{
  "name": "default"
}

post/api/v1/workspaces/{account_id}/switch

Switch Workspace

Requires an API key

Parameters

NameInTypeDefaultDescription
account_id(required)pathstring
x-goog-api-keyheaderstring | null

Responses

200Successful Response
422Validation ErrorHTTPValidationError
401Missing, invalid or revoked API key
Requestbash
curl -s -X POST "$OSR_URL/api/v1/workspaces/<account_id>/switch" \
  -H "Authorization: Bearer $OSR_API_KEY"

Something wrong or out of date on this page? Tell us - the page is named for you, so a one-line note is enough.