Token
The tokens in your Trackdrive account.
GET /tokens
Authorization Requiredhttps://[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.
|
GET /tokens/:id
Authorization Requiredhttps://[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 Requiredhttps://[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 Requiredhttps://[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
|
|
text_color Optional Blank value allowed |
Background Color
|
|
sortable_order Optional Blank value allowed |
The order in which this token appears in lists and reports. Lower values are shown first.
|
|
key Optional Blank value allowed |
Key
|
|
name Optional Blank value allowed |
An alias for key.
|
|
description Optional Blank value allowed |
A human readable description of what this token stores.
|
|
number_token Optional Blank value allowed |
When true, this token only accepts numeric values.
|
|
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.
|
|
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.
|
|
static_value Optional Blank value allowed |
A fixed value to always use for this token, ignoring any value supplied on the call or lead.
|
|
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.
|
|
acceptable_tokens_enabled Optional Blank value allowed |
Restrict this token to a defined list of acceptable values instead of accepting any properly formatted value.
|
|
acceptable_token_list Optional Blank value allowed |
Comma separated list of the values this token will accept when acceptable_tokens_enabled is true.
|
|
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.
|
DELETE /tokens/:id
Authorization Requiredhttps://[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 Requiredhttps://[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.
|