Custom Parameters API endpoints
Endpoint reference for the Custom Parameters tag (7 endpoints): The custom parameters the ad tags send: names, value lists, list separators and what reaches analytics
The custom parameters the ad tags send: names, value lists, list separators and what reaches analytics. 7 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.
POST /rest-api/custom-parameter-policy.do
Set the custom parameter recording policy.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
policy | form | string | yes | ANY or ONLY_VERIFIED Values: ANY, ONLY_VERIFIED. |
Responses: 200 — {policy} · 409 — The Analytics configuration list still decides; adopt it first. Errors follow the shared conventions.
POST /rest-api/custom-parameter-policy/adopt-legacy.do
Move the Analytics configuration list to the custom parameters.
No parameters beyond authentication.
Responses: 200 — {policy} · 409 — The policy is no longer LEGACY. Errors follow the shared conventions.
GET /rest-api/custom-parameters.do
List custom parameters.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
usage | query | boolean | no | true: count the targeting rules that read each parameter (CUSTOM_PARAMETERS admins only) |
query | query | string | no | Only the parameters whose name or label contains this, ignoring case |
Responses: 200 — {parameters: [parameter], total, mayManage (whether the caller may change them and see the rules that read them), policy (LEGACY, ANY or ONLY_VERIFIED), legacy: {names, mode, applies (the list’s filter is on for this server; other servers may differ), movesByItself (the list is empty, so the policy leaves LEGACY within a minute)} while LEGACY (CUSTOM_PARAMETERS admins only), unregistered: [{name, rules}] with usage=true}. Errors follow the shared conventions.
POST /rest-api/custom-parameters.do
Add a custom parameter.
Request body (application/json, required): JSON object with fields allowOtherValues, description, label, listSeparator, name, recordInAnalytics, valueMode, values — The parameter.
Responses: 200 — {parameter, ignoredFields} · 409 — A parameter with this name already exists. Errors follow the shared conventions.
GET /rest-api/custom-parameters/{parameterId}.do
Get a custom parameter.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
parameterId | path | string | yes | Parameter id or name |
Responses: 200 — {parameter, rules (CUSTOM_PARAMETERS admins only): [{targetId, rule, kind, parameter, operation, values, text, ownerType, ownerId, ownerName, advertiserId, campaignId, siteId, zoneId, neverMatches}]} · 404 — No parameter with this id or name. Errors follow the shared conventions.
POST /rest-api/custom-parameters/{parameterId}.do
Update a custom parameter.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
parameterId | path | string | yes | Parameter id or name |
Request body (application/json, required): JSON object with fields allowOtherValues, description, label, listSeparator, name, recordInAnalytics, valueMode, values — Only the fields to change.
Responses: 200 — {parameter, ignoredFields} · 404 — No parameter with this id or name · 409 — Another parameter already has this name. Errors follow the shared conventions.
POST /rest-api/custom-parameters/{parameterId}/delete.do
Delete a custom parameter.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
parameterId | path | string | yes | Parameter id or name |
Responses: 200 — {success} · 404 — No parameter with this id or name. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag