Event Triggers

Webhooks (also known as Postbacks) fire when a triggers occurs, such as a buyer being dialed or a call ending.

GET /outgoing_webhooks

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/outgoing_webhooks

List webhooks

List the outgoing webhooks (postbacks) configured in your account, with filters for the offer, buyer, schedule action, or trigger type they are attached to.

Params

Param name Description
offer_id
Optional

Filter for webhooks that are assigned to this Offer.

buyer_id
Optional

Filter for webhooks that are assigned to this Buyer.

schedule_action_id
Optional

Filter for webhooks that are assigned to this Schedule Action.

trigger_type
Optional

When does this trigger fire?

  • Must be one of: agent_enter_conference, agent_exit_conference, agent_offline, agent_online, before_answering_call, before_placing_call, before_schedule_action_dial, before_sending_text_message, both_converted, buyer_answered, buyer_answered_with_contact_fields, buyer_before_dial, buyer_converted, buyer_dialled, buyer_did_not_convert, buyer_enter_conference, buyer_exit_conference, call_changed, call_disposition_changed, call_recording_updated, call_recording_updated_call_ended, consumer_enter_conference, consumer_exit_conference, contact_fields_changed, did_not_convert, either_converted, every_call, lead_changed, lead_opted_out, new_call_started, new_lead_created, offer_converted, offer_did_not_convert, only_buyer_converted, only_offer_converted, timer.

ids
Optional

Return records matching these ids.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

page
Optional

Return the next page of results.

  • Must be a number.

per_page
Optional

How many results to return per page. The default is 25.

  • Must be a number.

created_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

created_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

fulltext
Optional

Search for any record that matches this text

  • Must be a String

time_zone
Optional

Date ranges will be parsed using this time zone.

columns
Optional
Specify the columns you would like returned by the API for a given resource. Limiting the columns can significantly increase API response time since only the requested data will be processed. columns=uuid,number,created_at

Must be any combination of:

  • id
  • legacy_id
  • type
  • uuid
  • created_at
  • updated_at
  • deleted_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • external_record_id
  • name
  • context_menu_name
  • trigger_type
  • trigger_duration
  • tier
  • company_id
  • offer_id
  • offer_name
  • schedule_action_id
  • sortable_order
  • outgoing_url_ids
  • token_value_map_ids
  • buyer_id
  • traffic_source_id
  • buyer_group_id
  • call_router_id
  • global_company_id
  • buyer_name
  • traffic_source_name
  • buyer_group_name
  • trigger_call_status
  • cache_success_for_seconds
  • webhook_body_success_path
  • webhook_body_success_match
  • webhook_body_success_operator
  • webhook_path_number
  • connected_duration_seconds
  • webhook_path_duration
  • webhook_path_name
  • webhook_path_revenue
  • webhook_response_success_codes
  • webhook_path_buyer_name
  • webhook_path_external_id
  • buyer_answered_with_contact_field_ids
  • webhook_contains_many_buyers
  • webhook_path_buyers
  • template_description
  • template_enabled
  • template_tier
  • template_copy_on_company_create
  • call_router_answer_id
  • schedule_id
  • webhook_action_ids
  • token_value_map_group_ids
  • record_token_filter_id
  • record_token_filter_data_count
  • record_token_filter_data
  • record_token_additional_id
  • record_token_additional_data_count
  • record_token_additional_data
  • webhook_manual_fire_ids
  • Must be a String

root
Optional

Pass root=false to return results without a root node and metadata.
For example:
GET /api/v1/calls?root=false will return [call1, call2, call3]
While:
GET /api/v1/calls will return {calls: [call1, call2, call3], metadata: {}}

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

GET /outgoing_webhooks/new

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/outgoing_webhooks/new

Build a new webhook

Return a blank outgoing webhook populated with default attribute values, useful for building a create form.

Params

Param name Description
global_company_id
Optional

Assign the webhook to your company to have it fire on all calls.

offer_id
Optional

Assign the record to this Offer.

buyer_id
Optional

Filter for webhooks that are assigned to this Buyer.

buyer_group_id
Optional Blank value allowed

Filter for webhooks that are assigned to this Buyer Group.

traffic_source_id
Optional Blank value allowed

Filter for webhooks that are assigned to this Traffic Source.

call_router_id
Optional

Filter for webhooks that are assigned to this Call Flow.

schedule_action_id
Optional

Assign the record to this Schedule Action.

trigger_type
Optional

