---
title: "Invite users to workspace"
method: POST
path: "/user-management/v1/invite"
tags: ["User Management"]
---

# Invite users to workspace

`POST /user-management/v1/invite`

## Request

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

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.

## Request body

- InviteUsersRequest
  - `users` object[], required: List of users to invite. At least one user is required.
    - `email` string, email, required: Email address of the user to invite
    - `role` 'member' | 'editor' | 'admin': Role to assign. If omitted, defaults to `member`.

## Response `200`

Invitations processed successfully

- InviteUsersResponse
  - `status` 'success', required: Always "success" when the request is processed
  - `message` string, required: Human-readable summary of the result
  - `successfulInvites` string[], required: Email addresses that were successfully invited
  - `invalidEmails` string[], required: Email addresses that failed deeper validation (e.g., unreachable domain)

## Other responses

- `400`: Invalid request body
- `401`: Unauthorized - API key is missing, invalid, or the key creator was not found
- `500`: Internal server error

## Changes

- **2026-11-03** `c62bf90b4013`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langdock/apis/langdock-api/changes/user-management/v1/invite/post.md)

---

[API](https://skmtc.dev/langdock/apis/langdock-api.md) - [All operations](https://skmtc.dev/langdock/apis/langdock-api/llms.txt) - [OpenAPI document](https://skmtc.dev/langdock/apis/langdock-api/revisions/c62bf90b4013?raw)
