Organizations, workspaces, and access API
These routes require a signed-in user's access token, not a workspace API key. What the user can do depends on their role. To manage access without writing requests, sign in to the Console. See members and roles and API keys for the workflows.
See authentication for request headers and response formats, and errors and recovery for failed requests.
Roles
Organizations have the roles owner, admin and member. Workspaces have the roles admin, editor and viewer. Organization owners and admins have admin access to every workspace in the organization.
| Action | Required role |
|---|---|
| Create workspaces, rename the organization | Organization owner or admin |
| Promote or demote organization owners and admins | Organization owner; the organization keeps at least one owner (last_owner) |
| Remove ordinary organization members | Organization owner or admin |
| Invite an ordinary member; list, read, revoke or resend a member invitation | Organization owner or admin |
| Invite an admin; revoke or resend an admin invitation | Organization owner |
| Rename a workspace; manage its members and API keys | Workspace admin, including inherited organization owner and admin access |
| Leave an organization | The member, unless they are its last owner |
List entries that have a version carry an etag field. A single object returns its entity tag in the ETag response header. Send that value in If-Match when you change or delete the object.
Account
POST /v1/account/bootstrap
Set up the account once, after the user has signed in and verified their email address. Requires Idempotency-Key.
| Field | Type | Presence | Guidance |
|---|---|---|---|
skip_invitation | boolean | Optional | Set up a new organization even though an invitation is waiting for this address. Without it, a waiting invitation makes the request fail with invitation_unavailable: accept the invitation instead. |
200: provisioned (true), organization_id and workspace_id (UUIDs, or null).
GET /v1/me
Read the signed-in user's identity and setup state.
| Field | Type | Meaning |
|---|---|---|
user_id | string | UUID. |
email | string | The verified email address. |
status | active, disabled, unprovisioned | Account state. |
provisioned | boolean | Whether the account is set up. |
invitation_pending | boolean | Whether an invitation is waiting for this address. |
compatibility.cli | object | api_major, minimum_cli_version, latest_stable_cli_version (or null) and notices (each with id, severity of upgrade or deprecation, message, and optional effective_date and documentation_url). |
Organizations
GET /v1/organizations
List the organizations you belong to. Query: limit (1 to 100, default 50), cursor.
200: data and next_cursor. Each organization has:
| Field | Type | Meaning |
|---|---|---|
id | string | UUID. |
version | string | Positive decimal version. |
created_at, updated_at | string | ISO 8601 date-times. |
name | string | 1 to 120 characters. |
status | active, suspended | Organization state. |
created_by | string | UUID of the user who created it. |
bootstrap_user_id | string or null | UUID of the user whose account setup created it. |
role | owner, admin, member | Your role. |
etag | string | Send in If-Match to change it. |
GET /v1/organizations/{organization_id}
Read one organization. 200: the organization fields above, with its ETag header.
PATCH /v1/organizations/{organization_id}
Rename the organization. Requires If-Match. Body: name (required, 1 to 120 characters). 200: the updated organization.
Organization members
GET /v1/organizations/{organization_id}/members
List members. Query: limit, cursor. Each entry has user_id, display_name (or null), email (or null), role, version, created_at and etag.
PATCH /v1/organizations/{organization_id}/members/{user_id}
Change a member's organization role. Requires If-Match. Body: role (required): owner, admin or member. 200: the updated membership. Demoting the last owner returns 409 last_owner.
DELETE /v1/organizations/{organization_id}/members/{user_id}
Remove a member, or leave the organization with your own user ID. Requires If-Match. 204 with no body.
Workspaces
A workspace has a kind: org_wide is the organization's workspace that every member joins (its default drive is the team drive), and team is a workspace for chosen members.
GET /v1/organizations/{organization_id}/workspaces
List the workspaces you can see. Query: limit, cursor. Each entry has:
| Field | Type | Meaning |
|---|---|---|
id | string | UUID. |
version | string | Positive decimal version. |
created_at, updated_at | string | ISO 8601 date-times. |
organization_id | string | UUID. |
name | string | 1 to 120 characters. |
role | admin, editor, viewer | Your effective role. |
kind | org_wide, team | See above. |
etag | string | Send in If-Match to change it. |
POST /v1/organizations/{organization_id}/workspaces
Create a workspace. Requires Idempotency-Key. Body: name (required, 1 to 120 characters). 201: the new workspace. An organization can have a limited number of team workspaces (the policy.workspace_limit reported by workspace storage); past it, the request returns 409 workspace_limit_reached.
GET /v1/workspaces/{workspace_id}
Read a workspace and your effective role. 200: the workspace fields above, with its ETag header.
PATCH /v1/workspaces/{workspace_id}
Rename a workspace. Requires If-Match. Body: name (required, 1 to 120 characters). 200: the updated workspace.
Workspace members
GET /v1/workspaces/{workspace_id}/members
List members assigned directly to this workspace. Query: limit, cursor. Each entry has user_id, display_name, email, role (admin, editor or viewer), version, created_at and etag.
GET /v1/workspaces/{workspace_id}/inherited-members
List the organization owners and admins who have admin access to this workspace through their organization role. Query: limit, cursor. Same entry fields as above.
POST /v1/workspaces/{workspace_id}/members
Add an existing organization member. Requires Idempotency-Key.
| Field | Type | Presence | Guidance |
|---|---|---|---|
user_id | string | Required | UUID of an organization member. |
role | admin, editor, viewer | Required | Workspace role. |
201: the new membership.
PATCH /v1/workspaces/{workspace_id}/members/{user_id}
Change a member's workspace role. Requires If-Match. Body: role (required): admin, editor or viewer. 200: the updated membership.
DELETE /v1/workspaces/{workspace_id}/members/{user_id}
Remove a member's direct access to the workspace. Requires If-Match. 204 with no body.
Invitations
An invitation expires 7 days after it is sent or resent. Past the invitation limits, the API returns 429 invitation_rate_limit.
status changes to expired only when the organization next invites the same address, so a pending invitation can already be past its expires_at. Check expires_at to tell whether it can still be accepted.
Invitation objects have id, version, created_at, updated_at, organization_id, email, organization_role (admin or member), invited_by, status (pending, accepted, revoked or expired), expires_at, accepted_by (or null), accepted_at (or null), delivery_generation (from 1), delivery_status (queued) and etag.
GET /v1/organizations/{organization_id}/invitations
List invitations. Query: limit, cursor. Requires organization owner or admin.
POST /v1/organizations/{organization_id}/invitations
Invite someone by email. Requires Idempotency-Key.
| Field | Type | Presence | Guidance |
|---|---|---|---|
email | string | Required | At most 254 characters. |
organization_role | admin, member | Optional | Default member. Only owners can invite admins. |
workspaces | array | Optional | At most 100 entries, each with workspace_id and role (admin, editor or viewer), applied when the invitation is accepted. More returns 400 invalid_grants; a workspace listed twice returns 400 duplicate_workspace. |
202: the invitation. An address can have only one unexpired pending invitation per organization; inviting it again returns 409 already_exists, so resend the existing invitation instead.
GET /v1/organizations/{organization_id}/invitations/{invitation_id}
Read one invitation. Requires organization owner or admin.
DELETE /v1/organizations/{organization_id}/invitations/{invitation_id}
Revoke an unaccepted invitation. Requires If-Match. 204 with no body. An accepted invitation returns 409 already_accepted.
POST /v1/organizations/{organization_id}/invitations/{invitation_id}/resend
Send a new invitation email. Its link replaces the earlier one. Requires Idempotency-Key; send {}. 202: the invitation.
- Wait 60 seconds after the invitation was created or last resent; an earlier request returns 429
resend_cooldown. - An accepted or revoked invitation returns 409
invitation_unavailable. - Resends count toward the hourly invitation limits.
POST /v1/invitations/preview
Preview an invitation as its recipient, signed in with the invited address and verified. Body: token (required), the 43-character token from the invitation link. No Idempotency-Key is needed.
200: organization_id, organization_name, organization_role and workspaces (each with workspace_id and role); or organization_id and accepted: true when you have already accepted it. An unknown token, a token for another address, or an invitation that cannot be used returns 404 invitation_unavailable. An expired invitation returns 410 invitation_expired.
POST /v1/invitations/accept
Accept an invitation with the token from its link. Requires Idempotency-Key. Body: token (required). 200: organization_id and accepted: true.
GET /v1/invitations/pending
List invitations waiting for your verified address. 200: data, each with id, organization_id, organization_name, organization_role and workspaces.
POST /v1/invitations/pending/{invitation_id}/accept
Accept a waiting invitation by its ID, without its link. Requires Idempotency-Key; send {}. 200: organization_id and accepted: true.
API keys
A workspace API key has a permission: search allows reading drives, folders and files, and read_write also allows adding, changing and deleting them. The full key is shown only once, when it is created.
GET /v1/workspaces/{workspace_id}/api-keys
List keys without their secrets. Query: limit, cursor. Each entry has id, organization_id, workspace_id, name, display_prefix, permission, created_by, expires_at (or null), revoked_at (or null) and created_at.
POST /v1/workspaces/{workspace_id}/api-keys
Create a key. Requires Idempotency-Key.
| Field | Type | Presence | Guidance |
|---|---|---|---|
name | string | Required | 1 to 120 characters. |
permission | search, read_write | Required | See above. |
expires_at | string | Optional | A future ISO 8601 date-time; otherwise 400 invalid_expiry. Omit for a key that does not expire. |
201: the key's fields, plus secret (the full key, returned on the first successful creation only) and secret_available. A retry with the same idempotency key does not return the secret again; if you lose it, revoke the key and create another.
DELETE /v1/workspaces/{workspace_id}/api-keys/{key_id}
Revoke a key at once. Repeating the request is safe. 204 with no body.