Skip to main content

Update User Status

Updates the status of a specific user by their ID.

Request

PUT /v2/users/users/{id}/status

Parameters

NameTypeInDescription
idstringpathRequired. The ID of the user to update

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication
Content-TypeRequired. Must be application/json
User-AgentOptional. Client application identifier

Request Body

FieldTypeDescription
statusintegerRequired. User status (0 = Active, 1 = Inactive)

User Status Values

ValueDescription
0Active - User is active
1Inactive - User is inactive

Example

curl --request PUT \
--url '{{baseUrl}}/v2/users/users/680c02896d91ca0145cfeb81/status' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"status": 0
}'

Response

A successful response returns no content:

Status Code: 204 No Content

Response Body: No content

Status Codes

Status CodeDescription
204Success - User status updated successfully
400Bad Request - Invalid request parameters or body
401Unauthorized - Invalid or missing authentication token
404Not Found - User ID does not exist
500Internal Server Error