Skip to content

Accept an invitation

POST/v1/workspace-invitations/{token}/accept

Accepts an invitation addressed to you and adds you to the workspace with the invited role. The inviter is emailed that you joined. No request body is needed.

Needs a verified account whose email matches the invited address. No X-Workspace-Slug header is needed. Use the returned slug in X-Workspace-Slug for requests in the workspace you joined. Responses are sent with Cache-Control: no-store.

Authentication

Send your API key as Authorization: Bearer <token>.

Path parameters

tokenstringRequired

The secret token from the invitation email link (/invitations/<token>).

Response

200

You joined the workspace. Returns it with your new role and permissions. member_count is always 0 in this response.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
uidstringRequired

Unique identifier of the workspace.

namestringRequired

Display name.

slugstringRequired

Slug to send in X-Workspace-Slug.

descriptionstringRequired

Free-text description. Empty when not set.

is_defaultbooleanRequired

Whether this is the owner's default workspace.

rolestring

Your role in the workspace. Omitted when not known in this context.

One ofowneradmindeveloperviewer

permissionsarray of strings

The permissions your role grants. Omitted when not known in this context.

One ofworkspace.readworkspace.manageresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.transferworkspace.delete

member_countintegerRequired

Number of active members. Only filled in on your profile. Other responses return 0.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403Your email is not verified (action: verify_email), or the invitation was sent to a different address (this invitation was sent to a different email address).
404The token does not match any invitation (invitation not found).
409invitation is no longer pending, invitation has expired, or you are already a member of this workspace.
429Rate limit exceeded. Wait the number of seconds in the Retry-After header before retrying.

Errors use the standard error format.