User - Deactivate
This API will not be initially available. Instead, there are two ways to deactivate a user:
- Ask an Incentify team member to perform this task for you
- Login to Incentify yourself (provided you have permission), select to the proper Account, navigate to Account Settings, click "Users and Permission Groups", find/click the specific User and finally, click the "Archive" button. :::
Purpose
Users who are deactivated will no longer have access to the Account they have been deactivated on and will automatically be logged out of any active sessions. The user's audit trail/activity is still preserved. If the User has access to multiple Accounts then the User can continue to log in until all Account Memberships have been deactivated.
Any attempt to associate any resource with the User going forward would result in an error until they are re-activated. These Users are also hidden in the Incentify platform except for historical context.
While a User with access to multiple Accounts only requires a single call to /user/activate to completely remove a user from the Incentify platform you must call /user/deactivate for each Account the User has access to.
You can also re-activate a deactivated User by calling the activate endpoint again. :::
Request
Endpoint
POST /user/deactivate
Authentication
Include your API Key within the x-api-key header as described here.
Request Body Parameters
The internal_user_id in the request is expected to match an existing user in the Incentify system, which belongs to the Account matching the one supplied with internal_account_id.
The following table lists the parameters supported in the JSON POST payload.
*are required- Marked with NO asterisk are optional parameters. If you do not include them in an update request then the current value will be preserved. :::
| Parameter | Type | Definition |
|---|---|---|
| internal_user_id * | string | The unique ID of the User from your internal system. |
| internal_account_id * | string | The unique ID of the Account from your internal system. |
Request Body Example
{
"internal_user_id": "p23223",
"internal_account_id": "XXXXX3"
}
Successful Response
If successful, this method returns an http code of 202 and response body with the following structure:
Response Body
{
"code":202,
"success":true,
"data": {
User Resource here (See "User - Overview" page)
},
"errors": []
}
Error Response
If the request has invalid fields/values, this method returns an http code of 400 and response body with the following structure:
Error Response Body
{
"code":400,
"success":false,
"data": {},
"errors": [
"text describing error here"
]
}
Properties
The following table defines the properties that appear in this resource:
| Key | Type | Definition |
|---|---|---|
| code | integer | HTTP Status Code (ie; 200, 403, etc). |
| success | boolean | Either true (success) or false (fail). |
| data | object | User deactivated is returned. The data structure of the User is a User Resource. |
| errors | object | If the request fails, this will contain information about the error. |