Introduction
You can use this API to integrate with your systems to create activities inside your CustomerGauge platform.
You will be able to report on this information using the Activity Timeline & Account Page.
Good to know
Authentication through OAuth2 only
We only support OAuth2 authentication on this API.
API response format:
This API returns data in JSON format
About this API
Resource Information
Response formats | JSON |
HTTP Method | PUT |
Response family | Activities |
Header | Authorization: Bearer XXXXX (Access Token) |
Resource URL
Europe Production Server: https://imports.api.eu.customergauge.com/activities
US Production Server: https://imports.api.us.customergauge.com/activities
Australia Production Server: https://imports.api.au.customergauge.com/activities
How to call
PUT Data
Provide the data, in JSON, in the body of the PUT request.
Parameters
While the data should provided in a JSON object in the body of the PUT request, we've listed out the possibilities in the table below;
Key | Data Type | Data |
---|---|---|
reference (required to update an existing Activity) | String, max 128 characters | ab12cd34ef56 |
account (required) | String, max 255 characters | ACME Industries |
contact | String, max 255 characters | john.doe@example.com |
type (required) | String, max 100 characters | Ticket |
source (required) | String, max 100 characters | Freshdesk |
happened_at (required) | Datetime, Y-m-d H:i:s format | 2019-10-06 22:34:45 |
additional_information_object | JSON Object, available if not using additional_information_array[] | { "subject": "{{ticket.subject}}", "agent_name": "{{ticket.agent.name}}", "url": "{{ticket.url}}", "priorty": "{{ticket.priority}}", "status": "{{ticket.status}}" } |
additional_information_array[key] * | String in array | Value |
* Replace "key" with the additional information field name, and Value with the value of that particular field.
Example Request
To call this API through cURL:
curl -H "Authorization: Bearer XXXXX" -X PUT https://imports.api.eu.customergauge.com/activities -d '{"account": "ACME Industries","type": "Support Ticket","contact": "test@example.com","source": "Freshdesk","additional_information_object": {"subject": "{{ticket.subject}}","agent_name": "{{ticket.agent.name}}","url": "{{ticket.url}}","priorty": "{{ticket.priority}}","status": "{{ticket.status}}"},"happened_at": "2019-03-06 10:00:00 +0530"}'
Example Result
Message reported on successful operation:
{ "data": { "id": 123, "reference": "456", "classification_id": 3, "account_id": 12345, "contact_id": 12345 // or null } }
Message reported on failed operation:
{ "message": "The given data was invalid.", "errors": { "type": [ "The type field is required." ], "happened_at": [ "The happened at field is required." ] } }
Example Activities
Below you can find some helpful guides on how to set up various Activities from some popular systems:
Not the API you're looking for?
View: