Google Tag Manager Triggers API

Operations for managing triggers within a workspace that control when tags fire.

OpenAPI Specification

google-tag-manager-triggers-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Tag Manager Accounts Triggers API
  description: The Google Tag Manager API v2 allows clients to access and modify Google Tag Manager account, container, workspace, tag, trigger, and variable configurations. It provides programmatic management of tag deployment, trigger conditions, and variable definitions across web, mobile, and server-side containers.
  version: 2.0.0
  termsOfService: https://policies.google.com/terms
  contact:
    name: Google Support
    url: https://support.google.com/tagmanager
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/terms
servers:
- url: https://tagmanager.googleapis.com
  description: Google Tag Manager API Production Server
security:
- oauth2:
  - tagmanager.readonly
  - tagmanager.edit.containers
  - tagmanager.manage.accounts
  - tagmanager.manage.users
  - tagmanager.publish
  - tagmanager.edit.containerversions
  - tagmanager.delete.containers
tags:
- name: Triggers
  description: Operations for managing triggers within a workspace that control when tags fire.
paths:
  /tagmanager/v2/{parent}/triggers:
    get:
      operationId: listTriggers
      summary: Google Tag Manager List Triggers in a Workspace
      description: Lists all GTM Triggers of a GTM Container Workspace.
      tags:
      - Triggers
      parameters:
      - $ref: '#/components/parameters/parentParam'
      - name: pageToken
        in: query
        description: Continuation token for fetching the next page of results.
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Successful response containing a list of triggers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTriggersResponse'
              examples:
                Listtriggers200Example:
                  summary: Default listTriggers 200 response
                  x-microcks-default: true
                  value:
                    trigger:
                    - path: example_value
                      accountId: '500123'
                      containerId: '500123'
                      workspaceId: '500123'
                      triggerId: '500123'
                      name: Example Title
                      type: eventTypeUnspecified
                      customEventFilter: {}
                      filter: {}
                      autoEventFilter: {}
                      fingerprint: example_value
                      parentFolderId: '500123'
                      tagManagerUrl: https://www.example.com
                      notes: example_value
                      parameter: {}
                    nextPageToken: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createTrigger
      summary: Google Tag Manager Create a Trigger
      description: Creates a GTM Trigger in a GTM Workspace.
      tags:
      - Triggers
      parameters:
      - $ref: '#/components/parameters/parentParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
            examples:
              CreatetriggerRequestExample:
                summary: Default createTrigger request
                x-microcks-default: true
                value:
                  path: example_value
                  accountId: '500123'
                  containerId: '500123'
                  workspaceId: '500123'
                  triggerId: '500123'
                  name: Example Title
                  type: eventTypeUnspecified
                  customEventFilter:
                  - type: conditionTypeUnspecified
                    parameter: {}
                  filter:
                  - type: conditionTypeUnspecified
                    parameter: {}
                  autoEventFilter:
                  - type: conditionTypeUnspecified
                    parameter: {}
                  waitForTags:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  checkValidation:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  waitForTagsTimeout:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  uniqueTriggerId:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  eventName:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  interval:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  limit:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  fingerprint: example_value
                  parentFolderId: '500123'
                  selector:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  intervalSeconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  maxTimerLengthSeconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  verticalScrollPercentageList:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  horizontalScrollPercentageList:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  visibilitySelector:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  visiblePercentageMin:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  visiblePercentageMax:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  continuousTimeMinMilliseconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  totalTimeMinMilliseconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  tagManagerUrl: https://www.example.com
                  notes: example_value
                  parameter:
                  - type: typeUnspecified
                    key: example_value
                    value: example_value
                    list: {}
                    map: {}
                    isWeakReference: true
      responses:
        '200':
          description: Successful response containing the created trigger.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trigger'
              examples:
                Createtrigger200Example:
                  summary: Default createTrigger 200 response
                  x-microcks-default: true
                  value:
                    path: example_value
                    accountId: '500123'
                    containerId: '500123'
                    workspaceId: '500123'
                    triggerId: '500123'
                    name: Example Title
                    type: eventTypeUnspecified
                    customEventFilter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    filter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    autoEventFilter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    waitForTags:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    checkValidation:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    waitForTagsTimeout:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    uniqueTriggerId:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    eventName:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    interval:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    limit:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    fingerprint: example_value
                    parentFolderId: '500123'
                    selector:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    intervalSeconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    maxTimerLengthSeconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    verticalScrollPercentageList:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    horizontalScrollPercentageList:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    visibilitySelector:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    visiblePercentageMin:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    visiblePercentageMax:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    continuousTimeMinMilliseconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    totalTimeMinMilliseconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    tagManagerUrl: https://www.example.com
                    notes: example_value
                    parameter:
                    - type: typeUnspecified
                      key: example_value
                      value: example_value
                      list: {}
                      map: {}
                      isWeakReference: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /tagmanager/v2/{triggerPath}:
    get:
      operationId: getTrigger
      summary: Google Tag Manager Get a Trigger
      description: Gets a GTM Trigger by its resource path.
      tags:
      - Triggers
      parameters:
      - name: triggerPath
        in: path
        required: true
        description: GTM Trigger's API relative path, e.g. accounts/{accountId}/containers/{containerId}/workspaces/{workspaceId}/triggers/{triggerId}.
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Successful response containing the trigger.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trigger'
              examples:
                Gettrigger200Example:
                  summary: Default getTrigger 200 response
                  x-microcks-default: true
                  value:
                    path: example_value
                    accountId: '500123'
                    containerId: '500123'
                    workspaceId: '500123'
                    triggerId: '500123'
                    name: Example Title
                    type: eventTypeUnspecified
                    customEventFilter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    filter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    autoEventFilter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    waitForTags:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    checkValidation:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    waitForTagsTimeout:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    uniqueTriggerId:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    eventName:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    interval:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    limit:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    fingerprint: example_value
                    parentFolderId: '500123'
                    selector:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    intervalSeconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    maxTimerLengthSeconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    verticalScrollPercentageList:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    horizontalScrollPercentageList:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    visibilitySelector:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    visiblePercentageMin:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    visiblePercentageMax:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    continuousTimeMinMilliseconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    totalTimeMinMilliseconds:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - {}
                      isWeakReference: true
                    tagManagerUrl: https://www.example.com
                    notes: example_value
                    parameter:
                    - type: typeUnspecified
                      key: example_value
                      value: example_value
                      list: {}
                      map: {}
                      isWeakReference: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: updateTrigger
      summary: Google Tag Manager Update a Trigger
      description: Updates a GTM Trigger.
      tags:
      - Triggers
      parameters:
      - name: triggerPath
        in: path
        required: true
        description: GTM Trigger's API relative path.
        schema:
          type: string
        example: example_value
      - name: fingerprint
        in: query
        description: When provided, this fingerprint must match the fingerprint of the trigger in storage.
        schema:
          type: string
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
            examples:
              UpdatetriggerRequestExample:
                summary: Default updateTrigger request
                x-microcks-default: true
                value:
                  path: example_value
                  accountId: '500123'
                  containerId: '500123'
                  workspaceId: '500123'
                  triggerId: '500123'
                  name: Example Title
                  type: eventTypeUnspecified
                  customEventFilter:
                  - type: conditionTypeUnspecified
                    parameter: {}
                  filter:
                  - type: conditionTypeUnspecified
                    parameter: {}
                  autoEventFilter:
                  - type: conditionTypeUnspecified
                    parameter: {}
                  waitForTags:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  checkValidation:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  waitForTagsTimeout:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  uniqueTriggerId:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  eventName:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  interval:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  limit:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  fingerprint: example_value
                  parentFolderId: '500123'
                  selector:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  intervalSeconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  maxTimerLengthSeconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  verticalScrollPercentageList:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  horizontalScrollPercentageList:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  visibilitySelector:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  visiblePercentageMin:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  visiblePercentageMax:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  continuousTimeMinMilliseconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  totalTimeMinMilliseconds:
                    type: typeUnspecified
                    key: example_value
                    value: example_value
                    list:
                    - {}
                    map:
                    - {}
                    isWeakReference: true
                  tagManagerUrl: https://www.example.com
                  notes: example_value
                  parameter:
                  - type: typeUnspecified
                    key: example_value
                    value: example_value
                    list: {}
                    map: {}
                    isWeakReference: true
      responses:
        '200':
          description: Successful response containing the updated trigger.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trigger'
              examples:
                Updatetrigger200Example:
                  summary: Default updateTrigger 200 response
                  x-microcks-default: true
                  value:
                    path: example_value
                    accountId: '500123'
                    containerId: '500123'
                    workspaceId: '500123'
                    triggerId: '500123'
                    name: Example Title
                    type: eventTypeUnspecified
                    customEventFilter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    filter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    autoEventFilter:
                    - type: conditionTypeUnspecified
                      parameter: {}
                    waitForTags:
                      type: typeUnspecified
                      key: example_value
                      value: example_value
                      list:
                      - {}
                      map:
                      - 

# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/google-tag-manager/refs/heads/main/openapi/google-tag-manager-triggers-api-openapi.yml