Tag Manager API
This API allows clients to access and modify container and tag configuration.
Developer tools#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
This API allows clients to access and modify container and tag configuration.
Endpoints 56
accounts.user_permissions
- GETGets a user's Account & Container access.
/tagmanager/v2/:pathGets a user's Account & Container access. - PUTUpdates a user's Account & Container access.
/tagmanager/v2/:pathUpdates a user's Account & Container access. - DELETERemoves a user from the account, revoking access to it and all of its containers.
/tagmanager/v2/:pathRemoves a user from the account, revoking access to it and all of its containers. - GETList all users that have access to the account along with Account and Container user access granted to each of them.
/tagmanager/v2/:parent/user_permissions?pageToken=stringList all users that have access to the account along with Account and Container user access granted to each of them. - POSTCreates a user's Account & Container access.
/tagmanager/v2/:parent/user_permissionsCreates a user's Account & Container access.
accounts
- GETLists all GTM Accounts that a user has access to.
/tagmanager/v2/accounts?includeGoogleTags=true&pageToken=stringLists all GTM Accounts that a user has access to.
accounts.containers
- POSTCombines Containers.
/tagmanager/v2/:path:combine?allowUserPermissionFeatureUpdate=true&containerId=string&settingSource=settingSourceUnspecifiedCombines Containers. - GETLists all Containers that belongs to a GTM Account.
/tagmanager/v2/:parent/containers?pageToken=stringLists all Containers that belongs to a GTM Account. - POSTCreates a Container.
/tagmanager/v2/:parent/containersCreates a Container. - GETLooks up a Container by destination ID or tag ID.
/tagmanager/v2/accounts/containers:lookup?destinationId=string&tagId=stringLooks up a Container by destination ID or tag ID. - POSTMove Tag ID out of a Container.
/tagmanager/v2/:path:move_tag_id?allowUserPermissionFeatureUpdate=true©Settings=true©TermsOfService=true©Users=true&tagId=string&tagName=stringMove Tag ID out of a Container. - GETGets the tagging snippet for a Container.
/tagmanager/v2/:path:snippetGets the tagging snippet for a Container.
accounts.containers.destinations
- POSTAdds a Destination to this Container and removes it from the Container to which it is currently linked.
/tagmanager/v2/:parent/destinations:link?allowUserPermissionFeatureUpdate=true&destinationId=stringAdds a Destination to this Container and removes it from the Container to which it is currently linked. - GETLists all Destinations linked to a GTM Container.
/tagmanager/v2/:parent/destinationsLists all Destinations linked to a GTM Container.
accounts.containers.environments
- GETLists all GTM Environments of a GTM Container.
/tagmanager/v2/:parent/environments?pageToken=stringLists all GTM Environments of a GTM Container. - POSTCreates a GTM Environment.
/tagmanager/v2/:parent/environmentsCreates a GTM Environment. - POSTRe-generates the authorization code for a GTM Environment.
/tagmanager/v2/:path:reauthorizeRe-generates the authorization code for a GTM Environment.
accounts.containers.version_headers
- GETGets the latest container version header
/tagmanager/v2/:parent/version_headers:latestGets the latest container version header - GETLists all Container Versions of a GTM Container.
/tagmanager/v2/:parent/version_headers?includeDeleted=true&pageToken=stringLists all Container Versions of a GTM Container.
accounts.containers.versions
- GETGets the live (i.e
/tagmanager/v2/:parent/versions:liveGets the live (i.e. published) container version - POSTPublishes a Container Version.
/tagmanager/v2/:path:publish?fingerprint=stringPublishes a Container Version. - POSTSets the latest version used for synchronization of workspaces when detecting conflicts and errors.
/tagmanager/v2/:path:set_latestSets the latest version used for synchronization of workspaces when detecting conflicts and errors. - POSTUndeletes a Container Version.
/tagmanager/v2/:path:undeleteUndeletes a Container Version.
accounts.containers.workspaces
- POSTApplies multiple entity changes to a workspace in one call
/tagmanager/v2/:path/bulk_updateApplies multiple entity changes to a workspace in one call. When creating new entities, their entity IDs must be unique and in correct format. That is, they… - GETLists all Workspaces that belong to a GTM Container.
/tagmanager/v2/:parent/workspaces?pageToken=stringLists all Workspaces that belong to a GTM Container. - POSTCreates a Workspace.
/tagmanager/v2/:parent/workspacesCreates a Workspace. - POSTCreates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base…
/tagmanager/v2/:path:create_versionCreates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version. - GETFinds conflicting and modified entities in the workspace.
/tagmanager/v2/:path/statusFinds conflicting and modified entities in the workspace. - POSTQuick previews a workspace by creating a fake container version from all entities in the provided workspace.
/tagmanager/v2/:path:quick_previewQuick previews a workspace by creating a fake container version from all entities in the provided workspace. - POSTResolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request.
/tagmanager/v2/:path:resolve_conflict?fingerprint=stringResolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request. - POSTSyncs a workspace to the latest container version by updating all unmodified workspace entities and displaying…
/tagmanager/v2/:path:syncSyncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities.
accounts.containers.workspaces.built_in_variables
- GETLists all the enabled Built-In Variables of a GTM Container.
/tagmanager/v2/:parent/built_in_variables?pageToken=stringLists all the enabled Built-In Variables of a GTM Container. - POSTCreates one or more GTM Built-In Variables.
/tagmanager/v2/:parent/built_in_variables?type=builtInVariableTypeUnspecifiedCreates one or more GTM Built-In Variables. - POSTReverts changes to a GTM Built-In Variables in a GTM Workspace.
/tagmanager/v2/:path/built_in_variables:revert?type=builtInVariableTypeUnspecifiedReverts changes to a GTM Built-In Variables in a GTM Workspace.
accounts.containers.workspaces.clients
- GETLists all GTM Clients of a GTM container workspace.
/tagmanager/v2/:parent/clients?pageToken=stringLists all GTM Clients of a GTM container workspace. - POSTCreates a GTM Client.
/tagmanager/v2/:parent/clientsCreates a GTM Client.
accounts.containers.workspaces.zones
- POSTReverts changes to a GTM Zone in a GTM Workspace.
/tagmanager/v2/:path:revert?fingerprint=stringReverts changes to a GTM Zone in a GTM Workspace. - GETLists all GTM Zones of a GTM container workspace.
/tagmanager/v2/:parent/zones?pageToken=stringLists all GTM Zones of a GTM container workspace. - POSTCreates a GTM Zone.
/tagmanager/v2/:parent/zonesCreates a GTM Zone.
accounts.containers.workspaces.folders
- GETLists all GTM Folders of a Container.
/tagmanager/v2/:parent/folders?pageToken=stringLists all GTM Folders of a Container. - POSTCreates a GTM Folder.
/tagmanager/v2/:parent/foldersCreates a GTM Folder. - POSTList all entities in a GTM Folder.
/tagmanager/v2/:path:entities?pageToken=stringList all entities in a GTM Folder. - POSTMoves entities to a GTM Folder
/tagmanager/v2/:path:move_entities_to_folder?tagId=string&triggerId=string&variableId=stringMoves 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.
accounts.containers.workspaces.gtag_config
- GETLists all Google tag configs in a Container.
/tagmanager/v2/:parent/gtag_config?pageToken=stringLists all Google tag configs in a Container. - POSTCreates a Google tag config.
/tagmanager/v2/:parent/gtag_configCreates a Google tag config.
accounts.containers.workspaces.tags
- GETLists all GTM Tags of a Container.
/tagmanager/v2/:parent/tags?pageToken=stringLists all GTM Tags of a Container. - POSTCreates a GTM Tag.
/tagmanager/v2/:parent/tagsCreates a GTM Tag.
accounts.containers.workspaces.templates
- GETLists all GTM Templates of a GTM container workspace.
/tagmanager/v2/:parent/templates?pageToken=stringLists all GTM Templates of a GTM container workspace. - POSTCreates a GTM Custom Template.
/tagmanager/v2/:parent/templatesCreates a GTM Custom Template. - POSTImports a GTM Custom Template from Gallery.
/tagmanager/v2/:parent/templates:import_from_gallery?acknowledgePermissions=true&galleryOwner=string&galleryRepository=string&gallerySha=stringImports a GTM Custom Template from Gallery.
accounts.containers.workspaces.transformations
- GETLists all GTM Transformations of a GTM container workspace.
/tagmanager/v2/:parent/transformations?pageToken=stringLists all GTM Transformations of a GTM container workspace. - POSTCreates a GTM Transformation.
/tagmanager/v2/:parent/transformationsCreates a GTM Transformation.
accounts.containers.workspaces.triggers
- GETLists all GTM Triggers of a Container.
/tagmanager/v2/:parent/triggers?pageToken=stringLists all GTM Triggers of a Container. - POSTCreates a GTM Trigger.
/tagmanager/v2/:parent/triggersCreates a GTM Trigger.
accounts.containers.workspaces.variables
- GETLists all GTM Variables of a Container.
/tagmanager/v2/:parent/variables?pageToken=stringLists all GTM Variables of a Container. - POSTCreates a GTM Variable.
/tagmanager/v2/:parent/variablesCreates a GTM Variable.
API details
- Base URL
https://tagmanager.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow) with 7 scopes
An API key in the key query parameter - Operations
- 56 operations on 40 pathsPOST 31GET 23PUT 1DELETE 1
- Main resources
- accounts.containers.workspaces 8accounts.containers 6accounts.user_permissions 5accounts.containers.versions 4accounts.containers.workspaces.folders 4accounts.containers.environments 3accounts.containers.workspaces.built_in_variables 3accounts.containers.workspaces.templates 3accounts.containers.workspaces.zones 3accounts.containers.destinations 2
- Response formats
application/json- Description format
- Google API Discovery, API version
v2 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Tag Manager API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Tag Manager API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 7 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Gets a user's Account & Container access.” (GET /tagmanager/v2/:path), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Tag Manager API?
This API allows clients to access and modify container and tag configuration. It is listed under Developer tools and has 56 endpoints.
Who publishes the Tag Manager API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Tag Manager API?
Requests go to https://tagmanager.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Tag Manager API?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 7 scopes; an API key in the key query parameter.
How many endpoints does the Tag Manager API have?
56 operations on 40 paths (31 POST, 23 GET, 1 PUT, 1 DELETE). The largest groups are accounts.containers.workspaces, accounts.containers, accounts.user_permissions, accounts.containers.versions.
Is forking the Tag Manager API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.