[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-source-storage\u002Fmetadata-update":3,"docs-tabs-source-storage\u002Fmetadata-update":6},{"content":4,"lastmod":5},"## Update version metadata\n\n`PATCH \u002Fv1\u002Fapps\u002F:id\u002Fsources\u002F:versionId`\n\nUpdates the tags and the note of an already saved version without re-uploading the archive. Use it when you need to add a tag or adjust a note after the fact.\n\nThe `manual` and `published` tags protect a version from automatic cleanup. The body replaces the tag list and the note wholesale — to set a single tag on its own, use [Set or remove a tag](\u002Fdocs\u002Fsource-storage\u002Fmetadata-tag).\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | UUID | yes | Application identifier. Get it via [`GET \u002Fv1\u002Fapps`](\u002Fdocs\u002Fapps\u002Flist). |\n| `versionId` (path) | string | yes | Version identifier of the form `v\u003CN>`. Get it via [List versions](\u002Fdocs\u002Fsource-storage\u002Fversions). |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `tags` | string[] | no | The new full list of tags. **Replaces** the existing tags entirely. If the field is omitted, the tags are left unchanged. |\n| `note` | string \\| null | no | Note. A string overwrites the current one, and `null` clears the note. If the field is omitted, the note is left unchanged. |\n\nYou can pass only `tags`, only `note`, or both fields at once.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapps\u002F\u003CAPP_ID>\u002Fsources\u002Fv3 \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"tags\": [\"manual\"], \"note\": \"Final version before the release\" }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapps\u002F\u003CAPP_ID>\u002Fsources\u002Fv3 \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"tags\": [\"manual\"], \"note\": \"Final version before the release\" }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch(\n  `https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapps\u002F${appId}\u002Fsources\u002Fv3`,\n  {\n    method: 'PATCH',\n    headers: {\n      'X-Api-Key': 'YOUR_API_KEY',\n      'Content-Type': 'application\u002Fjson',\n    },\n    body: JSON.stringify({ tags: ['manual'], note: 'Final version before the release' }),\n  },\n)\nconst { data } = await res.json()\nconsole.log('Version tags:', data.tags)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch(\n  `https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fapps\u002F${appId}\u002Fsources\u002Fv3`,\n  {\n    method: 'PATCH',\n    headers: {\n      'X-Api-Key': 'YOUR_APP_KEY',\n      'Authorization': 'Bearer USER_SESSION_TOKEN',\n      'Content-Type': 'application\u002Fjson',\n    },\n    body: JSON.stringify({ tags: ['manual'], note: 'Final version before the release' }),\n  },\n)\nconst { data } = await res.json()\nconsole.log('Version tags:', data.tags)\n```\n\nTo clear the note, send `{ \"note\": null }` — the other fields of the version stay untouched.\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | Always `true` on success. |\n| `data.versionId` | string | Version identifier. |\n| `data.tags` | string[] | Version tags after the update. |\n| `data.note` | string \\| null | Version note after the update. |\n\n## Response example\n\n`HTTP 200`:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"versionId\": \"v3\",\n    \"tags\": [\"manual\"],\n    \"note\": \"Final version before the release\"\n  }\n}\n```\n\n## Error response example\n\n404 — there is no version with that identifier:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"VERSION_NOT_FOUND\",\n    \"message\": \"Version v3 not found for app \u003CAPP_ID>\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_METADATA` | The body did not pass validation — invalid tags or field types. |\n| 400 | `INVALID_VERSION_ID` | The `versionId` format does not match `v\u003Cnon-negative integer>`. |\n| 403 | `SOURCE_APP_ID_MISMATCH` | The call was made with an authorization key `vibe_app_…` issued for a different application. Such a key can access only its own application's snapshots, even when both applications were created by the same author. |\n| 403 | `NOT_AUTHORIZED` | Only the application author, the application OAuth key, or a Bitrix24 account administrator can manage snapshots. |\n| 403 | `INFRA_FORBIDDEN_FOR_COWORK_KEY` | The call was made with a Cowork key — such a key works with data only and cannot perform write operations. To issue a key that can, see [Project key for deploy](\u002Fdocs\u002Fcowork\u002Fdeploy-key). |\n| 404 | `APP_NOT_FOUND` | The application does not exist, was deleted, or belongs to another portal. |\n| 404 | `VERSION_NOT_FOUND` | A version with this `versionId` does not exist or was deleted. |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Source code storage](\u002Fdocs\u002Fsource-storage)\n- [List versions](\u002Fdocs\u002Fsource-storage\u002Fversions)\n- [Set or remove a tag](\u002Fdocs\u002Fsource-storage\u002Fmetadata-tag)\n- [Deleting versions](\u002Fdocs\u002Fsource-storage\u002Fdelete)\n- [Version lifetime and cleanup](\u002Fdocs\u002Fsource-storage\u002Fretention)\n- [Save a snapshot](\u002Fdocs\u002Fsource-storage\u002Fsave)\n","2026-11-05",{},1794739605869]