Tag Manager Triggers

Manage the triggers that fire tags inside a tag manager. Triggers can be unconditional (e.g. PageView fires every page) or condition-gated (e.g. fire only when `event.amount > 100`).

Triggers decide when tags fire. Call GET /rest/v1/tag-manager-triggers/types for the full set of supported type values (e.g. Initialization, PageView, DomReady, AllElementsClick, FormSubmit, CustomEvent) and the per-type parameters schema. Triggers with no extra setup (e.g. a vanilla PageView) take parameters: {}; unknown types and missing required fields are rejected with HTTP 400.

Conditions are evaluated against the runtime context per-trigger and aren't part of the types schema. Send conditions: [] for an unconditional trigger. On PATCH, conditions is replaced wholesale — partial-merge of clause arrays is not supported.

To move a trigger into a folder, use POST /rest/v1/tag-manager-asset-foldersfolderId is read-only on this endpoint.

GET
/rest/v1/tag-manager-triggers
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

limit?|

Maximum number of triggers 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 triggers 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-triggers?tagManagerId=string"
{
  "entities": [
    {
      "id": "string",
      "tagManagerId": "string",
      "accountId": "string",
      "name": "string",
      "type": "string",
      "parameters": {},
      "conditions": [
        {}
      ],
      "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-triggers
*object
object
array<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

curl -X POST "https://app.oursprivacy.com/rest/v1/tag-manager-triggers" \  -H "Content-Type: application/json" \  -d '{    "tagManagerId": "string",    "name": "string",    "type": "string",    "parameters": {},    "conditions": [      {}    ]  }'
{
  "id": "string",
  "tagManagerId": "string",
  "accountId": "string",
  "name": "string",
  "type": "string",
  "parameters": {},
  "conditions": [
    {}
  ],
  "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"
}
GET
/rest/v1/tag-manager-triggers/{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-triggers/string"
{
  "id": "string",
  "tagManagerId": "string",
  "accountId": "string",
  "name": "string",
  "type": "string",
  "parameters": {},
  "conditions": [
    {}
  ],
  "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-triggers/{id}
*object
object
array<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

curl -X PATCH "https://app.oursprivacy.com/rest/v1/tag-manager-triggers/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "tagManagerId": "string",
  "accountId": "string",
  "name": "string",
  "type": "string",
  "parameters": {},
  "conditions": [
    {}
  ],
  "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"
}
DELETE
/rest/v1/tag-manager-triggers/{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-triggers/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-triggers/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-triggers/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
            }
          ]
        }
      ]
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}

How is this guide?