BoldSales

API Documentation

Deactivate a user

patch/api/v1/users/{id}/deactivate

Deactivates 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

idintegerRequiredUnique 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.

userIdintegerUnique identifier of the user to whom the records should be transferred.
teamIdintegerUnique identifier of the team to which the transfer-record user belongs.

Example response

200 Success

{
  "message": "User deactivated successfully.",
  "data": {
    "id": 101
  }
}