Skip to content
localisyncDocs
Open panel

Archive a branch

Owner/Admin only. Main cannot be archived. Archived branches remain readable, comparable and exportable.

POST /api/v1/workspaces/{workspaceId}/projects/{projectId}/branches/{id}/archive

Operation: archiveBranch · Download OpenAPI

This operation does not use the panel session as its authentication mechanism. Follow the operation-specific checks described above.

session

{
"type": "apiKey",
"in": "cookie",
"name": "__Host-localisync-session"
}
Name Location Required Description
workspaceId path Yes See constraints below.
projectId path Yes See constraints below.
id path Yes See constraints below.
Origin header Yes See constraints below.
X-CSRF-Token header Yes See constraints below.
{
"type": "string",
"format": "uuid"
}
{
"type": "string",
"format": "uuid"
}
{
"type": "string",
"format": "uuid"
}
{
"type": "string",
"format": "uri"
}
{
"type": "string"
}

Required: Yes.

Schema reference: Version.

Field Type Required Constraints / description
version integer Yes minimum: 1; maximum: 2147483646
{
"$ref": "#/components/schemas/Version"
}

Success

Response headers:

{
"Cache-Control": {
"schema": {
"type": "string",
"const": "no-store"
}
}
}

Content type: application/json Schema reference: Branch.

Field Type Required Constraints / description
id string Yes format: "uuid"
workspaceId string Yes format: "uuid"
projectId string Yes format: "uuid"
name string Yes —
isMain boolean Yes —
createdBy string Yes format: "uuid"
creatorEmail string Yes —
sourceBranchId See schema Yes —
sourceBranchName See schema Yes —
version integer Yes minimum: 1; maximum: 2147483646
archivedAt See schema Yes —
createdAt string Yes format: "date-time"
headId See schema Yes —
token string Yes pattern: "^[0-9]+$"
blockers object No Detail responses include deletion blockers. Lists contain up to 25 operations. Assistance jobs are visible to their creator or workspace managers; counts include all unfinished operations and active calls.
{
"$ref": "#/components/schemas/Branch"
}

Invalid request.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Sign in required.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Insufficient current workspace role.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Resource unavailable in this scope.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Version conflict, stale preview or content invariant.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Request limit exceeded.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Service unavailable; success is not implied.

Content type: application/json Schema reference: Error.

Field Type Required Constraints / description
error unauthorized, forbidden, invalid_request, not_found, conflict, rate_limited, unavailable Yes —
message string Yes —
requestId string No —
details object No —
{
"$ref": "#/components/schemas/Error"
}

Request errors and safe retries · Troubleshooting

Cookie preferences

Your choice applies to localisync.com and docs.localisync.com. You can change it at any time using Cookie settings.