Key-Values API

Keys and Values can be created, edited, and deleted through the key-values api. Once keys have been created, you can add them to supply tags for reporting. You can also apply key-value targeting to demand tags.

Visit the Keys page for more information on Keys and Values.

Create Keys

SDK

API

POST /api/v0/keys

Headers

Body (example)

{
   "name": "TEST API DOCS",
   "key": "test_api",
   "definition_type": "predefined"

}


Required parameters: name, key, definition_type

Response

Status code 200

Get Keys

SDK

API

GET /api/v0/keys

Headers


Response

Status code 200

Get Values

SDK

API

GET /api/v0/keys/<key_id>/values/<id>

Headers


Response

Status code 200

Edit Keys

SDK

API

PUT /api/v0/keys/<id>

Headers

Body (example)

{
   "name": "I want to change the name"

}


Response

Status code 200

Edit Values

SDK

API

PUT /api/v0/keys/<id>/values/<id>

Headers

Body (example)

{
   "name": "I want to change the name"

}


Response

Status code 200

Add Values to Existing Key

SDK

API

POST /api/v0/keys/<id>/values

Headers

Body (example)

{
   "name": "TEST API DOCS",
   "value": "test_api"

}

Required parameters: name, value

Response

Status code 200

Add Keys to Supply Tag

SDK

API

PUT /api/v0/supply_tags/<id>

Headers

Body (example)

{
    "key_ids": 27
}


Response

Status code 200