Tag Manager API

This API allows clients to access and modify container and tag configuration.

Service: tagmanager.googleapis.com

To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

Discovery document

A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:

Service endpoint

A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://tagmanager.googleapis.com

REST Resource: v2.accounts

Methods
get GET /tagmanager/v2/{path}
Gets a GTM Account.
list GET /tagmanager/v2/accounts
Lists all GTM Accounts that a user has access to.
update PUT /tagmanager/v2/{path}
Updates a GTM Account.

REST Resource: v2.accounts.containers

Methods
combine POST /tagmanager/v2/{path}:combine
Combines Containers.
create POST /tagmanager/v2/{parent}/containers
Creates a Container.
delete DELETE /tagmanager/v2/{path}
Deletes a Container.
get GET /tagmanager/v2/{path}
Gets a Container.
list GET /tagmanager/v2/{parent}/containers
Lists all Containers that belongs to a GTM Account.
lookup GET /tagmanager/v2/accounts/containers:lookup
Looks up a Container by destination ID or tag ID.
move_tag_id POST /tagmanager/v2/{path}:move_tag_id
Move Tag ID out of a Container.
snippet GET /tagmanager/v2/{path}:snippet
Gets the tagging snippet for a Container.
update PUT /tagmanager/v2/{path}
Updates a Container.

REST Resource: v2.accounts.containers.destinations

Methods
get GET /tagmanager/v2/{path}
Gets a Destination.
link POST /tagmanager/v2/{parent}/destinations:link
Adds a Destination to this Container and removes it from the Container to which it is currently linked.
list GET /tagmanager/v2/{parent}/destinations
Lists all Destinations linked to a GTM Container.

REST Resource: v2.accounts.containers.environments

Methods
create POST /tagmanager/v2/{parent}/environments
Creates a GTM Environment.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Environment.
get GET /tagmanager/v2/{path}
Gets a GTM Environment.
list GET /tagmanager/v2/{parent}/environments
Lists all GTM Environments of a GTM Container.
reauthorize POST /tagmanager/v2/{path}:reauthorize
Re-generates the authorization code for a GTM Environment.
update PUT /tagmanager/v2/{path}
Updates a GTM Environment.

REST Resource: v2.accounts.containers.version_headers

Methods
latest GET /tagmanager/v2/{parent}/version_headers:latest
Gets the latest container version header
list GET /tagmanager/v2/{parent}/version_headers
Lists all Container Versions of a GTM Container.

REST Resource: v2.accounts.containers.versions