When does this trigger fire?

  • Must be one of: agent_enter_conference, agent_exit_conference, agent_offline, agent_online, before_answering_call, before_placing_call, before_schedule_action_dial, before_sending_text_message, both_converted, buyer_answered, buyer_answered_with_contact_fields, buyer_before_dial, buyer_converted, buyer_dialled, buyer_did_not_convert, buyer_enter_conference, buyer_exit_conference, call_changed, call_disposition_changed, call_recording_updated, call_recording_updated_call_ended, consumer_enter_conference, consumer_exit_conference, contact_fields_changed, did_not_convert, either_converted, every_call, lead_changed, lead_opted_out, new_call_started, new_lead_created, offer_converted, offer_did_not_convert, only_buyer_converted, only_offer_converted, timer.

trigger_duration
Optional Blank value allowed

How many seconds must pass for the trigger to fire?

  • Must be a decimal number.

trigger_call_status
Optional Blank value allowed

Restrict which call statuses fire the webhook. Leave blank to fire regardless of status. live only fires while the call is in progress, ended only fires after the call has completed.

  • Must be a String

connected_duration_seconds
Optional Blank value allowed

Wait to fire the webhook until the buyer has been connected with the caller for this many seconds. If the call ends before that much time has passed, the webhook does not fire. Leave blank to fire as soon as the buyer connects.

  • Must be a decimal number.

cache_success_for_seconds
Optional Blank value allowed

How long, in seconds, to cache a successful response from the webhook before checking it again.

  • Must be a decimal number.

tier
Optional Blank value allowed

The order global webhooks fire in, from lowest to highest; webhooks assigned to a Buyer, Offer, etc are always tier 0. Set this below 0 to fire before other webhooks in your account. Only applies when global_company_id is set.

  • Must be a decimal number.

buyer_answered_with_contact_field_ids
Optional Blank value allowed

Fire only after the buyer has answered and all of these Contact Fields have values.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

token_value_map_group_ids
Optional Blank value allowed

Map lead data to custom values by assigning these Token Value Map Groups to the webhook.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

record_token_filter_list
Optional Blank value allowed

Assign filters to the object by passing an array of key:value pairs

  • Must be a valid list of filters. Example filters:
    "interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"
record_token_additional_list
Optional Blank value allowed

Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.

  • Must be a valid list of tokens. Example tokens:
    buyer_interest:loan,another_token:value
sortable_order
Optional Blank value allowed

The order in which records will be sorted. Values are sorted in ascending order; smaller values are listed first.

  • Must be a decimal number.

POST /outgoing_webhooks

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/outgoing_webhooks

Create a webhook

Create an outgoing webhook that fires when a trigger occurs, such as a buyer being dialed or a call ending. The webhook must be attached to exactly one owner: a company, offer, schedule action, buyer, call flow, traffic source, or SMS flow.

Params

Param name Description
global_company_id
Optional

Assign the webhook to your company to have it fire on all calls.

offer_id
Optional

Assign the record to this Offer.

buyer_id
Optional

Filter for webhooks that are assigned to this Buyer.

buyer_group_id
Optional Blank value allowed

Filter for webhooks that are assigned to this Buyer Group.

traffic_source_id
Optional Blank value allowed

Filter for webhooks that are assigned to this Traffic Source.

call_router_id
Optional

Filter for webhooks that are assigned to this Call Flow.

schedule_action_id
Optional

Assign the record to this Schedule Action.

trigger_type
Optional

When does this trigger fire?

  • Must be one of: agent_enter_conference, agent_exit_conference, agent_offline, agent_online, before_answering_call, before_placing_call, before_schedule_action_dial, before_sending_text_message, both_converted, buyer_answered, buyer_answered_with_contact_fields, buyer_before_dial, buyer_converted, buyer_dialled, buyer_did_not_convert, buyer_enter_conference, buyer_exit_conference, call_changed, call_disposition_changed, call_recording_updated, call_recording_updated_call_ended, consumer_enter_conference, consumer_exit_conference, contact_fields_changed, did_not_convert, either_converted, every_call, lead_changed, lead_opted_out, new_call_started, new_lead_created, offer_converted, offer_did_not_convert, only_buyer_converted, only_offer_converted, timer.

trigger_duration
Optional Blank value allowed

How many seconds must pass for the trigger to fire?

  • Must be a decimal number.

trigger_call_status
Optional Blank value allowed

Restrict which call statuses fire the webhook. Leave blank to fire regardless of status. live only fires while the call is in progress, ended only fires after the call has completed.

  • Must be a String

connected_duration_seconds
Optional Blank value allowed

Wait to fire the webhook until the buyer has been connected with the caller for this many seconds. If the call ends before that much time has passed, the webhook does not fire. Leave blank to fire as soon as the buyer connects.

  • Must be a decimal number.

cache_success_for_seconds
Optional Blank value allowed

How long, in seconds, to cache a successful response from the webhook before checking it again.

  • Must be a decimal number.

tier
Optional Blank value allowed

The order global webhooks fire in, from lowest to highest; webhooks assigned to a Buyer, Offer, etc are always tier 0. Set this below 0 to fire before other webhooks in your account. Only applies when global_company_id is set.

  • Must be a decimal number.

