Tag Manager Variables

Manage reusable variables that tags and triggers reference inside a tag manager — data-layer lookups, constants, lookup tables, and derived values. Variable names must be unique within a tag manager.

Variables are reusable lookups that tags and triggers reference instead of hardcoding values. Call GET /rest/v1/tag-manager-variables/types for the full set of supported type values (DataLayer, Constant, UrlParameter, Cookie, JavaScript, etc.) and the per-type parameters schema.

  • parameters — type-specific configuration. Unknown types and missing required fields are rejected with HTTP 400.
  • defaultValue — value returned when no rule matches. Optional; type-dependent.
  • lookUpTable — optional JSON payload for LookUpTable-style variables.
  • Variable names are unique within a tag manager. Name collisions return HTTP 409 with the reason in the response error field.
  • folderId is read-only on this endpoint. Use the GraphQL assignTagManagerAssetToFolder mutation to change folder membership.
  • For variable types where supportsVariables is true, the variable's own parameters fields can contain {{OtherVariable}} references that resolve at runtime.
GET
/rest/v1/tag-manager-variables
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

limit?|

Maximum number of variables to return. Defaults to 25; values below 1 are clamped to 1 and values above 1000 are clamped to 1000. The web-app passes 1000 to render the full workspace in one request.

cursor?string

Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.

tagManagerId*string

Parent tag manager whose variables should be returned.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/tag-manager-variables?tagManagerId=string"
{
  "entities": [
    {
      "id": "string",
      "tagManagerId": "string",
      "accountId": "string",
      "name": "string",
      "type": "string",
      "Variable": "string",
      "parameters": {},
      "defaultValue": {},
      "lookUpTable": {},
      "enabled": true,
      "folderId": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/tag-manager-variables
*object
object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/tag-manager-variables" \  -H "Content-Type: application/json" \  -d '{    "tagManagerId": "string",    "name": "string",    "type": "string",    "Variable": "string",    "parameters": {}  }'
{
  "id": "string",
  "tagManagerId": "string",
  "accountId": "string",
  "name": "string",
  "type": "string",
  "Variable": "string",
  "parameters": {},
  "defaultValue": {},
  "lookUpTable": {},
  "enabled": true,
  "folderId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
GET
/rest/v1/tag-manager-variables/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/tag-manager-variables/string"
{
  "id": "string",
  "tagManagerId": "string",
  "accountId": "string",
  "name": "string",
  "type": "string",
  "Variable": "string",
  "parameters": {},
  "defaultValue": {},
  "lookUpTable": {},
  "enabled": true,
  "folderId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
PATCH
/rest/v1/tag-manager-variables/{id}
*object
object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://app.oursprivacy.com/rest/v1/tag-manager-variables/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "tagManagerId": "string",
  "accountId": "string",
  "name": "string",
  "type": "string",
  "Variable": "string",
  "parameters": {},
  "defaultValue": {},
  "lookUpTable": {},
  "enabled": true,
  "folderId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
DELETE
/rest/v1/tag-manager-variables/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://app.oursprivacy.com/rest/v1/tag-manager-variables/string"
{
  "id": "string",
  "deleted": true
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
GET
/rest/v1/tag-manager-variables/types
AuthorizationBearer <token>

Ours Privacy API key

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/tag-manager-variables/types"
{
  "entities": [
    {
      "id": "string",
      "name": "string",
      "category": "string",
      "description": "string",
      "fields": [
        {
          "id": "string",
          "type": "STRING",
          "title": "string",
          "description": "string",
          "required": true,
          "default": {},
          "availableValues": [
            {
              "value": "string",
              "label": "string"
            }
          ],
          "allowedKeys": [
            "string"
          ],
          "validators": [
            {
              "type": "NotEmpty",
              "min": 0,
              "max": 0
            }
          ]
        }
      ],
      "supportsVariables": true
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}

How is this guide?