Skip to main content

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

ParameterDescriptionData Type
authGo to Dashboard -> Developer -> Private Key is your authString

Body Parameters

ParameterDescriptionData Type
userIdThe unique ID of the userString
uniqueUserIdentifierThe unique identifier for the userString

Note: Either userId or uniqueUserIdentifier must be provided. They are mutually exclusive.

Responses

Success Response

A JSON object indicating the successful reactivation of the user.

FieldDescriptionData Type
successStatus of the operationBoolean
messageDescription of the outcomeString

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>'
})
})