buyer_answered_with_contact_field_ids
Optional Blank value allowed

Fire only after the buyer has answered and all of these Contact Fields have values.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

token_value_map_group_ids
Optional Blank value allowed

Map lead data to custom values by assigning these Token Value Map Groups to the webhook.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

record_token_filter_list
Optional Blank value allowed

Assign filters to the object by passing an array of key:value pairs

  • Must be a valid list of filters. Example filters:
    "interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"
record_token_additional_list
Optional Blank value allowed

Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.

  • Must be a valid list of tokens. Example tokens:
    buyer_interest:loan,another_token:value
sortable_order
Optional Blank value allowed

The order in which records will be sorted. Values are sorted in ascending order; smaller values are listed first.

  • Must be a decimal number.

name
Required

The human friendly name of this webhook.

  • Must be a String

text_message_flow_id
Optional Blank value allowed

Assign the webhook to this SMS Flow to have it fire on that flowโ€™s messages.

call_router_answer_id
Optional Blank value allowed

Assign the webhook to this Call Flow Answer to have it fire when that answer is used.

GET /outgoing_webhooks/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/outgoing_webhooks/:id

Show the details of a webhook

Get the configuration details of a single outgoing webhook by id.

PUT /outgoing_webhooks/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/outgoing_webhooks/:id

Update a webhook

Update an outgoing webhook, including its trigger type, trigger duration, or the record it is attached to.

Params

Param name Description
global_company_id
Optional

Assign the webhook to your company to have it fire on all calls.

offer_id
Optional

Assign the record to this Offer.

buyer_id
Optional

Filter for webhooks that are assigned to this Buyer.

buyer_group_id
Optional Blank value allowed

Filter for webhooks that are assigned to this Buyer Group.

traffic_source_id
Optional Blank value allowed

Filter for webhooks that are assigned to this Traffic Source.

call_router_id
Optional

Filter for webhooks that are assigned to this Call Flow.

schedule_action_id
Optional

Assign the record to this Schedule Action.

trigger_type
Optional

When does this trigger fire?

  • Must be one of: agent_enter_conference, agent_exit_conference, agent_offline, agent_online, before_answering_call, before_placing_call, before_schedule_action_dial, before_sending_text_message, both_converted, buyer_answered, buyer_answered_with_contact_fields, buyer_before_dial, buyer_converted, buyer_dialled, buyer_did_not_convert, buyer_enter_conference, buyer_exit_conference, call_changed, call_disposition_changed, call_recording_updated, call_recording_updated_call_ended, consumer_enter_conference, consumer_exit_conference, contact_fields_changed, did_not_convert, either_converted, every_call, lead_changed, lead_opted_out, new_call_started, new_lead_created, offer_converted, offer_did_not_convert, only_buyer_converted, only_offer_converted, timer.

trigger_duration
Optional Blank value allowed

How many seconds must pass for the trigger to fire?

  • Must be a decimal number.

trigger_call_status
Optional Blank value allowed

Restrict which call statuses fire the webhook. Leave blank to fire regardless of status. live only fires while the call is in progress, ended only fires after the call has completed.

  • Must be a String

connected_duration_seconds
Optional Blank value allowed

Wait to fire the webhook until the buyer has been connected with the caller for this many seconds. If the call ends before that much time has passed, the webhook does not fire. Leave blank to fire as soon as the buyer connects.

  • Must be a decimal number.

cache_success_for_seconds
Optional Blank value allowed

How long, in seconds, to cache a successful response from the webhook before checking it again.

  • Must be a decimal number.

tier
Optional Blank value allowed

The order global webhooks fire in, from lowest to highest; webhooks assigned to a Buyer, Offer, etc are always tier 0. Set this below 0 to fire before other webhooks in your account. Only applies when global_company_id is set.

  • Must be a decimal number.

buyer_answered_with_contact_field_ids
Optional Blank value allowed

Fire only after the buyer has answered and all of these Contact Fields have values.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

token_value_map_group_ids
Optional Blank value allowed

Map lead data to custom values by assigning these Token Value Map Groups to the webhook.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

record_token_filter_list
Optional Blank value allowed

Assign filters to the object by passing an array of key:value pairs

  • Must be a valid list of filters. Example filters:
    "interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"
record_token_additional_list
Optional Blank value allowed

Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.

  • Must be a valid list of tokens. Example tokens:
    buyer_interest:loan,another_token:value
sortable_order
Optional Blank value allowed

The order in which records will be sorted. Values are sorted in ascending order; smaller values are listed first.

  • Must be a decimal number.

DELETE /outgoing_webhooks/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/outgoing_webhooks/:id

Delete a webhook

Permanently delete an outgoing webhook so it no longer fires.