Reactivate User
Reactivate a previously deactivated user.
POST
https:///api.deadsimplechat.com/consumer/api/v2/user/reactivate
Request
POST /consumer/api/v2/user/reactivate
info
The auth
query parameter is your private key. You can find it in your Dashboard under Developer -> Private Key.
Query Parameters
Parameter | Description | Data Type |
---|---|---|
auth | Go to Dashboard -> Developer -> Private Key is your auth | String |
Body Parameters
Parameter | Description | Data Type |
---|---|---|
userId | The unique ID of the user | String |
uniqueUserIdentifier | The unique identifier for the user | String |
Note: Either
userId
oruniqueUserIdentifier
must be provided. They are mutually exclusive.
Responses
Success Response
A JSON object indicating the successful reactivation of the user.
Field | Description | Data Type |
---|---|---|
success | Status of the operation | Boolean |
message | Description of the outcome | String |
HTTP Status: 200 OK
Body:
{
"success": true,
"message": "user reactivated"
}
Error Responses
Validation error:
HTTP Status:
400 Bad Request
Body:
{
"error": "validation error details"
}User not found:
HTTP Status:
400 Bad Request
Body:
{
"message": "user not found"
}Internal server error:
HTTP Status:
500 Internal Server Error
Body:
{
"message": "Internal server error occurred, please try again. If the problem persists then contact support and mention the eventId",
"eventId": "event identifier"
}
Code Examples
JavaScript (Fetch API)
// For userId
fetch("https://api.deadsimplechat.com/consumer/api/v2/user/reactivate?auth=<YOUR_SECRET_KEY>", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: '<USER_ID>'
})
})
// For uniqueUserIdentifier
fetch("https://api.deadsimplechat.com/consumer/api/v2/user/reactivate?auth=<YOUR_SECRET_KEY>", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
uniqueUserIdentifier: '<UNIQUE_USER_IDENTIFIER>'
})
})