Webhook Subscriptions
Subscribe to events and then wait for Trackdrive to deliver the payload when things happen. The gist is: you POST a subscription to /api/v1/subscription/ requesting to receive hooks at some target URL. Every time the event happens, Trackdrive pings you at the target URL with the payload.
GET /subscriptions
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions
List Subscriptions
List all webhook event subscriptions on your account. Supports pagination with the page parameter.
Params
| Param name | Description |
|---|---|
|
page Optional |
Return the next page of results.
|
GET /subscriptions/new
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions/new
Build Webhook Subscription with defaults.
Return a new, unsaved subscription pre-filled with your company defaults, useful for previewing the record shape before creating one.
POST /subscriptions
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions
Create a subscription
Subscribe a target_url to a Trackdrive event such as new_call. Trackdrive POSTs the event payload to that URL every time the event fires. If a subscription already exists for the same target_url and event it is updated instead of duplicated. Optional trigger_fields limit delivery to records matching specific field values.
Params
| Param name | Description |
|---|---|
|
target_url Required |
The unique auto-generated subscription URL where Trackdrive will send JSON data when the event is triggered.
|
|
event Required |
The event that will be triggered. EG: When a new call comes in.
|
|
trigger_fields Optional |
Filter the data returned by the subscription. Only trigger if the object matches the given trigger fields. For example:
|
GET /subscriptions/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions/:id
Get a subscription
Retrieve a single webhook subscription by id.
PUT /subscriptions/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions/:id
Update a subscription
Change the target_url, event, or trigger_fields on an existing subscription.
Params
| Param name | Description |
|---|---|
|
target_url Optional |
The unique auto-generated subscription URL where Trackdrive will send JSON data when the event is triggered.
|
|
event Optional |
The event that will be triggered. EG: When a new call comes in.
|
DELETE /subscriptions/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions/:id
Delete a subscription
Permanently remove a subscription. It will stop receiving event payloads.
DELETE /subscriptions
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/subscriptions
Delete a subscription matching a target_url
Remove the subscription matching the given target_url instead of an id, useful when you only know the URL you registered and not its id.
Params
| Param name | Description |
|---|---|
|
target_url Optional |
The unique auto-generated subscription URL where Trackdrive will send JSON data when the event is triggered.
|