Skip to content

Preview an invitation

GET/v1/workspace-invitations/{token}

Returns an invitation addressed to you, with the workspace it is for, so you can review it before accepting it. Use the token from the invitation email.

Needs a verified account whose email matches the invited address. No X-Workspace-Slug header is needed, since you may not belong to any workspace yet. If the invitation has expired, it is marked expired and 409 is returned. 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

The invitation.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
uidstringRequired

Unique identifier of the invitation.

emailstringRequired

The invited email address.

rolestringRequired

Role you get when you accept.

One ofadmindeveloperviewer

statusstringRequired

Always pending. Other states return 409.

One ofpending

expires_atstring (date-time)Required

When the invitation expires.

workspaceobjectRequired

The workspace you are invited to. role and permissions are omitted and member_count is 0.

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.

invited_byobject

Who sent the invitation. Omitted when unknown.

Show attributes
uidstringRequired

The user's ID.

usernamestringRequired

The user's username.

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 (already accepted, revoked or expired) or invitation has expired.
429Rate limit exceeded. Wait the number of seconds in the Retry-After header before retrying.

Errors use the standard error format.