Open docs
Reference

Organizations, workspaces, and access API

Manage organizations, workspaces, members, invitations, and API keys while signed in.

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.

ActionRequired role
Create workspaces, rename the organizationOrganization owner or admin
Promote or demote organization owners and adminsOrganization owner; the organization keeps at least one owner (last_owner)
Remove ordinary organization membersOrganization owner or admin
Invite an ordinary member; list, read, revoke or resend a member invitationOrganization owner or admin
Invite an admin; revoke or resend an admin invitationOrganization owner
Rename a workspace; manage its members and API keysWorkspace admin, including inherited organization owner and admin access
Leave an organizationThe 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.

FieldTypePresenceGuidance
skip_invitationbooleanOptionalSet 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.

FieldTypeMeaning
user_idstringUUID.
emailstringThe verified email address.
statusactive, disabled, unprovisionedAccount state.
provisionedbooleanWhether the account is set up.
invitation_pendingbooleanWhether an invitation is waiting for this address.
compatibility.cliobjectapi_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:

FieldTypeMeaning
idstringUUID.
versionstringPositive decimal version.
created_at, updated_atstringISO 8601 date-times.
namestring1 to 120 characters.
statusactive, suspendedOrganization state.
created_bystringUUID of the user who created it.
bootstrap_user_idstring or nullUUID of the user whose account setup created it.
roleowner, admin, memberYour role.
etagstringSend 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:

FieldTypeMeaning
idstringUUID.
versionstringPositive decimal version.
created_at, updated_atstringISO 8601 date-times.
organization_idstringUUID.
namestring1 to 120 characters.
roleadmin, editor, viewerYour effective role.
kindorg_wide, teamSee above.
etagstringSend 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.

FieldTypePresenceGuidance
user_idstringRequiredUUID of an organization member.
roleadmin, editor, viewerRequiredWorkspace 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.

FieldTypePresenceGuidance
emailstringRequiredAt most 254 characters.
organization_roleadmin, memberOptionalDefault member. Only owners can invite admins.
workspacesarrayOptionalAt 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.

FieldTypePresenceGuidance
namestringRequired1 to 120 characters.
permissionsearch, read_writeRequiredSee above.
expires_atstringOptionalA 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.

Copyright © 2026