Methods
delete DELETE /tagmanager/v2/{path}
Deletes a Container Version.
get GET /tagmanager/v2/{path}
Gets a Container Version.
live GET /tagmanager/v2/{parent}/versions:live
Gets the live (i.e.
publish POST /tagmanager/v2/{path}:publish
Publishes a Container Version.
set_latest POST /tagmanager/v2/{path}:set_latest
Sets the latest version used for synchronization of workspaces when detecting conflicts and errors.
undelete POST /tagmanager/v2/{path}:undelete
Undeletes a Container Version.
update PUT /tagmanager/v2/{path}
Updates a Container Version.

REST Resource: v2.accounts.containers.workspaces

Methods
create POST /tagmanager/v2/{parent}/workspaces
Creates a Workspace.
create_version POST /tagmanager/v2/{path}:create_version
Creates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version.
delete DELETE /tagmanager/v2/{path}
Deletes a Workspace.
get GET /tagmanager/v2/{path}
Gets a Workspace.
getStatus GET /tagmanager/v2/{path}/status
Finds conflicting and modified entities in the workspace.
list GET /tagmanager/v2/{parent}/workspaces
Lists all Workspaces that belong to a GTM Container.
quick_preview POST /tagmanager/v2/{path}:quick_preview
Quick previews a workspace by creating a fake container version from all entities in the provided workspace.
resolve_conflict POST /tagmanager/v2/{path}:resolve_conflict
Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request.
sync POST /tagmanager/v2/{path}:sync
Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities.
update PUT /tagmanager/v2/{path}
Updates a Workspace.

REST Resource: v2.accounts.containers.workspaces.built_in_variables

Methods
create POST /tagmanager/v2/{parent}/built_in_variables
Creates one or more GTM Built-In Variables.
delete DELETE /tagmanager/v2/{path}
Deletes one or more GTM Built-In Variables.
list GET /tagmanager/v2/{parent}/built_in_variables
Lists all the enabled Built-In Variables of a GTM Container.
revert POST /tagmanager/v2/{path}/built_in_variables:revert
Reverts changes to a GTM Built-In Variables in a GTM Workspace.

REST Resource: v2.accounts.containers.workspaces.clients

Methods
create POST /tagmanager/v2/{parent}/clients
Creates a GTM Client.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Client.
get GET /tagmanager/v2/{path}
Gets a GTM Client.
list GET /tagmanager/v2/{parent}/clients
Lists all GTM Clients of a GTM container workspace.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Client in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Client.

REST Resource: v2.accounts.containers.workspaces.folders

Methods
create POST /tagmanager/v2/{parent}/folders
Creates a GTM Folder.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Folder.
entities POST /tagmanager/v2/{path}:entities
List all entities in a GTM Folder.
get GET /tagmanager/v2/{path}
Gets a GTM Folder.
list GET /tagmanager/v2/{parent}/folders
Lists all GTM Folders of a Container.
move_entities_to_folder POST /tagmanager/v2/{path}:move_entities_to_folder
Moves entities to a GTM Folder.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Folder in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Folder.

REST Resource: v2.accounts.containers.workspaces.gtag_config

Methods
create POST /tagmanager/v2/{parent}/gtag_config
Creates a Google tag config.
delete DELETE /tagmanager/v2/{path}
Deletes a Google tag config.
get GET /tagmanager/v2/{path}
Gets a Google tag config.
list GET /tagmanager/v2/{parent}/gtag_config
Lists all Google tag configs in a Container.
update PUT /tagmanager/v2/{path}
Updates a Google tag config.

REST Resource: v2.accounts.containers.workspaces.tags

Methods
create POST /tagmanager/v2/{parent}/tags
Creates a GTM Tag.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Tag.
get GET /tagmanager/v2/{path}
Gets a GTM Tag.
list GET /tagmanager/v2/{parent}/tags
Lists all GTM Tags of a Container.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Tag in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Tag.

REST Resource: v2.accounts.containers.workspaces.templates

Methods
create POST /tagmanager/v2/{parent}/templates
Creates a GTM Custom Template.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Template.
get GET /tagmanager/v2/{path}
Gets a GTM Template.
import_from_gallery POST /tagmanager/v2/{parent}/templates:import_from_gallery
Imports a GTM Custom Template from Gallery.
list GET /tagmanager/v2/{parent}/templates
Lists all GTM Templates of a GTM container workspace.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Template in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Template.

REST Resource: v2.accounts.containers.workspaces.transformations

Methods
create POST /tagmanager/v2/{parent}/transformations
Creates a GTM Transformation.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Transformation.
get GET /tagmanager/v2/{path}
Gets a GTM Transformation.
list GET /tagmanager/v2/{parent}/transformations
Lists all GTM Transformations of a GTM container workspace.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Transformation in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Transformation.

REST Resource: v2.accounts.containers.workspaces.triggers

Methods
create POST /tagmanager/v2/{parent}/triggers
Creates a GTM Trigger.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Trigger.
get GET /tagmanager/v2/{path}
Gets a GTM Trigger.
list GET /tagmanager/v2/{parent}/triggers
Lists all GTM Triggers of a Container.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Trigger in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Trigger.

REST Resource: v2.accounts.containers.workspaces.variables

Methods
create POST /tagmanager/v2/{parent}/variables
Creates a GTM Variable.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Variable.
get GET /tagmanager/v2/{path}
Gets a GTM Variable.
list GET /tagmanager/v2/{parent}/variables
Lists all GTM Variables of a Container.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Variable in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Variable.

REST Resource: v2.accounts.containers.workspaces.zones

Methods
create POST /tagmanager/v2/{parent}/zones
Creates a GTM Zone.
delete DELETE /tagmanager/v2/{path}
Deletes a GTM Zone.
get GET /tagmanager/v2/{path}
Gets a GTM Zone.
list GET /tagmanager/v2/{parent}/zones
Lists all GTM Zones of a GTM container workspace.
revert POST /tagmanager/v2/{path}:revert
Reverts changes to a GTM Zone in a GTM Workspace.
update PUT /tagmanager/v2/{path}
Updates a GTM Zone.

REST Resource: v2.accounts.user_permissions

Methods
create POST /tagmanager/v2/{parent}/user_permissions
Creates a user's Account & Container access.
delete DELETE /tagmanager/v2/{path}
Removes a user from the account, revoking access to it and all of its containers.
get GET /tagmanager/v2/{path}
Gets a user's Account & Container access.
list GET /tagmanager/v2/{parent}/user_permissions
List all users that have access to the account along with Account and Container user access granted to each of them.
update PUT /tagmanager/v2/{path}
Updates a user's Account & Container access.

REST Resource: v1.accounts

Methods
get GET /tagmanager/v1/accounts/{accountId}
Gets a GTM Account.
list GET /tagmanager/v1/accounts
Lists all GTM Accounts that a user has access to.
update PUT /tagmanager/v1/accounts/{accountId}
Updates a GTM Account.

REST Resource: v1.accounts.containers

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers
Creates a Container.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}
Deletes a Container.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}
Gets a Container.
list GET /tagmanager/v1/accounts/{accountId}/containers
Lists all Containers that belongs to a GTM Account.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}
Updates a Container.

