This API reference is organized by resource type. Each resource type has one or more data representations and one or more methods.
Resource types
- Accounts
- Built-In Variables
- Clients
- Containers
- Destinations
- Environments
- Folders
- Google Tag Configuration
- Tags
- Templates
- Transformations
- Triggers
- User Permissions
- Variables
- Version Headers
- Versions
- Workspaces
- Zones
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. |
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. |
Clients
For Clients 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/clients
|
Creates a GTM Client. |
delete |
DELETE /path
|
Deletes a GTM Client. |
get |
GET /path
|
Gets a GTM Client. |
list |
GET /+parent/clients
|
Lists all GTM Clients of a GTM container workspace. |
revert |
POST /+path:revert
|
Reverts changes to a GTM Client in a GTM Workspace. |
update |
PUT /path
|
Updates a GTM Client. |
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 | ||
combine |
POST /+path:combine
|
Combines Containers. |
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. |
lookup |
GET /accounts/containers:lookup
|
Looks up a Container by destination ID or tag ID. |
move_tag_id |
POST /+path:move_tag_id
|
Move Tag ID out of a Container. |
snippet |
GET /+path:snippet
|
Gets the tagging snippet for a Container. |
update |
PUT /path
|
Updates a Container. |
Destinations
For Destinations 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 Destination. |
link |
POST /+parent/destinations:link
|
Adds a Destination to this Container and removes it from the Container to which it is currently linked. |
list |
GET /+parent/destinations
|
Lists all Destinations linked to a GTM 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. |
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. If {folder_id} in the request path equals 0, this will instead move entities out of the folder they currently belong to. |
revert |
POST /+path:revert
|
Reverts changes to a GTM Folder in a GTM Workspace. |
update |
PUT /path
|
Updates a GTM Folder. |
Google Tag Configuration
For Google Tag Configuration 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/gtag_config
|
Creates a Google tag config. |
delete |
DELETE /path
|
Deletes a Google tag config. |
get |
GET /path
|
Gets a Google tag config. |
list |
GET /+parent/gtag_config
|
Lists all Google tag configs in a Container. |
update |
PUT /path
|
Updates a Google tag config. |
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. |
Templates
For Templates 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/templates
|
Creates a GTM Custom Template. |
delete |
DELETE /path
|
Deletes a GTM Template. |
get |
GET /path
|
Gets a GTM Template. |
list |
GET /+parent/templates
|
Lists all GTM Templates of a GTM container workspace. |
revert |
POST /+path:revert
|
Reverts changes to a GTM Template in a GTM Workspace. |
update |
PUT /path
|
Updates a GTM Template. |
Transformations
For Transformations 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/transformations
|
Creates a GTM Transformation. |
delete |
DELETE /path
|
Deletes a GTM Transformation. |
get |
GET /path
|
Gets a GTM Transformation. |
list |
GET /+parent/transformations
|
Lists all GTM Transformations of a GTM container workspace. |
revert |
POST /+path:revert
|
Reverts changes to a GTM Transformation in a GTM Workspace. |
update |
PUT /path
|
Updates a GTM Transformation. |
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. |
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. |
Zones
For Zones 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/zones
|
Creates a GTM Zone. |
delete |
DELETE /path
|
Deletes a GTM Zone. |
get |
GET /path
|
Gets a GTM Zone. |
list |
GET /+parent/zones
|
Lists all GTM Zones of a GTM container workspace. |
revert |
POST /+path:revert
|
Reverts changes to a GTM Zone in a GTM Workspace. |
update |
PUT /path
|
Updates a GTM Zone. |