Type to search endpoints, fields, error codes and guides.
Workspaces
Create workspace
Make a new workspace; the token's creator becomes its owner. With parent_id it is a sub-workspace, and what it buys is charged to the main workspace's card.
POSThttps://api.scaledmail.com/v2/workspaces
Rate limit
Write: 60 calls per minute per token, and at most 10 new workspaces an hour per user
The token needs Can create workspaces turned on in Settings › API tokens.
Sub-workspaces are one level deep. One person can own up to 200 workspaces.
Headers
Authorizationstringrequired
Bearer <your API token>. Tokens start with sm_live_.
Body
namestringrequired1 to 40 characters
1 to 40 characters: letters, numbers, spaces and . , - _ & ' ( ), the same rule as in the app. Spaces at the start and end are cut. Must differ from the names of the other workspaces you own (case is ignored).
parent_idstringoptionalat most 64 characters
Make a sub-workspace of this main workspace (its id). Leave out to make a new main workspace. The token must cover the main, and its creator must be an owner or admin there.
Response (200)
idstringrequired
The workspace id (org_...).
namestringrequired
The workspace name.
parent_idstringoptional
The main workspace of a sub-workspace (org_...). Only on a sub-workspace.
Responses
201Created. The workspace was made.
400Invalid input.name is empty, too long or has other characters, or parent_id is empty or too long. param names the field.
403Not allowed. The token does not have "Can create workspaces" (cannot_create_workspaces), the token's creator is only a member of the main (parent_not_allowed), or the token lacks workspaces:write (missing_scope).
404Parent not found.parent_id is not a workspace your token covers.
409Name taken. You already own a workspace with this name.
409Limit reached. The owner already has 200 workspaces.
409Sub-workspace limit. The main workspace already has 10 sub-workspaces (archived ones count).
422Bad parent.parent_id is itself a sub-workspace. Sub-workspaces are one level deep.
422Main billed outside Stripe. The main in parent_id is billed outside Stripe (direct billing), so it can't have sub-workspaces. Its existing sub-workspaces stay.
429Too many. More than 60 write calls a minute with this token, or more than 10 new workspaces an hour by the token's creator.
Like every call, it can also answer 401 (bad key). See Errors.