Skip to main content
POST
/
user-management
/
v1
/
deactivate-user
Deactivate a workspace user
curl --request POST \
  --url https://api.langdock.com/user-management/v1/deactivate-user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "user@example.com"
}
'
{
  "status": "success",
  "message": "User deactivated"
}
⚠️ Using our API via a dedicated deployment? Just replace api.langdock.com with your deployment’s base URL: <deployment-url>/api/public
This endpoint removes a user from your workspace. Their data — including conversations, assistants, files, and integrations — is preserved and fully restored if they are re-added later.

Prerequisites

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

Behavior

  • User not found or not an active member? Returns 404.
  • Deactivated users lose workspace access immediately.
  • All user data is retained and accessible again upon reactivation.
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
email
string<email>
required

Email address of the user

Example:

"user@example.com"

Response

User deactivated 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:

"User deactivated"