Skip to main content

Invite Member

Invite a new member to the organization.

Outline

Endpoint

POST /api/v1/organizations/{org_id}/members/invite

Headers

HeaderRequiredDescription
AuthorizationYesBearer <access_token>
Content-TypeYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
org_idintegerYesUnique identifier of the organization. You can obtain organization IDs from the List Organizations endpoint.

Request Body

{
"email": "newuser@example.com",
"workspace_id": 1,
"role_id": 2,
"message": "Welcome to the team!"
}

Parameters

FieldTypeRequiredDescription
emailstringYesEmail address of the user to invite. Must be a valid email format. The user will receive the invitation email at this address.
workspace_idintegerYesID of the workspace within the organization where the user will be granted access. The workspace must exist in the organization. Use List Workspaces to find workspace IDs.
role_idintegerYesID of the role to assign to the user upon acceptance. The role determines the user's permissions within the organization. Use List Roles to find available role IDs.
messagestringNoOptional personal message to include in the invitation email. This message appears in the invitation email sent to the user.

Response

Success (201)

{
"success": true,
"data": {
"invitation": {
"id": 1,
"token": "invitation_token",
"email": "newuser@example.com",
"expires_at": "2024-01-08T00:00:00Z"
},
"message": "Invitation sent successfully"
},
"message": "Invitation sent successfully"
}

Features

  • Validate organization membership and permissions
  • Validate email not already a member
  • Validate invitation not already sent
  • Validate organization can invite based on plan
  • Select target workspace and role
  • Allow personal welcome message
  • Send invitation email immediately
  • Invitation expires after 7 days (configurable)
  • Create audit log entry