Deactivate a user
patch/api/v1/users/{id}/deactivateDeactivates a user from the organization by providing their unique identifier. Optionally, the user's open pipeline records can be transferred to another user.
Code snippet
curl -X 'PATCH' \
'https://{yourdomain}/api/v1/users/{id}/deactivate' \
-H 'accept: text/plain; x-api-version=1.0' \
-H 'x-api-key: {your API key}' \
-H 'Content-Type: application/json; x-api-version=1.0' \
-d '{
"transferRecordsTo": {
"userId": 101,
"teamId": 12
}
}'
Path parameters
| idintegerRequired | Unique identifier of the user to be deactivated. |
Request body
transferRecordsToobject | Specifies the user to whom the records of the deactivated user should be transferred. If omitted, the user's records are not transferred.
|
Example response
200 Success
{
"message": "User deactivated successfully.",
"data": {
"id": 101
}
}