Skip to content

Invite a member

POST/v1/workspaces/{workspace_uid}/invitations

Emails 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_uidstringRequired

The workspace's uid. When the route also takes X-Workspace-Slug, both must name the same workspace.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Request body

emailstring (email)Required

Email address to invite. It is trimmed and lower-cased before use.

max length 254

rolestringRequired

Role the invitee gets when they accept.

One ofadmindeveloperviewer

Response

201

The invitation was created and the email queued.

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, lower-cased.

rolestringRequired

Role the invitee gets when they accept.

One ofadmindeveloperviewer

statusstringRequired

Invitation status.

One ofpendingacceptedrevokedexpired

created_atstring (date-time)Required

When the invitation was created.

expires_atstring (date-time)Required

When the invitation link stops working.

invited_byobject

Who sent the invitation.

Show attributes
uidstringRequired

The user's ID.

usernamestringRequired

The user's username.

Errors

StatusMeaning
400Validation failed: email and role are required, a valid email address is required, or role must be admin, developer, or viewer.
401The API key is missing, invalid, expired or revoked.
403Your role cannot manage members, or you are an admin inviting someone as admin (admins cannot assign the admin role).
409Conflict: 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.
429Rate limit exceeded. Wait the number of seconds in the Retry-After header before retrying.

Errors use the standard error format.