GET /api/v1/schedules
List Schedules.

Supported Formats

json, csv

Examples

curl -H "Authorization: Basic BASE64_ENCODED_PUBLIC_KEY_AND_PRIVATE_KEY" "https://[your-subdomain].trackdrive.com/api/v1/schedules?page=1&order=created_at"

Params

Param name
Description
Validations
serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

Validations:

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    scheduleDefault response format.
    schedule_gridModern response format that returns various foreign keys for use with other API endpoints.
page
Optional

Return the next page of results.

Validations:

  • Must be a number.

created_at_to
Optional

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

Validations:

  • Must be a String

created_at_from
Optional

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

Validations:

  • Must be a String

order
Optional

Sort results by this field.

Validations:

  • Must be one of: sortable_order, offer_id, name, paused, offer_id, leads_api_key, time_zone, schedule_type, numbers_count, last_call_at, calls_count, instant_agent_dial_weight, created_at, updated_at, recent_calls_count, use_do_not_call, use_machine_detection, action_dial_skip_mobile, off_hook_enabled, real_time_priority, dial_caller_name, daylight_hours_open, daylight_hours_close, leads_sort_order_type, checked_leads_agent_dial_actions_at, checked_leads_no_match_actions_at.

order_dir
Optional

Sort results in ascending or descending order.

Validations:

  • Must be one of: asc, desc.

fulltext
Optional

Search for any record that matches this text

Validations:

  • Must be a String

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
  • company_id
  • offer_id
  • lead_token
  • leads_api_key
  • name
  • time_zone
  • max_leads_per_remote_ip_interval
  • max_leads_per_remote_ip
  • last_call_at
  • calls_count
  • recent_calls_count
  • action_sms_provider_configuration_id
  • action_sms_ring_pool_id
  • action_sms_number_id
  • action_sms_use_ring_pool
  • action_dial_use_ring_pool
  • during_daylight_hours
  • use_do_not_call
  • available_cc_percentage
  • calls_on_hold_limit
  • use_machine_detection
  • action_dial_skip_mobile
  • off_hook_enabled
  • skip_placing_calls_until_agent_count_exceeds
  • paused
  • paused_at
  • unpaused_at
  • paused_by_user_id
  • dial_caller_name
  • daylight_hours_open
  • daylight_hours_close
  • numbers_count
  • leads_sort_order_type
  • action_ids
  • end_of_schedule_action_ids
  • schedule_trigger_ids
  • record_token_filter_end_of_schedule_id
  • record_token_filter_end_of_schedule_data_count
  • record_token_filter_end_of_schedule_data
  • record_token_filter_scheduled_callback_id
  • record_token_filter_scheduled_callback_data_count
  • record_token_filter_scheduled_callback_data
  • machine_detection_record_token_filter_id
  • machine_detection_record_token_filter_data_count
  • machine_detection_record_token_filter_data
  • record_token_filter_id
  • record_token_filter_data_count
  • record_token_filter_data

Validations:

  • Must be a String


GET /api/v1/schedules/new
Build Schedule with defaults.

Params

Param name
Description
Validations
serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

Validations:

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    scheduleDefault response format.
    schedule_gridModern response format that returns various foreign keys for use with other API endpoints.

POST /api/v1/schedules
Create Schedule.

Params

Param name
Description
Validations
serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

Validations:

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    scheduleDefault response format.
    schedule_gridModern response format that returns various foreign keys for use with other API endpoints.
name
Optional Blank Value Allowed

Name

Validations:

  • Must be a String

offer_id
Optional Blank Value Allowed

Offer

Validations:

description
Optional Blank Value Allowed

A human readable description of the record.

Validations:

  • Must be a String

paused
Optional Blank Value Allowed

Paused

Validations:

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


POST /api/v1/schedules/make_call
Place an outbound call immediately to a lead (the "promote" action).

Places an outbound call immediately. This is the endpoint to use for a “promote” / “call now” action.

