Skip to end of metadata
Go to start of metadata

Targeting Key Service

The targeting-key service works in conjunction with the targeting-value service to allow you to define your own key/value combinations for use in targeting on line items, campaigns, and so on. (See Custom Key Value Targeting for more information.).

On This Page

REST API

Add a new targeting key:

Modify a targeting key:

View all targeting keys:

View a specific targeting key:

View a set of targeting keys by name:

Delete a targeting key:

JSON Fields

General

Field

Type (Length)

Description

Default

Required On

id

int

The ID of the targeting key.

Auto-generated number

PUT/ DELETE, in query string

type
enum

The data type of the key and its associated values. Must be one of the following values:

  • string
  • numeric
POST
name
string

The name of the targeting key.

The value must be one word, with no spaces. This name must be unique within your member.

POST
label
string
A label for the key, to be used for reporting. This value is not required, but if you do include a value, it must be unique within your member. Label can be a maximum of 190 characters.

state

enum
The state of the targeting key. Possible values are active and inactive.
active
created_on
date
Read-only. The date and time the targeting key was created.
last_modified
date
Read-only. The date and time the targeting key was last modified.

Key Requirements

Number of keys:

  • You can have up to 500 active keys at one time.
  • You can have up to 100,000 values per key.
  • You can have up to 2,500,000 total active values at one time.

Key naming:

  • Key names are not case-sensitive.
  • Maximum key name length is 50 characters.
  • Key names must be one word, with no whitespace.
  • Key names cannot contain any of the following special characters:
    • " (double quotes)
    • ' (apostrophe)
    • = (equal sign)
    • ! (exclamation point)
    • + (plus sign)
    • # (hashtag)
    • * (asterisk)
    • ~ (tilde)
    • ; (semicolon)
    • ^ (caret)
    • () (parentheses)
    • < > (angle brackets)
    • [ ] (square brackets)
    • , (comma)
    • & (ampersand)
    • @ (at)
    • : (colon)
    • ? (question mark)
    • % (percent sign)
    • / (forward slash)

Examples

View all targeting keys
View a specific targeting key
Add a targeting key
Modify a targeting key
Filter targeting keys by name
Search within a name or label
Sort by last modified date
Delete a targeting key

Related Topics