/v1/workspaces/{workspace_uid}/invitationsEmails an invitation to join the workspace. The email contains a link with a secret token. The token is never returned by the API. The invitee opens the link, signs in or signs up with the invited email address, and accepts. See Accept an invitation.
Invitations expire after 72 hours. Use Resend an invitation to send a fresh link.
Requires the owner or admin role. Admins cannot invite someone as admin.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
workspace_uidstringRequiredThe workspace's uid. When the route also takes X-Workspace-Slug, both must name the same workspace.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Request body
emailstring (email)RequiredEmail address to invite. It is trimmed and lower-cased before use.
max length 254
rolestringRequiredRole the invitee gets when they accept.
One ofadmindeveloperviewer
Response
The invitation was created and the email queued.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
uidstringRequiredUnique identifier of the invitation.
emailstringRequiredThe invited email address, lower-cased.
rolestringRequiredRole the invitee gets when they accept.
One ofadmindeveloperviewer
statusstringRequiredInvitation status.
One ofpendingacceptedrevokedexpired
created_atstring (date-time)RequiredWhen the invitation was created.
expires_atstring (date-time)RequiredWhen the invitation link stops working.
invited_byobjectWho sent the invitation.
Show attributesHide attributes
uidstringRequiredThe user's ID.
usernamestringRequiredThe user's username.
Errors
| Status | Meaning |
|---|---|
400 | Validation failed: email and role are required, a valid email address is required, or role must be admin, developer, or viewer. |
401 | The API key is missing, invalid, expired or revoked. |
403 | Your role cannot manage members, or you are an admin inviting someone as admin (admins cannot assign the admin role). |
409 | Conflict: you are already a member of this workspace (you invited yourself), user is already a member of this workspace, or a pending invitation already exists for this email. |
429 | Rate limit exceeded. Wait the number of seconds in the Retry-After header before retrying. |
Errors use the standard error format.