API Reference

This API reference is organized by resource type. Each resource type has one or more data representations and one or more methods.

Resource types

  1. Accounts
  2. Container Versions
  3. Containers
  4. Environments
  5. Environments.reauthorize_environments
  6. Folders
  7. Folders.entities
  8. Folders.move_folders
  9. Permissions
  10. Tags
  11. Triggers
  12. Variables

Accounts

For Accounts Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
get GET  /accounts/accountId Gets a GTM account.
list GET  /accounts Lists all GTM accounts that a user has access to.
update PUT  /accounts/accountId Updates a GTM account.

Container Versions

For Container Versions Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers/containerId/versions Creates a container version.
delete DELETE  /accounts/accountId/containers/containerId/versions/containerVersionId Deletes a container version.
get GET  /accounts/accountId/containers/containerId/versions/containerVersionId Gets a container version.
list GET  /accounts/accountId/containers/containerId/versions Lists all container versions of a GTM container.
publish POST  /accounts/accountId/containers/containerId/versions/containerVersionId/publish Publishes a container version.
restore POST  /accounts/accountId/containers/containerId/versions/containerVersionId/restore Restores a Container Version. This will overwrite the container's current configuration (including its variables, triggers and tags). The operation will not have any effect on the version that is being served (i.e. the published version).
undelete POST  /accounts/accountId/containers/containerId/versions/containerVersionId/undelete Undeletes a container version.
update PUT  /accounts/accountId/containers/containerId/versions/containerVersionId Updates a container version.

Containers

For Containers Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers Creates a container.
delete DELETE  /accounts/accountId/containers/containerId Deletes a container.
get GET  /accounts/accountId/containers/containerId Gets a container.
list GET  /accounts/accountId/containers Lists all containers that belongs to a GTM account.
update PUT  /accounts/accountId/containers/containerId Updates a container.

Environments

For Environments Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers/containerId/environments Creates a GTM Environment.
delete DELETE  /accounts/accountId/containers/containerId/environments/environmentId Deletes a GTM Environment.
get GET  /accounts/accountId/containers/containerId/environments/environmentId Gets a GTM Environment.
list GET  /accounts/accountId/containers/containerId/environments Lists all GTM Environments of a GTM Container.
patch PATCH  /accounts/accountId/containers/containerId/environments/environmentId Updates a GTM Environment. This method supports patch semantics.
update PUT  /accounts/accountId/containers/containerId/environments/environmentId Updates a GTM Environment.

Environments.reauthorize_environments

For Environments.reauthorize_environments Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
update PUT  /accounts/accountId/containers/containerId/reauthorize_environments/environmentId Re-generates the authorization code for a GTM Environment.

Folders

For Folders Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers/containerId/folders Creates a GTM Folder.
delete DELETE  /accounts/accountId/containers/containerId/folders/folderId Deletes a GTM Folder.
get GET  /accounts/accountId/containers/containerId/folders/folderId Gets a GTM Folder.
list GET  /accounts/accountId/containers/containerId/folders Lists all GTM Folders of a Container.
update PUT  /accounts/accountId/containers/containerId/folders/folderId Updates a GTM Folder.

Folders.entities

For Folders.entities Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
list GET  /accounts/accountId/containers/containerId/folders/folderId/entities List all entities in a GTM Folder.

Folders.move_folders

For Folders.move_folders Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
update PUT  /accounts/accountId/containers/containerId/move_folders/folderId Moves entities to a GTM Folder.

Permissions

For Permissions Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/permissions Creates a user's account & container permissions.
delete DELETE  /accounts/accountId/permissions/permissionId Removes a user from the account, revoking access to it and all of its containers.
get GET  /accounts/accountId/permissions/permissionId Gets a user's account & container permissions.
list GET  /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  /accounts/accountId/permissions/permissionId Updates a user's account & container permissions.

Tags

For Tags Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers/containerId/tags Creates a GTM tag.
delete DELETE  /accounts/accountId/containers/containerId/tags/tagId Deletes a GTM tag.
get GET  /accounts/accountId/containers/containerId/tags/tagId Gets a GTM tag.
list GET  /accounts/accountId/containers/containerId/tags Lists all GTM tags of a container.
update PUT  /accounts/accountId/containers/containerId/tags/tagId Updates a GTM tag.

Triggers

For Triggers Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers/containerId/triggers Creates a GTM trigger.
delete DELETE  /accounts/accountId/containers/containerId/triggers/triggerId Deletes a GTM trigger.
get GET  /accounts/accountId/containers/containerId/triggers/triggerId Gets a GTM trigger.
list GET  /accounts/accountId/containers/containerId/triggers Lists all GTM triggers of a container.
update PUT  /accounts/accountId/containers/containerId/triggers/triggerId Updates a GTM trigger.

Variables

For Variables Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v1, unless otherwise noted
create POST  /accounts/accountId/containers/containerId/variables Creates a GTM variable.
delete DELETE  /accounts/accountId/containers/containerId/variables/variableId Deletes a GTM variable.
get GET  /accounts/accountId/containers/containerId/variables/variableId Gets a GTM variable.
list GET  /accounts/accountId/containers/containerId/variables Lists all GTM variables of a container.
update PUT  /accounts/accountId/containers/containerId/variables/variableId Updates a GTM variable.