Skip to main content
POST
/
user-management
/
v1
/
invite
curl --request POST \
  --url https://api.langdock.com/user-management/v1/invite \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "users": [
    {
      "email": "jane.doe@example.com"
    }
  ]
}
'
{
  "status": "success",
  "message": "Invitations processed",
  "successfulInvites": [
    "alice@example.com",
    "bob@example.com"
  ],
  "invalidEmails": []
}
⚠️ Using our API via a dedicated deployment? Just replace api.langdock.com with your deployment’s base URL: <deployment-url>/api/public
This endpoint lets you programmatically invite one or more users to your workspace. It’s useful for automating onboarding flows, partner integrations, or bulk provisioning.

Prerequisites

  • API Key with the USER_MANAGEMENT_API scope
  • The API key must be created by a workspace admin

Behavior

  • Already a member? Silently skipped.
  • Has a pending join request? Automatically approved.
  • Invalid email domain? Reported in invalidEmails but doesn’t fail the request.
  • If SAML is not enabled for the workspace, the invitation email includes a magic link for passwordless sign-in.
A 200 response can still contain invalidEmails — these are emails that passed format validation but failed deeper checks (e.g., unreachable domain). Always check both successfulInvites and invalidEmails in the response.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Body

application/json
users
object[]
required

List of users to invite. At least one user is required.

Minimum array length: 1

Response

Invitations processed successfully

status
enum<string>
required

Always "success" when the request is processed

Available options:
success
Example:

"success"

message
string
required

Human-readable summary of the result

Example:

"Invitations processed"

successfulInvites
string<email>[]
required

Email addresses that were successfully invited

Example:
["alice@example.com", "bob@example.com"]
invalidEmails
string[]
required

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

Example:
[]