Skip to main content
POST
/
users
/
blocked
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/blocked' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
    "id": "1234567890"
}'
{
    "id": "1234567890",
    "name": "John Doe",
    "language": "en",
    "occupation": "Salesman",
    "location": "London",
    "timezone": "Europe/London",
    "email": "[email protected]",
    "isBanned": true,
    "role": {
        "alias": "learner"
    },
    "fromApi": false,
    "image": null
}
Deactivate a user account, preventing them from logging in. Deactivated users are not counted towards your license.

Request Headers

X-API-KEY
string
required
API Key. Go to your Konstantly site > Settings > API and copy the value from there.

Request Body

id
string
required
User API ID to deactivate

Response

Returns the user object with isBanned: true.
id
string
required
User ID
name
string
required
Full name
language
string
required
Interface language
email
string
required
Email address
isBanned
boolean
required
Will be true after deactivation
role
string
required
User role
fromApi
boolean
required
API management status

Error Responses

404
object
Returned when user is not found
422
object
Returned when user cannot be banned (e.g., assigned as expert on courses)
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/users/blocked' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
    "id": "1234567890"
}'
{
    "id": "1234567890",
    "name": "John Doe",
    "language": "en",
    "occupation": "Salesman",
    "location": "London",
    "timezone": "Europe/London",
    "email": "[email protected]",
    "isBanned": true,
    "role": {
        "alias": "learner"
    },
    "fromApi": false,
    "image": null
}