Token

The tokens in your Trackdrive account.

GET /tokens

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

List Tokens.

Lists the tokens configured for your account - the key based variables (matching your contact fields) used to personalize IVR prompts, agent scripts, and webhooks. Hidden tokens are left out unless you pass with_hidden, and results are ordered by creation date ascending by default. Requires a superuser account.

Params

Param name Description
page
Optional

Return the next page of results.

  • Must be a number.

GET /tokens/:id

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

Get Token by id.

Retrieves a single token by id, restricted to tokens your account can access. Requires a superuser account.

GET /tokens/new

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

Build Token with defaults.

Returns an unsaved token built from the submitted attributes and account defaults, without creating a record - use it to preview a token's defaults. Tokens cannot be created through this API. Requires a superuser account with the Setup System permission.

PUT /tokens/:id

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

Update Token by id.

Updates an existing token's key, display color, description, linked IVR call router message, and key press digit mapping by id. Renaming a token's key automatically updates any token matchers that reference it. Requires a superuser account with the Setup System permission.

Params

Param name Description
color
Optional Blank value allowed

Background Color

  • Must be a String

text_color
Optional Blank value allowed

Background Color

  • Must be a String

sortable_order
Optional Blank value allowed

The order in which this token appears in lists and reports. Lower values are shown first.

  • Must be a decimal number.

key
Optional Blank value allowed

Key

  • Must be a String

name
Optional Blank value allowed

An alias for key.

  • Must be a String

description
Optional Blank value allowed

A human readable description of what this token stores.

  • Must be a String

number_token
Optional Blank value allowed

When true, this token only accepts numeric values.

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

inherit_from_previous_call
Optional Blank value allowed

Carry this token’s value forward from the caller’s previous call when the current call does not supply one.

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

call_router_message_enabled
Optional Blank value allowed

Play an IVR message asking the caller to press a key, and store their key press as this token’s value.

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

static_value
Optional Blank value allowed

A fixed value to always use for this token, ignoring any value supplied on the call or lead.

  • Must be a String

use_static_value
Optional Blank value allowed

When true, always use static_value for this token instead of the value supplied on the call or lead.

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

acceptable_tokens_enabled
Optional Blank value allowed

Restrict this token to a defined list of acceptable values instead of accepting any properly formatted value.

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

acceptable_token_list
Optional Blank value allowed

Comma separated list of the values this token will accept when acceptable_tokens_enabled is true.

  • Must be a String

acceptable_token_value_ids
Optional Blank value allowed

The ids of the existing Token Values this token will accept when acceptable_tokens_enabled is true.

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

DELETE /tokens/:id

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

Destroy Token by id.

Hides the token rather than deleting its record: clears its display colors, disables inheriting its value from the previous call, and marks it hidden so it drops out of default list results, while its historical values are kept. Requires a superuser account with the Setup System and destroy permissions.

GET /tokens/fields

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

List an offer's or schedule's contact fields

Given a lead_token (an Offer's or Schedule's posting key), returns the contact fields accepted when posting a lead to that offer or schedule - each field's key, data type, required flag, label, help text, and any allowed choices. Use it to build a lead submission form, or to validate a lead post before sending it.

Params

Param name Description
lead_token
Optional

The token that determines where submitted data is routed. Get it from the Offer or Schedule.

  • Must be a String