TABLE OF CONTENTS



 

API Setup

Choose your Host Region to have the documentation adapt to your use case.


Host Region
LabelValue
EUeu
USus
AUau






Business Use Case

You can use this API to deactivate Users in CustomerGauge. This is especially useful when you're using our Single Sign On, and you'd like to synchronise deactivating users in both your Identity Provider as well as CustomerGauge.






Authentication

OAuth2 Authentication is used to connect to this API. Once you've created your Connected App, you can acquire a Bearer Access Token by calling our OAuth2/Token API:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id={{ Client ID }}&client_secret={{ Client Secret }}"
https://auth.{{ apiRegion }}.customergauge.com/oauth2/token

The acquired Bearer Access Token is used in the Authorization header in your API request.


Note: The Access Token is only valid for up to 1 hour. Save the Access Token temporarily when calling the API multiple times in a row, or obtain a fresh Access Token before calling the API.






Endpoint

Endpoint URL

https://api.{{ apiRegion }}.customergauge.com/v5/user-manager/users/disable







Request


Body

To deactivate a user, you should pass the user's email address in JSON in the Body of the Request.

{
"email": "john.doe@example.com"
}






Response

HTTP Status CodeDescription
204OK - everything worked as expected.

Example Response Body
An empty Response Body will be returned when successful.
401
The Access Token obtained has expired, or is invalid.

Example Response Body
{
"message": "Unauthenticated."
}


404
The user could not be found.

Example Response Body
{
"message": "No query results for model [Library\\Eloquent\\Master\\User]."
}


422An issue occurred - this usually means one of the required fields is missing.

Example Response Body
{
"message": "The given data was invalid.",
"errors": {
"configuration": [
"The configuration field is required."
]
}
}






Not the API you're looking for?

Get an overview of our APIs here.