User Management

Invite users to workspace

Changed on

Sends workspace invitations to one or more users by email. Each user can optionally be assigned a specific role. If no role is specified, the default role member is used.

Users who are already members of the workspace are silently skipped. Users with pending join requests are automatically approved. Invalid email addresses are reported in the response but do not cause the entire request to fail.

An invitation email is sent to each successfully invited user. If the workspace does not have SAML enabled, the email includes a magic link for passwordless sign-in. If SAML and Allow External Authentication are enabled, users outside the workspace's verified domains receive a magic link. SAML remains enforced for users from verified domains.

post/user-management/v1/invite

Request

  • Base URL
    https://api.langdock.com
  • URL
    https://api.langdock.com/user-management/v1/invite
  • Auth
    HTTP bearer

Request body

Example request

{
  "users": [
    {
      "email": "jane.doe@example.com",
      "role": "member"
    }
  ]
}

Response

Invitations processed successfully

status'success' required

Always "success" when the request is processed

messagestring required

Human-readable summary of the result

successfulInvitesstring[] required

Email addresses that were successfully invited

invalidEmailsstring[] required

Email addresses that failed deeper validation (e.g., unreachable domain)

Example response

{
  "status": "success",
  "message": "Invitations processed",
  "successfulInvites": [
    "alice@example.com",
    "bob@example.com"
  ],
  "invalidEmails": []
}

Changes