Deactivating a User

Deactivating a User

To simply deactivate a user without reassigning groups/reports or deleting reports, use the DELETE method with no JSON body

If reassigning groups/reports or deleting all reports is required when deactivating a user, use the PUT method with the deactivate endpoint and supply the corresponding JSON body with the request

The following fields are used in this request, and must be passed in your request:

FieldTypeValueRequired
reassign_groups_to_userstringUsername or UserID to which all groups/campaigns will be reassignedNo
reassign_reports_to_userstringUsername or UserID to which all scheduled reports will be reassignedNo
delete_scheduled_reportsbooleanDelete all scheduled reports for the user being deactivatedNo

The following sample request can be used to deactivate a User with the PUT method specifying options

{
  "reassign_groups_to_user": "test3",
	"reassign_reports_to_user":"test3",
	"delete_scheduled_reports": false
}

If the request is handled successfully, the following response will be returned:

{
    "user_id": "00f12ba7-b26a-4503-9ab4-0ec04914f71f",
    "username": "test2",
    "name": "test2",
    "email": "[email protected]",
    "phone": "",
    "call_detail_level": "full",
    "restrict_recording_download": false,
    "status": "deactivated",
    "last_login_date": "2022-05-02T14:38:49.5177442",
    "last_updated_date": "2023-02-16T13:17:51.2176839-05:00",
    "deactivation_date": "2023-02-16T13:17:51.2176839-05:00",
    "roles": [
        "call_record_listen",
        "browse_inventory",
        "reporting",
        "administrator",
        "view_stop_call_data",
        "ordering"
    ],
    "access": {
        "billing_groups": [
            "4455"
        ]
    }
}

Activating a Deactivated User

Using the PUT method with the deactivate endpoint will allow you to deactivate an existing User

{
    "user_id": "00f12ba7-b26a-4503-9ab4-0ec04914f71f",
    "username": "test2",
    "name": "test2",
    "email": "[email protected]",
    "phone": "",
    "call_detail_level": "full",
    "restrict_recording_download": false,
    "status": "activated",
    "last_login_date": "2022-05-02T14:38:49.5177442",
    "last_updated_date": "2023-02-16T13:19:04.146593-05:00",
    "roles": [
        "call_record_listen",
        "browse_inventory",
        "reporting",
        "administrator",
        "view_stop_call_data",
        "ordering"
    ],
    "access": {
        "billing_groups": [
            "4455"
        ]
    }
}