Text of vibecode.bitrix24.com › docs › source-storage › delete as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Delete a version — Source storage — Alaio Vibecode

For AI agents: markdown of this page — /docs-content-en/source-storage/delete.md · documentation index — /llms.txt Delete a version DELETE /v1/apps/:id/sources/:versionId Marks the version as deleted. The version cannot be restored via the API — save the sources again if you need them back. A version with the published or manual tag is protected from deletion — first remove the tag via POST /v1/apps/:id/sources/:versionId/tag with the body {"tag": "manual", "action": "remove"} .

The rejection response includes hint.preservedTags — the tag set without the retention tags, which you can pass to PATCH if lifting the protection in a single request is more convenient: PATCH replaces the tag list entirely, so an empty list also wipes your own labels. Parameters Parameter Type Required Description Parameter id (path) Type UUID Required yes Description Application identifier. Get it via GET /v1/apps .

Parameter versionId (path) Type string Required yes Description Version identifier of the form v<N> . Get it via List versions . Examples curl — personal key Terminal curl -X DELETE https://vibecode.bitrix24.com/v1/apps/<APP_ID>/sources/v3 \ -H "X-Api-Key: YOUR_API_KEY" curl — OAuth application Terminal curl -X DELETE https://vibecode.bitrix24.com/v1/apps/<APP_ID>/sources/v3 \ -H "X-Api-Key: YOUR_APP_KEY" \ -H "Authorization: Bearer USER_SESSION_TOKEN" JavaScript — personal key javascript const res = await fetch( `https://vibecode.bitrix24.com/v1/apps/${appId}/sources/v3`, { method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_API_KEY' }, }, ) const { data } = await res.json() console.log('Deleted version:', data.versionId) JavaScript — OAuth application javascript const res = await fetch( `https://vibecode.bitrix24.com/v1/apps/${appId}/sources/v3`, { method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_APP_KEY', 'Authorization': 'Bearer USER_SESSION_TOKEN', }, }, ) const { data } = await res.json() console.log('Deleted version:', data.versionId) Response fields Field Type Description Field success Type boolean Description Always true on success.

Field data.versionId Type string Description Identifier of the deleted version. Response example HTTP 200 : JSON { "success": true, "data": { "versionId": "v3" } } Error response example 409 — the version is protected by a tag: JSON { "success": false, "error": { "code": "PROTECTED_BY_TAG", "message": "Cannot delete: version is tagged manual. Drop the retention tag(s) via PATCH first.", "hint": { "tags": ["manual"], "preservedTags": [], "action": "PATCH /v1/apps/<APP_ID>/sources/v3 with body {\"tags\":[]} to drop the retention tags (preserves any other tags), then re-issue DELETE.", "toolName": "patch-source-metadata" } } } hint.tags lists the retention tags that protect the version, and hint.preservedTags lists the version's tags minus the retention ones: that is the list to send in PATCH to lift the protection without losing your own labels.

Errors HTTP Code Description HTTP 400 Code INVALID_VERSION_ID Description The versionId format does not match v<non-negative integer> . HTTP 403 Code SOURCE_APP_ID_MISMATCH Description 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. HTTP 403 Code NOT_AUTHORIZED Description Only the application author, the application OAuth key, or a Bitrix24 account administrator can manage snapshots.

HTTP 403 Code INFRA_FORBIDDEN_FOR_COWORK_KEY Description 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 . HTTP 404 Code APP_NOT_FOUND Description The application does not exist, was deleted, or belongs to another portal. HTTP 404 Code VERSION_NOT_FOUND Description A version with this versionId does not exist or was already deleted.

HTTP 409 Code PROTECTED_BY_TAG Description The version is marked with the published or manual tag. First remove the tag via PATCH /v1/apps/:id/sources/:versionId . Full list of common API errors — Errors . See also Clear old versions Source code storage Version lifetime and cleanup Version tags and notes List versions Storage