Open documentation ↗Overview
This API allows clients to access and modify container and tag configuration.
Tag Manager API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 52 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Analytics
- Base URL
https://tagmanager.googleapis.com/- Version
- v2
- Endpoints
- 52
- OpenAPI
- Specification ↗
- Spec updated
- 2023-04-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://tagmanager.googleapis.com/tagmanager/v2/accounts" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://tagmanager.googleapis.com/tagmanager/v2/accounts", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://tagmanager.googleapis.com/tagmanager/v2/accounts",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /tagmanager/v2/accounts | Lists all GTM Accounts that a user has access to. |
| GET | /tagmanager/v2/accounts/containers:lookup | Looks up a Container by destination ID. |
| GET | /tagmanager/v2/{parent}/built_in_variables | Lists all the enabled Built-In Variables of a GTM Container. |
| POST | /tagmanager/v2/{parent}/built_in_variables | Creates one or more GTM Built-In Variables. |
| GET | /tagmanager/v2/{parent}/clients | Lists all GTM Clients of a GTM container workspace. |
| POST | /tagmanager/v2/{parent}/clients | Creates a GTM Client. |
| GET | /tagmanager/v2/{parent}/containers | Lists all Containers that belongs to a GTM Account. |
| POST | /tagmanager/v2/{parent}/containers | Creates a Container. |
| GET | /tagmanager/v2/{parent}/destinations | Lists all Destinations linked to a GTM Container. |
| POST | /tagmanager/v2/{parent}/destinations:link | Adds a Destination to this Container and removes it from the Container to which it is currently linked. |
| GET | /tagmanager/v2/{parent}/environments | Lists all GTM Environments of a GTM Container. |
| POST | /tagmanager/v2/{parent}/environments | Creates a GTM Environment. |
| GET | /tagmanager/v2/{parent}/folders | Lists all GTM Folders of a Container. |
| POST | /tagmanager/v2/{parent}/folders | Creates a GTM Folder. |
| GET | /tagmanager/v2/{parent}/gtag_config | Lists all Google tag configs in a Container. |
| POST | /tagmanager/v2/{parent}/gtag_config | Creates a Google tag config. |
| GET | /tagmanager/v2/{parent}/tags | Lists all GTM Tags of a Container. |
| POST | /tagmanager/v2/{parent}/tags | Creates a GTM Tag. |
| GET | /tagmanager/v2/{parent}/templates | Lists all GTM Templates of a GTM container workspace. |
| POST | /tagmanager/v2/{parent}/templates | Creates a GTM Custom Template. |
| GET | /tagmanager/v2/{parent}/triggers | Lists all GTM Triggers of a Container. |
| POST | /tagmanager/v2/{parent}/triggers | Creates a GTM Trigger. |
| 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. |
| POST | /tagmanager/v2/{parent}/user_permissions | Creates a user's Account & Container access. |
| GET | /tagmanager/v2/{parent}/variables | Lists all GTM Variables of a Container. |
| POST | /tagmanager/v2/{parent}/variables | Creates a GTM Variable. |
| GET | /tagmanager/v2/{parent}/version_headers | Lists all Container Versions of a GTM Container. |
| GET | /tagmanager/v2/{parent}/version_headers:latest | Gets the latest container version header |
| GET | /tagmanager/v2/{parent}/versions:live | Gets the live (i.e. published) container version |
| GET | /tagmanager/v2/{parent}/workspaces | Lists all Workspaces that belong to a GTM Container. |
| POST | /tagmanager/v2/{parent}/workspaces | Creates a Workspace. |
| GET | /tagmanager/v2/{parent}/zones | Lists all GTM Zones of a GTM container workspace. |
| POST | /tagmanager/v2/{parent}/zones | Creates a GTM Zone. |
| GET | /tagmanager/v2/{path} | Gets a user's Account & Container access. |
| PUT | /tagmanager/v2/{path} | Updates a user's Account & Container access. |
| DELETE | /tagmanager/v2/{path} | Removes a user from the account, revoking access to it and all of its containers. |
| POST | /tagmanager/v2/{path}/built_in_variables:revert | Reverts changes to a GTM Built-In Variables in a GTM Workspace. |
| GET | /tagmanager/v2/{path}/status | Finds conflicting and modified entities in the workspace. |
| POST | /tagmanager/v2/{path}:combine | Combines Containers. |
| 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. |
| POST | /tagmanager/v2/{path}:entities | List all entities in a GTM Folder. |
| POST | /tagmanager/v2/{path}:move_entities_to_folder | Moves entities to a GTM Folder. |
| POST | /tagmanager/v2/{path}:move_tag_id | Move Tag ID out of a Container. |
| POST | /tagmanager/v2/{path}:publish | Publishes a Container Version. |
| POST | /tagmanager/v2/{path}:quick_preview | Quick previews a workspace by creating a fake container version from all entities in the provided workspace. |
| POST | /tagmanager/v2/{path}:reauthorize | Re-generates the authorization code for a GTM Environment. |
| 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. |
| POST | /tagmanager/v2/{path}:revert | Reverts changes to a GTM Zone in a GTM Workspace. |
| POST | /tagmanager/v2/{path}:set_latest | Sets the latest version used for synchronization of workspaces when detecting conflicts and errors. |
| GET | /tagmanager/v2/{path}:snippet | Gets the tagging snippet for a Container. |
| 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. |
| POST | /tagmanager/v2/{path}:undelete | Undeletes a Container Version. |
Questions
Does the Tag Manager API API need an API key?
Yes. The Tag Manager API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Tag Manager API API support HTTPS?
Yes, the Tag Manager API API is served over HTTPS.
How many endpoints does the Tag Manager API API have?
Its OpenAPI description lists 52 endpoints in version v2. All of them are shown on this page.
What are alternatives to the Tag Manager API API?
Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.
Similar analytics APIs
Compare alternatives →Google Play Integrity API
AnalyticsThe Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
versionhistory.googleapis.com API
AnalyticsVersion History API - Prod
Doc Converter
AnalyticsThis api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)
Perspective Comment Analyzer API
AnalyticsThe Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.
Safe Browsing API
AnalyticsEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Web Fonts Developer API
AnalyticsThe Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
Listed from APIs.guru (CC0).