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. Accounts.containers.workspaces.proposal
  3. Built-In Variables
  4. Containers
  5. Environments
  6. Folders
  7. Tags
  8. Triggers
  9. User Permissions
  10. Variables
  11. Version Headers
  12. Versions
  13. Workspaces

Accounts

For Accounts Resource details, see the resource representation page.

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

Accounts.containers.workspaces.proposal

For Accounts.containers.workspaces.proposal Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
create POST  /+parent/proposal Creates a GTM Workspace Proposal.
delete DELETE  /path Deletes a GTM Workspace Proposal.

Built-In Variables

For Built-In Variables Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
create POST  /+parent/built_in_variables Creates one or more GTM Built-In Variables.
delete DELETE  /path Deletes one or more GTM Built-In Variables.
list GET  /+parent/built_in_variables Lists all the enabled Built-In Variables of a GTM Container.
revert POST  /+path/built_in_variables:revert Reverts changes to a GTM Built-In Variables in a GTM Workspace.

Containers

For Containers Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
create POST  /+parent/containers Creates a Container.
delete DELETE  /path Deletes a Container.
get GET  /path Gets a Container.
list GET  /+parent/containers Lists all Containers that belongs to a GTM Account.
update PUT  /path 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/v2, unless otherwise noted
create POST  /+parent/environments Creates a GTM Environment.
delete DELETE  /path Deletes a GTM Environment.
get GET  /path Gets a GTM Environment.
list GET  /+parent/environments Lists all GTM Environments of a GTM Container.
patch PATCH  /path Updates a GTM Environment. This method supports patch semantics.
reauthorize POST  /+path:reauthorize Re-generates the authorization code for a GTM Environment.
update PUT  /path Updates 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/v2, unless otherwise noted
create POST  /+parent/folders Creates a GTM Folder.
delete DELETE  /path Deletes a GTM Folder.
entities POST  /+path:entities List all entities in a GTM Folder.
get GET  /path Gets a GTM Folder.
list GET  /+parent/folders Lists all GTM Folders of a Container.
move_entities_to_folder POST  /+path:move_entities_to_folder Moves entities to a GTM Folder.
revert POST  /+path:revert Reverts changes to a GTM Folder in a GTM Workspace.
update PUT  /path Updates a GTM Folder.

Tags

For Tags Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
create POST  /+parent/tags Creates a GTM Tag.
delete DELETE  /path Deletes a GTM Tag.
get GET  /path Gets a GTM Tag.
list GET  /+parent/tags Lists all GTM Tags of a Container.
revert POST  /+path:revert Reverts changes to a GTM Tag in a GTM Workspace.
update PUT  /path 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/v2, unless otherwise noted
create POST  /+parent/triggers Creates a GTM Trigger.
delete DELETE  /path Deletes a GTM Trigger.
get GET  /path Gets a GTM Trigger.
list GET  /+parent/triggers Lists all GTM Triggers of a Container.
revert POST  /+path:revert Reverts changes to a GTM Trigger in a GTM Workspace.
update PUT  /path Updates a GTM Trigger.

User Permissions

For User Permissions Resource details, see the resource representation page.

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

Variables

For Variables Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
create POST  /+parent/variables Creates a GTM Variable.
delete DELETE  /path Deletes a GTM Variable.
get GET  /path Gets a GTM Variable.
list GET  /+parent/variables Lists all GTM Variables of a Container.
revert POST  /+path:revert Reverts changes to a GTM Variable in a GTM Workspace.
update PUT  /path Updates a GTM Variable.

Version Headers

For Version Headers Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
latest GET  /+parent/version_headers:latest Gets the latest container version header
list GET  /+parent/version_headers Lists all Container Versions of a GTM Container.

Versions

For Versions Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
delete DELETE  /path Deletes a Container Version.
get GET  /path Gets a Container Version.
live GET  /+parent/versions:live Gets the live (i.e. published) container version
publish POST  /+path:publish Publishes a Container Version.
set_latest POST  /+path:set_latest Sets the latest version used for synchronization of workspaces when detecting conflicts and errors.
undelete POST  /+path:undelete Undeletes a Container Version.
update PUT  /path Updates a Container Version.

Workspaces

For Workspaces Resource details, see the resource representation page.

Method HTTP request Description
URIs relative to https://www.googleapis.com/tagmanager/v2, unless otherwise noted
create POST  /+parent/workspaces Creates a Workspace.
create_version POST  /+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  /path Deletes a Workspace.
get GET  /path Gets a Workspace.
getProposal GET  /path Gets a GTM Workspace Proposal.
getStatus GET  /+path/status Finds conflicting and modified entities in the workspace.
list GET  /+parent/workspaces Lists all Workspaces that belong to a GTM Container.
quick_preview POST  /+path:quick_preview Quick previews a workspace by creating a fake container version from all entities in the provided workspace.
resolve_conflict POST  /+path:resolve_conflict Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request.
sync POST  /+path:sync Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities.
update PUT  /path Updates a Workspace.
updateProposal PUT  /path Updates a GTM Workspace Proposal.