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
-
Deactivate a User by username - DELETE https://edgeapi.marchex.io/marketingedge/v5/api/users/<username>/deactivate
-
Deactivate a User by user_id - DELETE https://edgeapi.marchex.io/marketingedge/v5/api/users/<user_id>/deactivate
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
-
Deactivate a User by username - PUT https://edgeapi.marchex.io/marketingedge/v5/api/users/<username>/deactivate
-
Deactivate a User by user_id - PUT https://edgeapi.marchex.io/marketingedge/v5/api/users/<user_id>/deactivate
The following fields are used in this request, and must be passed in your request:
Field | Type | Value | Required |
---|---|---|---|
reassign_groups_to_user | string | Username or UserID to which all groups/campaigns will be reassigned | No |
reassign_reports_to_user | string | Username or UserID to which all scheduled reports will be reassigned | No |
delete_scheduled_reports | boolean | Delete all scheduled reports for the user being deactivated | No |
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
-
Activate a User by username - PUT https://edgeapi.marchex.io/marketingedge/v5/api/users/<username>/activate
-
Activate a User by user_id - PUT https://edgeapi.marchex.io/marketingedge/v5/api/users/<user_id>/activete
{
"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"
]
}
}
Updated almost 2 years ago