Introduction
Authentication
Endpoints
Introduction
Welcome to the TrackNotion Public API Documentation. This API is specifically designed for integration with Zapier, providing a streamlined way to connect TrackNotion data with your Zapier workflows. This technical document is intended solely for developers building Zapier integrations and is not intended for general TrackNotion users.
With this API, you can access key TrackNotion resources, such as campaigns and calls, allowing for effective data synchronization within Zapier.
Authentication
TrackNotion’s endpoints use an API token for authentication. You can generate this token within TrackNotion by navigating to the Integrations page, selecting Zapier, and clicking Enable. The token will be generated automatically.
Step by Step
Logging in to your TrackNotion account https://app.tracknotion.com
After login, go to the Integration page, as seen in the screenshot below.
Go to the Zapier Integration Page by clicking on the Zapier Icon
Inside the Zapier Integration Page, you can click on the Zapier Icon or the switch to enable it and generate the API token.
You can copy the token by clicking on the red button right next to the token.
Authorization using an API token
To access TrackNotion’s endpoints, you need to authorize each request by passing your API token as a bearer token in the Authorization header. This method ensures the API can validate your identity and grant access to the requested resources.
Instructions
Generate Your API Token: First, obtain your API token by navigating to the Integrations page within TrackNotion, selecting Zapier, and clicking Enable. The token will be generated automatically. “As you can see in the section above.”
Add the Authorization Header: Include the API token in your HTTP request’s headers as follows:
Authorization: Bearer YOUR_API_TOKENReplace YOUR_API_TOKEN with the actual token generated from TrackNotion.
Notes
Make sure to keep your API token secure and avoid sharing it publicly.
The API token is required for every request to TrackNotion’s endpoints.
Endpoints
URL: https://app.tracknotion.com/api/v1/zapier/webhooks/unsubscribe
Validate Token
HTTP method: get
URL: https://app.tracknotion.com/api/v1/validate-token
Description: Validate whether the provided API token from TrackNotion is still valid.
Parameters
Headers
Accept: application/json
Authorization: Bearer {string}
Request Example
GET https://app.tracknotion.com/api/v1/validate-token
Accept: application/json
Authorization: Bearer token
Response examples
200 – OK
{
“id”: 1,
“name”: “Tenant name”
}
401 – Unauthorized
{
“message”: “Unauthenticated.”
}
List Campaign
HTTP method: get
URL: https://app.tracknotion.com/api/v1/zapier/campaigns
Description: Returns all active campaigns for a TrackNotion Tenant.
Parameters
Headers
Accept: application/json
Authorization: Bearer {string}
Request Example
GET https://app.tracknotion.com/api/v1/zapier/campaigns
Accept: application/json
Authorization: Bearer token
Responses examples
200 – OK
[
{
"id": 22,
"title": "Campaign title 22"
}
]
403 – Forbidden
{
“Message”: “Zapier is not enabled for tenant.”
}
Webhook Subscription
HTTP method: post
URL: https://app.tracknotion.com/api/v1/zapier/webhooks/subscribe
Description: An endpoint that registers a new webhook subscription. The webhook is triggered after a call occurs, and the sentiment score is calculated.
Parameters
Headers
Accept: application/json
Authorization: Bearer {string}
Content-type: application/jsonBody
hookUrl (string, required) – Webhook URLcampaigns (int[]) – List of campaigns from which calls are fetched to trigger the webhook subscription.
sentiment_score_start (int) – Minimum sentiment score from which calls are fetched to trigger the webhook subscription.
sentiment_score_end (int) – Maximum sentiment score up to which calls are fetched to trigger the webhook subscription.
duration_start (int) – Minimum call duration (in seconds) from which calls are fetched to trigger the webhook subscription.
duration_end (int) – Maximum call duration (in seconds) up to which calls are fetched to trigger the webhook subscription.
integration_name (string) – Name of the integration registering the webhook subscription.
entity (string) – Specifies the entity for which the webhook is registered. Currently, only “Call” is available.
Request Example
POST https://app.tracknotion.com/api/v1/zapier/webhooks/subscribe
Accept: application/json
Authorization: Bearer token
{
“hookUrl”: “https://domain.com/uuid”,
“Integration_name”: “zapier”,
“entity”: “Call”
}
Responses examples
201 – Created
{
"id": 1,
}
403 – Forbidden
{
“Message”: “Zapier is not enabled for tenant.”
}
Webhook unsubscription
HTTP method: delete
URL: https://app.tracknotion.com/api/v1/zapier/webhooks/unsubscribe
Description: Endpoint to unsubscribe from an existing webhook subscription.
Parameters
Headers
Accept: application/json
Authorization: Bearer {string}
Content-type: application/json
Body
hookUrl (int, required) – Webhook subscription id
Request Example
DELETE https://app.tracknotion.com/api/v1/zapier/webhooks/subscribe
Accept: application/json
Authorization: Bearer token
{
“hookUrl”: 1
}
Responses examples
204 – No Content
No body
403 – Forbidden
{
“Message”: “Zapier is not enabled for tenant.”
}
Call listing
HTTP method: get
URL: https://app.tracknotion.com/api/v1/zapier/calls
Description: Returns latest call for logged tenant.
Parameters
Headers
Accept: application/json
Authorization: Bearer {string}Body
campaigns[] (int[]) – List of campaigns from which calls are fetched to meet the endpoint criteria.period_start (string) – Start date from which calls are fetched to meet the endpoint criteria.
period_end (string) – End date up to which calls are fetched to meet the endpoint criteria.
sentiment_score_start (int) – Minimum sentiment score from which calls are fetched to meet the endpoint criteria.
sentiment_score_end (int) – Maximum sentiment score up to which calls are fetched to meet the endpoint criteria.
duration_start (int) – Minimum call duration (in seconds) from which calls are fetched to meet the endpoint criteria.
duration_end (int) – Maximum call duration (in seconds) up to which calls are fetched to meet the endpoint criteria.
Request Example
GET https://app.tracknotion.com/api/v1/zapier/calls?campaigns[]=1&period_start=2024-01-01&period_end=2024-12-31
Accept: application/json
Authorization: Bearer token
Responses examples
200 – OK
[
{
"id": 1,
"phone_number_to": "+11231231234",
"phone_number_from": "+11231231234",
"call_datetime": "2024-09-13T14:00:00+0000",
"duration_in_seconds": 6,
"sentiment_score": 0,
"status": "CREATED",
"keywords": [
{
"id": 1,
"value": "keyword",
"score": 99
}
],
"campaign_id": 2,
"session": {
"id": 3,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
"origin": "http://localhost",
"call_id": 1,
"params": [
{
"name": "gclid",
"value": "123",
"tracking_session_id": 2
}
]
}
}
]
403 – Forbidden
{
“Message”: “Zapier is not enabled for tenant.”
}