Identifying who to call (choose one):
lead_id — dials that exact existing Lead. Its number is used as to and its schedule is used to dial. Nothing new is created, so a promote never produces a duplicate lead. This is the recommended option.
lead_token (a Schedule’s “Leads API Key”) or schedule_id — identifies the Schedule to dial from. You must also pass to (the number to dial).

Schedule / lead distribution routing:
The resolved schedule takes the same code path as POST /api/v1/leads. If it is a lead-distribution (“router”) schedule, the matching distribution is resolved from the submitted data (eg traffic_source_id) and the call is routed to that distribution’s downstream target schedule. If no distribution matches, the request is rejected.

Which lead gets dialed (when using lead_token/schedule_id + to):
• If a live lead is already enrolled in the resolved schedule for that number, it is reused and dialed — no duplicate is created (the “promote” case).
• Otherwise a one-off, offer-owned lead is created and dialed. This places a single call without enrolling the contact into the schedule’s dialing cadence.

Guards enforced before dialing:
• The schedule must be active.
• Account CPS (calls per second) limit.
• DNC / contact suppression rules.
• The same number cannot be dialed more than once every 30 seconds.
• The destination number must be valid.

Returns a serialized Call record on success. Raises errors for an unknown lead_id, an unresolvable or inactive schedule, no matching lead distribution, invalid numbers, suppressed contacts, exceeded CPS, recently-dialed numbers, or duplicate concurrent leads.

Params

Param name
Description
Validations
lead_id
Optional

The TrackDrive ID (UUID) of an existing Lead to dial. When provided, the call uses this exact lead — its number is dialed and its schedule is used — so to, lead_token and schedule_id are not required and are ignored. This is the preferred way to promote a lead you already created, because it never creates a duplicate.

Validations:

  • Must be a String

schedule_id
Optional

The ID of the Schedule to dial from. Must belong to the current company and be active. Use this (or lead_token) together with to when you are not passing a lead_id.

Validations:

lead_token
Optional

The token for the Schedule where you want lead to originate. Get it from: trackdrive.com/schedules

Validations:

  • Must be a String

to
Optional

Destination phone number to dial. Must be a valid number and not suppressed. Required unless a lead_id is provided (in which case the lead’s number is used).

Validations:

  • Must be a String

data
Optional

Optional hash of additional lead attributes (eg traffic_source_id). Used to route the lead through a lead-distribution schedule and stored on any lead that is created.

Validations:

  • Must be a Hash


GET /api/v1/schedules/:id
Get Schedule by id.

Params

Param name
Description
Validations
serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

Validations:

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    scheduleDefault response format.
    schedule_gridModern response format that returns various foreign keys for use with other API endpoints.

PUT /api/v1/schedules/:id
Update Schedule by id.

Params

Param name
Description
Validations
serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

Validations:

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    scheduleDefault response format.
    schedule_gridModern response format that returns various foreign keys for use with other API endpoints.
name
Optional Blank Value Allowed

Name

Validations:

  • Must be a String

offer_id
Optional Blank Value Allowed

Offer

Validations:

description
Optional Blank Value Allowed

A human readable description of the record.

Validations:

  • Must be a String

paused
Optional Blank Value Allowed

Paused

Validations:

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

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.

Validations:

  • Must be a decimal number.

lead_duplicate_timeframe
Optional Blank Value Allowed

Translation missing: en.api.lead_duplicate_timeframe

Validations:

  • Must be a number.


DELETE /api/v1/schedules/:id
Destroy Schedule by id.

Params

Param name
Description
Validations
serializer
Optional Blank Value Allowed

This endpoint supports multiple response formats. Pass serializer=name to retrieve data in an alternate format.

Validations:

  • Must be a value contained in the pick list:
    Acceptable ValueDescription
    scheduleDefault response format.
    schedule_gridModern response format that returns various foreign keys for use with other API endpoints.