REST Resource: v1.accounts.containers.environments

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments
Creates a GTM Environment.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}
Deletes a GTM Environment.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}
Gets a GTM Environment.
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments
Lists all GTM Environments of a GTM Container.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}
Updates a GTM Environment.

REST Resource: v1.accounts.containers.folders

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders
Creates a GTM Folder.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}
Deletes a GTM Folder.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}
Gets a GTM Folder.
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders
Lists all GTM Folders of a Container.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}
Updates a GTM Folder.

REST Resource: v1.accounts.containers.folders.entities

Methods
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities
List all entities in a GTM Folder.

REST Resource: v1.accounts.containers.move_folders

Methods
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId}
Moves entities to a GTM Folder.

REST Resource: v1.accounts.containers.reauthorize_environments

Methods
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}
Re-generates the authorization code for a GTM Environment.

REST Resource: v1.accounts.containers.tags

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags
Creates a GTM Tag.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}
Deletes a GTM Tag.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}
Gets a GTM Tag.
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags
Lists all GTM Tags of a Container.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}
Updates a GTM Tag.

REST Resource: v1.accounts.containers.triggers

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers
Creates a GTM Trigger.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}
Deletes a GTM Trigger.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}
Gets a GTM Trigger.
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers
Lists all GTM Triggers of a Container.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}
Updates a GTM Trigger.

REST Resource: v1.accounts.containers.variables

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables
Creates a GTM Variable.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}
Deletes a GTM Variable.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}
Gets a GTM Variable.
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables
Lists all GTM Variables of a Container.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}
Updates a GTM Variable.

REST Resource: v1.accounts.containers.versions

Methods
create POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions
Creates a Container Version.
delete DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}
Deletes a Container Version.
get GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}
Gets a Container Version.
list GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions
Lists all Container Versions of a GTM Container.
publish POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish
Publishes a Container Version.
restore POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore
Restores a Container Version.
undelete POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete
Undeletes a Container Version.
update PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}
Updates a Container Version.

REST Resource: v1.accounts.permissions

Methods
create POST /tagmanager/v1/accounts/{accountId}/permissions
Creates a user's Account & Container Permissions.
delete DELETE /tagmanager/v1/accounts/{accountId}/permissions/{permissionId}
Removes a user from the account, revoking access to it and all of its containers.
get GET /tagmanager/v1/accounts/{accountId}/permissions/{permissionId}
Gets a user's Account & Container Permissions.
list GET /tagmanager/v1/accounts/{accountId}/permissions
List all users that have access to the account along with Account and Container Permissions granted to each of them.
update PUT /tagmanager/v1/accounts/{accountId}/permissions/{permissionId}
Updates a user's Account & Container Permissions.