Skip to main content
cURL
Cost: Free. Switching is for MCP connections (OAuth grants), through the switch_workspace tool. Send the workspace_id of another of the user’s workspaces, from List workspaces. It changes the workspace for the calls that follow, not the call it runs in. Those calls act for the new workspace and spend its API credits. The answer is Get current user for the new workspace.
An API key is bound to the workspace it was created in. With a key, this always answers 403 workspace_locked.
A workspace the connection doesn’t cover answers 404 not_found. It needs no scope, and it works for a connection with no current workspace: that is how an agent gets past 403 workspace_required.

Authorizations

Authorization
string
header
required

An API key: Authorization: Bearer alura_sk_....

Body

application/json
workspace_id
string
required

The workspace to act for from the next call on: an id from list_workspaces (GET /v1/me/workspaces).

Pattern: ^[1-9][0-9]{0,18}$

Response

OK

object
string
required
Allowed value: "me"
user
object
required

The user the key or grant belongs to.

workspace
object
required

The workspace requests act for: the key's, or an MCP connection's current one.

plan
enum<string>
required

The workspace's Alura plan.

Available options:
free,
basic,
growth,
professional
scopes
enum<string>[]
required

The scopes the key or grant carries.

Available options:
research:read,
saved:read,
saved:write,
usage:read,
workspace:read,
orders:read,
customers:read,
listings:write,
webhooks:write,
events:read,
shop:write,
orders:write,
ads:read,
messages:read,
messages:write,
knowledge:read,
knowledge:suggest,
knowledge:write,
ads:write,
reviews:write,
promotions:read,
insights:read