API Setup
Choose your Host Region to have the documentation adapt to your use case.
Host Region | |
---|---|
Label | Value |
EU | eu |
US | us |
AU | au |
Business Use Case
You can use this API to integrate with your systems to create or update Activities inside your CustomerGauge platform.
You will be able to report on this information using the Activity Timeline & Account Page.
This will help you identify Absence of Signal - gaps in customer contact, or too many points of contact, indicating frustration!
You can find some helpful guides on how to set up various Activities from some popular systems here:
Our PUT Records API has a wide variety of applications. The API allows you to create or update a single record into any of the following objects:
Good to Know
Import Configuration is case sensitive
Fields in the Import Configuration are case sensitive. Please ensure they match exactly what you'll send to the API.
Changes to Import Configurations
If a change happens to the implementation of the API (for example a field name change), that should be reflected in the used Import Configuration as well. Ignoring to do so will cause the API to silently fail for the fields involved.
Required Fields
The following fields are required in your Import Configuration:
Data Type | Required Fields |
Activity |
|
Preparations
A configuration reference is required to make requests to this API, all your configurations and references can be found in Data → Imports → Configurations or clicking here.
We provide default configurations that you can also use*:
Name | Reference | Data Type |
Activities (Default) | activities | Activities |
Each configuration data type is used to import a different kind of data into the system and it affects the required fields for a successful import.
*The default configurations are available for systems created after 24 September 2021.
Setting up an Activities Import Configuration
1. Go to Data > Imports > Configurations page (or click here).
2. Select the API Configurations type.
3. Click on “Add configuration” button.
4. On “Data type” choose “Activities” and fill the “Configuration name” field.
5. On “File Mapping” choose all the fields you want to import into the system and their file heading. These fields are case sensitive.
6. Click on the “Save” button to add the configuration.
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.
Endpoint
Endpoint URL |
https://imports.api.{{ apiRegion }}.customergauge.com/records/ |
Request
Parameters
Parameter | Description | Rules | Example Values |
configuration | Configuration reference for data type and mapping. You can find it in your Import Configurations, under the Reference column. |
| 9dd58237-c913-4073-9c76-07da0b49ff50 |
record[] | An array for all the fields to be imported. The field names must be the same mapped in the configuration referenced. |
| record[Email]=john@example.com record[Name]=John |
Response
HTTP Status Code | Description |
200 | OK - everything worked as expected. Example Response Body An empty Response Body will be returned when successful. |
422 | An issue occurred - this usually means one of the required fields is missing. Example Response Body { |
Examples
Postman example
After importing the Postman example, make sure to change the Host Region and Authentication accordingly.
cURL example
curl -H "Authorization: Bearer XXXXX" https://imports.api.{{ apiRegion }}.customergauge.com/records?configuration=16b53fd0-9103-431f-a5bd-f492b3eeb835&record[Account%20Name]=Example%20Corp&record[Email]=john.doe@example.com&record[First%20Name]=John&record[Last%20Name]=Doe
Not the API you're looking for?
Get an overview of our APIs here.