Create a container version from a workspace
create_versionCompile a Google Tag Manager workspace into an immutable container version for publishing. The source workspace is replaced; use the returned newWorkspacePath for further edits.
Instructions
Compiles a workspace into an immutable Container Version (the unit that gets published). SIDE EFFECT: the source workspace is DELETED and replaced by a fresh one — the response's newWorkspacePath points to the replacement; use it for any further edits, or old workspace paths will 404. Returns { containerVersion (with containerVersionId and full tag/trigger/variable snapshots), syncStatus, newWorkspacePath }. A compile failure comes back as compilerError=true with HTTP 200 and is reported as an error. Requires the tagmanager.edit.containerversions scope (edit.containers is NOT sufficient).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Version display name. | |
| notes | No | Version notes (changelog entry). | |
| account_id | Yes | GTM account id (string). | |
| container_id | Yes | Container id (string). | |
| workspace_id | Yes | Workspace id (string) to compile. This workspace is deleted afterwards. |