Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/google-tag-manager-workspaces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Google Tag Manager Accounts Workspaces API
description: The Google Tag Manager API v2 allows clients to access and modify Google Tag Manager account, container, workspace, tag, trigger, and variable configurations. It provides programmatic management of tag deployment, trigger conditions, and variable definitions across web, mobile, and server-side containers.
version: 2.0.0
termsOfService: https://policies.google.com/terms
contact:
name: Google Support
url: https://support.google.com/tagmanager
license:
name: Google APIs Terms of Service
url: https://developers.google.com/terms
servers:
- url: https://tagmanager.googleapis.com
description: Google Tag Manager API Production Server
security:
- oauth2:
- tagmanager.readonly
- tagmanager.edit.containers
- tagmanager.manage.accounts
- tagmanager.manage.users
- tagmanager.publish
- tagmanager.edit.containerversions
- tagmanager.delete.containers
tags:
- name: Workspaces
description: Operations for managing workspaces within a container, including version creation and conflict resolution.
paths:
/tagmanager/v2/{parent}/workspaces:
get:
operationId: listWorkspaces
summary: Google Tag Manager List Workspaces in a Container
description: Lists all Workspaces that belong to a GTM Container.
tags:
- Workspaces
parameters:
- $ref: '#/components/parameters/parentParam'
- name: pageToken
in: query
description: Continuation token for fetching the next page of results.
schema:
type: string
example: example_value
responses:
'200':
description: Successful response containing a list of workspaces.
content:
application/json:
schema:
$ref: '#/components/schemas/ListWorkspacesResponse'
examples:
Listworkspaces200Example:
summary: Default listWorkspaces 200 response
x-microcks-default: true
value:
workspace:
- path: example_value
accountId: '500123'
containerId: '500123'
workspaceId: '500123'
name: Example Title
description: A sample description.
fingerprint: example_value
tagManagerUrl: https://www.example.com
nextPageToken: example_value
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
operationId: createWorkspace
summary: Google Tag Manager Create a Workspace
description: Creates a Workspace within a GTM Container.
tags:
- Workspaces
parameters:
- $ref: '#/components/parameters/parentParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
examples:
CreateworkspaceRequestExample:
summary: Default createWorkspace request
x-microcks-default: true
value:
path: example_value
accountId: '500123'
containerId: '500123'
workspaceId: '500123'
name: Example Title
description: A sample description.
fingerprint: example_value
tagManagerUrl: https://www.example.com
responses:
'200':
description: Successful response containing the created workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
examples:
Createworkspace200Example:
summary: Default createWorkspace 200 response
x-microcks-default: true
value:
path: example_value
accountId: '500123'
containerId: '500123'
workspaceId: '500123'
name: Example Title
description: A sample description.
fingerprint: example_value
tagManagerUrl: https://www.example.com
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/tagmanager/v2/{workspacePath}:
get:
operationId: getWorkspace
summary: Google Tag Manager Get a Workspace
description: Gets a Workspace by its resource path.
tags:
- Workspaces
parameters:
- name: workspacePath
in: path
required: true
description: GTM Workspace's API relative path, e.g. accounts/{accountId}/containers/{containerId}/workspaces/{workspaceId}.
schema:
type: string
example: example_value
responses:
'200':
description: Successful response containing the workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
examples:
Getworkspace200Example:
summary: Default getWorkspace 200 response
x-microcks-default: true
value:
path: example_value
accountId: '500123'
containerId: '500123'
workspaceId: '500123'
name: Example Title
description: A sample description.
fingerprint: example_value
tagManagerUrl: https://www.example.com
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
operationId: updateWorkspace
summary: Google Tag Manager Update a Workspace
description: Updates a Workspace.
tags:
- Workspaces
parameters:
- name: workspacePath
in: path
required: true
description: GTM Workspace's API relative path.
schema:
type: string
example: example_value
- name: fingerprint
in: query
description: When provided, this fingerprint must match the fingerprint of the workspace in storage.
schema:
type: string
example: example_value
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
examples:
UpdateworkspaceRequestExample:
summary: Default updateWorkspace request
x-microcks-default: true
value:
path: example_value
accountId: '500123'
containerId: '500123'
workspaceId: '500123'
name: Example Title
description: A sample description.
fingerprint: example_value
tagManagerUrl: https://www.example.com
responses:
'200':
description: Successful response containing the updated workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
examples:
Updateworkspace200Example:
summary: Default updateWorkspace 200 response
x-microcks-default: true
value:
path: example_value
accountId: '500123'
containerId: '500123'
workspaceId: '500123'
name: Example Title
description: A sample description.
fingerprint: example_value
tagManagerUrl: https://www.example.com
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
operationId: deleteWorkspace
summary: Google Tag Manager Delete a Workspace
description: Deletes a Workspace.
tags:
- Workspaces
parameters:
- name: workspacePath
in: path
required: true
description: GTM Workspace's API relative path.
schema:
type: string
example: example_value
responses:
'204':
description: Workspace successfully deleted.
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/tagmanager/v2/{workspacePath}:create_version:
post:
operationId: createWorkspaceVersion
summary: Google Tag Manager Create a Container Version From a Workspace
description: 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.
tags:
- Workspaces
parameters:
- name: workspacePath
in: path
required: true
description: GTM Workspace's API relative path.
schema:
type: string
example: example_value
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateContainerVersionRequestVersionOptions'
examples:
CreateworkspaceversionRequestExample:
summary: Default createWorkspaceVersion request
x-microcks-default: true
value:
name: Example Title
notes: example_value
responses:
'200':
description: Successful response containing the created container version.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateContainerVersionResponse'
examples:
Createworkspaceversion200Example:
summary: Default createWorkspaceVersion 200 response
x-microcks-default: true
value:
containerVersion:
path: example_value
accountId: '500123'
containerId: '500123'
containerVersionId: '500123'
name: Example Title
description: A sample description.
tag:
- {}
trigger:
- {}
variable:
- {}
fingerprint: example_value
tagManagerUrl: https://www.example.com
deleted: true
newWorkspacePath: example_value
compilerError: true
syncStatus:
mergeConflict: true
syncError: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/tagmanager/v2/{workspacePath}/status:
get:
operationId: getWorkspaceStatus
summary: Google Tag Manager Get the Status of a Workspace
description: Finds conflicting and modified entities in the workspace. Returns status information about the workspace including workspace changes and conflicts.
tags:
- Workspaces
parameters:
- name: workspacePath
in: path
required: true
description: GTM Workspace's API relative path.
schema:
type: string
example: example_value
responses:
'200':
description: Successful response containing workspace status.
content:
application/json:
schema:
$ref: '#/components/schemas/GetWorkspaceStatusResponse'
examples:
Getworkspacestatus200Example:
summary: Default getWorkspaceStatus 200 response
x-microcks-default: true
value:
workspaceChange:
- changeStatus: changeStatusUnspecified
mergeConflict:
- {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/tagmanager/v2/{workspacePath}:sync:
post:
operationId: syncWorkspace
summary: Google Tag Manager Sync a Workspace to the Latest Container Version
description: Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities.
tags:
- Workspaces
parameters:
- name: workspacePath
in: path
required: true
description: GTM Workspace's API relative path.
schema:
type: string
example: example_value
responses:
'200':
description: Successful response containing the sync status.
content:
application/json:
schema:
$ref: '#/components/schemas/SyncWorkspaceResponse'
examples:
Syncworkspace200Example:
summary: Default syncWorkspace 200 response
x-microcks-default: true
value:
mergeConflict:
- {}
syncStatus:
mergeConflict: true
syncError: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
Trigger:
type: object
description: Represents a Google Tag Manager Trigger. A trigger defines conditions under which tags should fire, such as page views, clicks, form submissions, or custom events.
properties:
path:
type: string
description: GTM Trigger's API relative path.
readOnly: true
example: example_value
accountId:
type: string
description: GTM Account ID.
readOnly: true
example: '500123'
containerId:
type: string
description: GTM Container ID.
readOnly: true
example: '500123'
workspaceId:
type: string
description: GTM Workspace ID.
readOnly: true
example: '500123'
triggerId:
type: string
description: The Trigger ID uniquely identifies the GTM Trigger.
readOnly: true
example: '500123'
name:
type: string
description: Trigger display name.
example: Example Title
type:
type: string
description: Defines the data layer event that causes this trigger.
enum:
- eventTypeUnspecified
- pageview
- domReady
- windowLoaded
- customEvent
- triggerGroup
- init
- consentInit
- serverPageview
- always
- firebaseAppException
- firebaseAppUpdate
- firebaseCampaign
- firebaseFirstOpen
- firebaseInAppPurchase
- firebaseNotificationDismiss
- firebaseNotificationForeground
- firebaseNotificationOpen
- firebaseNotificationReceive
- firebaseOsUpdate
- firebaseSessionStart
- firebaseUserEngagement
- formSubmission
- click
- linkClick
- jsError
- historyChange
- timer
- ampClick
- ampTimer
- ampScroll
- ampVisibility
- youTubeVideo
- scrollDepth
- elementVisibility
example: eventTypeUnspecified
customEventFilter:
type: array
description: Used in the case of custom event, which is fired if and only if all Conditions are true.
items:
$ref: '#/components/schemas/Condition'
example: []
filter:
type: array
description: The trigger will only fire if and only if all Conditions are true.
items:
$ref: '#/components/schemas/Condition'
example: []
autoEventFilter:
type: array
description: Used in the case of auto event tracking for filtering events.
items:
$ref: '#/components/schemas/Condition'
example: []
waitForTags:
$ref: '#/components/schemas/Parameter'
checkValidation:
$ref: '#/components/schemas/Parameter'
waitForTagsTimeout:
$ref: '#/components/schemas/Parameter'
uniqueTriggerId:
$ref: '#/components/schemas/Parameter'
eventName:
$ref: '#/components/schemas/Parameter'
interval:
$ref: '#/components/schemas/Parameter'
limit:
$ref: '#/components/schemas/Parameter'
fingerprint:
type: string
description: The fingerprint of the GTM Trigger as computed at storage time. This value is recomputed whenever the trigger is modified.
readOnly: true
example: example_value
parentFolderId:
type: string
description: Parent folder ID.
example: '500123'
selector:
$ref: '#/components/schemas/Parameter'
intervalSeconds:
$ref: '#/components/schemas/Parameter'
maxTimerLengthSeconds:
$ref: '#/components/schemas/Parameter'
verticalScrollPercentageList:
$ref: '#/components/schemas/Parameter'
horizontalScrollPercentageList:
$ref: '#/components/schemas/Parameter'
visibilitySelector:
$ref: '#/components/schemas/Parameter'
visiblePercentageMin:
$ref: '#/components/schemas/Parameter'
visiblePercentageMax:
$ref: '#/components/schemas/Parameter'
continuousTimeMinMilliseconds:
$ref: '#/components/schemas/Parameter'
totalTimeMinMilliseconds:
$ref: '#/components/schemas/Parameter'
tagManagerUrl:
type: string
format: uri
description: Auto-generated link to the tag manager UI.
readOnly: true
example: https://www.example.com
notes:
type: string
description: User notes on how to apply this trigger in the container.
example: example_value
parameter:
type: array
description: Additional parameters for the trigger.
items:
$ref: '#/components/schemas/Parameter'
example: []
required:
- name
- type
Tag:
type: object
description: Represents a Google Tag Manager Tag. A tag is a snippet of code that executes on a page when certain conditions (triggers) are met.
properties:
path:
type: string
description: GTM Tag's API relative path.
readOnly: true
example: example_value
accountId:
type: string
description: GTM Account ID.
readOnly: true
example: '500123'
containerId:
type: string
description: GTM Container ID.
readOnly: true
example: '500123'
workspaceId:
type: string
description: GTM Workspace ID.
readOnly: true
example: '500123'
tagId:
type: string
description: The Tag ID uniquely identifies the GTM Tag.
readOnly: true
example: '500123'
name:
type: string
description: Tag display name.
example: Example Title
type:
type: string
description: GTM Tag Type. Common types include ua (Universal Analytics), gaawc (Google Analytics GA4 Configuration), gaawe (Google Analytics GA4 Event), awct (Google Ads Conversion Tracking), sp (Custom Script), html (Custom HTML), img (Custom Image), and flc (Floodlight Counter).
example: example_value
liveOnly:
type: boolean
description: If set to true, this tag will only fire in the live environment (not in preview or debug mode).
example: true
priority:
$ref: '#/components/schemas/Parameter'
notes:
type: string
description: User notes on how to apply this tag in the container.
example: example_value
scheduleStartMs:
type: string
format: int64
description: The start timestamp in milliseconds to schedule a tag. The tag will only fire after this time.
example: example_value
scheduleEndMs:
type: string
format: int64
description: The end timestamp in milliseconds to schedule a tag. The tag will stop firing after this time.
example: example_value
parameter:
type: array
description: The tag's parameters, which configure its behavior.
items:
$ref: '#/components/schemas/Parameter'
example: []
fingerprint:
type: string
description: The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.
readOnly: true
example: example_value
firingTriggerId:
type: array
description: Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false.
items:
type: string
example: '500123'
blockingTriggerId:
type: array
description: Blocking trigger IDs. If any of the listed triggers evaluates to true, the tag will not fire.
items:
type: string
example: '500123'
setupTag:
type: array
description: The list of setup tags. Currently, only one setup tag is allowed per tag.
items:
$ref: '#/components/schemas/SetupTag'
example: []
teardownTag:
type: array
description: The list of teardown tags. Currently, only one teardown tag is allowed per tag.
items:
$ref: '#/components/schemas/TeardownTag'
example: []
parentFolderId:
type: string
description: Parent folder ID.
example: '500123'
tagFiringOption:
type: string
description: Option to fire this tag.
enum:
- tagFiringOptionUnspecified
- unlimited
- oncePerEvent
- oncePerLoad
example: tagFiringOptionUnspecified
tagManagerUrl:
type: string
format: uri
description: Auto-generated link to the tag manager UI.
readOnly: true
example: https://www.example.com
paused:
type: boolean
description: Indicates whether the tag is paused, which prevents the tag from firing.
example: true
monitoringMetadata:
$ref: '#/components/schemas/Parameter'
monitoringMetadataTagNameKey:
type: string
description: If non-empty, then the tag display name will be included in the monitoring metadata map using the key specified.
example: example_value
consentSettings:
$ref: '#/components/schemas/ConsentSettings'
required:
- name
- type
Container:
type: object
description: Represents a Google Tag Manager Container, which is a collection of tags, triggers, and variables used on a website or mobile app.
properties:
path:
type: string
description: GTM Container's API relative path.
readOnly: true
example: example_value
accountId:
type: string
description: GTM Account ID.
readOnly: true
example: '500123'
containerId:
type: string
description: The Container ID uniquely identifies the GTM Container.
readOnly: true
example: '500123'
name:
type: string
description: Container display name.
example: Example Title
domainName:
type: array
description: List of domain names associated with the Container. This is used for auto-event tracking and link decoration.
items:
type: string
example: []
publicId:
type: string
description: Container Public ID (e.g., GTM-XXXX).
readOnly: true
example: '500123'
tagIds:
type: array
description: All Tag IDs that refer to this Container.
items:
type: string
readOnly: true
example: []
notes:
type: string
description: Container Notes.
example: example_value
usageContext:
type: array
description: List of Usage Contexts for the Container. Valid values include web, android, ios, and server.
items:
type: string
enum:
- usageContextUnspecified
- web
- android
- ios
- androidSdk5
- iosSdk5
- amp
- server
example: []
fingerprint:
type: string
description: The fingerprint of the GTM Container as computed at storage time. This value is recomputed whenever the container is modified.
readOnly: true
example: example_value
tagManagerUrl:
type: string
format: uri
description: Auto-generated link to the tag manager UI.
readOnly: true
example: https://www.example.com
taggingServerUrls:
type: array
description: List of server-side container URLs for the Container.
items:
type: string
format: uri
example: https://www.example.com
features:
$ref: '#/components/schemas/ContainerFeatures'
required:
- name
- usageContext
ConsentSettings:
type: object
description: Tag consent settings.
properties:
consentStatus:
type: string
description: The tag's consent status.
enum:
- notSet
- notNeeded
- needed
example: notSet
consentType:
$ref: '#/components/schemas/Parameter'
Workspace:
type: object
description: Represents a Google Tag Manager Workspace. A workspace is an isolated editing environment within a container where changes to tags, triggers, and variables can be made and tested before being published.
properties:
path:
type: string
description: GTM Workspace's API relative path.
readOnly: true
example: example_value
accountId:
type: string
description: GTM Account ID.
readOnly: true
example: '500123'
containerId:
type: string
description: GTM Container ID.
readOnly: true
example: '500123'
workspaceId:
type: string
description: The Workspace ID uniquely identifies the GTM Workspace.
readOnly: true
example: '500123'
name:
type: string
description: Workspace display name.
example: Example Title
description:
type: string
description: Workspace description.
example: A sample description.
fingerprint:
type: string
description: The fingerprint of the GTM Workspace as computed at storage time. This value is recomputed whenever the workspace is modified.
readOnly: true
example: example_value
tagManagerUrl:
type: string
format: uri
description: Auto-generated link to the tag manager UI.
readOnly: true
example: https://www.example.com
required:
- name
FormatValue:
type: object
description: Option to convert a variable value to another value.
properties:
caseConversionType:
type: string
description: The option to convert a string-type variable value to either lowercase or uppercase.
enum:
- none
- lowercase
- uppercase
example: none
convertNullToValue:
$ref: '#/components/schemas/Parameter'
convertUndefinedToValue:
$ref: '#/components/schemas/Parameter'
convertTrueToValue:
$ref: '#/components/schemas/Parameter'
convertFalseToValue:
$ref: '#/components/schemas/Parameter'
ContainerFeatures:
type: object
description: Read-only container feature set.
properties:
supportUserPermissions:
type: boolean
readOnly: true
example: true
supportEnvironments:
type: boolean
readOnly: true
example: true
supportWorkspaces:
type: boolean
readOnly: true
example: true
supportGtagConfigs:
type: boolean
readOnly: true
example: true
supportBuiltInVariables:
type: boolean
readOnly: true
example: true
supportClients:
type: boolean
readOnly: true
example: true
supportFolders:
type: boolean
readOnly: true
example: true
supportTags:
type: boolean
readOnly: true
example: true
supportTemplates:
type: boolean
readOnly: true
example: true
supportTriggers:
type: boolean
readOnly: true
example: true
supportVariables:
type: boolean
readOnly: true
example: true
supportVersions:
type: boolean
readOnly: true
example: true
supportZones:
type: boolean
readOnly: true
example: true
supportTransformations:
type: boolean
readOnly: true
example: true
Variable:
type: object
description: Represents a Google Tag Manager Variable. A variable provides dynamic values that can be used in tags and triggers, such as page URL, click text, or custom JavaScript values.
properties:
path:
type: string
description: GTM Variable's API relative path.
readOnly: true
example: example_value
accountId:
type: string
description: GTM Account ID.
readOnly: true
example: '500123'
containerId:
type: string
description: GTM Container ID.
readOnly: true
example: '500123'
workspaceId:
type: string
description: GTM Workspace ID.
readOnly: true
example: '500123'
variableId:
type: string
description: The Variable ID uniquely identifies the GTM Variable.
readOnly: true
example: '500123'
name:
type: string
description: Variable display name.
example: Example Title
type:
type: string
description: GTM Variable Type. Common types include v (Data Layer Variable), j (1st Party Cookie), k (Custom JavaScript), jsm (Custom JavaScript Variable), u (URL), c (Constant), and e (DOM Element).
example: example_value
notes:
type: string
description: User notes on how to apply this variable in the container.
example: example_value
scheduleStartMs:
type: string
format: int64
description: The start timestamp in milliseconds to schedule a variable.
example: example_value
scheduleEndMs:
type: string
format: int64
description: The end timestamp in milliseconds to schedule a variable.
example: example_value
parameter:
type: array
description: The variable's parameters, which configure its behavior.
items:
$ref: '#/components/schemas/Parameter'
example: []
enablingTriggerId:
type: array
description: For mobile containers only. A list of trigger IDs for enabling conditional variables. The variable is enabled if one of the enabling triggers is true while all of the disabling triggers are false.
# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/google-tag-manager/refs/heads/main/openapi/google-tag-manager-workspaces-api-openapi.yml