Outcome
Copy an earlier snapshot into the kit’s working draft.
Before you start
- Verify whoami and the pinned credential context, then inspect the exact discovered action before preparing input.
- Discover a granted Brand workspace. Pass its resourceType/workspace identifier separately from input; a copied fixture identifier grants no access.
- The declared permission is brand:write. The active credential, application scope, resource binding and runtime authority must all authorize the request.
- Review the exact mutation and recovery, including destructive scope, and execute only after the intended effect is authorized.
Discover the target
topolo whoami --json
topolo actions get app_topolo_brand.brand_kit_versions.restore --detail --json
topolo resources topolo-brand --json
topolo workspaces list topolo-brand --json
Request
POST /api/brand-kits/{brandKitId}/versions/{versionId}/restore
Resource context is the selected Brand workspace. CLI/SDK action input includes path identifiers; direct HTTP JSON bodies exclude path parameters. Read the reviewed plan for the exact request.
Input fields
| Field | Required | Meaning |
|---|---|---|
brandKitId | Yes | Brand kit identifier in the verified Brand workspace. Read brand_kits.list before selecting it. |
versionId | Yes | Exact version identifier from brand_kit_versions.list for brandKitId; not the numeric version. |
Exact published input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"brandKitId": {
"type": "string",
"minLength": 1,
"description": "Brand kit identifier in the verified Brand workspace. Read brand_kits.list before selecting it."
},
"versionId": {
"type": "string",
"minLength": 1,
"description": "Exact version identifier from brand_kit_versions.list for brandKitId; not the numeric version."
}
},
"required": [
"brandKitId",
"versionId"
],
"additionalProperties": false
}
Effects
Requires an active kit. Replaces the existing draft snapshot when one exists, otherwise creates a new draft, sets a restoration note and records source-version provenance in audit metadata. The historical source version is unchanged.
Interpret the response
version identifies the destination draft, which may reuse an existing draft identifier. Restore does not republish or reactivate the source. Capture an existing working draft before replacing it.
Response identifier contract:
{
"kind": "brand_kit_version",
"identifierSource": "response",
"idPath": "$.version.id"
}
Worked examples
These complete synthetic responses were captured from the local worker over canonical SQL migrations. Auth and R2 dependencies are simulated; notification delivery is not exercised. Set BRAND_WORKSPACE_ID from granted workspace discovery. Save reviewed input as payload.json, validate and inspect the unchanged plan. The final mutation command and MCP confirm flag assume the intended effect has already been authorized.
Minimal example
Input · payload.json:
{
"brandKitId": "brand_c794be50-0306-4933-8de8-5609340bed9e",
"versionId": "brand_version_5d0eb310-87f0-4a81-9f27-11240da457e6"
}
CLI:
topolo actions validate app_topolo_brand.brand_kit_versions.restore --data @payload.json --json
topolo actions plan app_topolo_brand.brand_kit_versions.restore --resource-type workspace --resource-id "$BRAND_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_brand.brand_kit_versions.restore --resource-type workspace --resource-id "$BRAND_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_brand.brand_kit_versions.restore",
"input": {
"brandKitId": "brand_c794be50-0306-4933-8de8-5609340bed9e",
"versionId": "brand_version_5d0eb310-87f0-4a81-9f27-11240da457e6"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"version": {
"id": "brand_version_e03a22ea-3d96-491b-8a09-d868a7b1d7b8",
"brandKitId": "brand_c794be50-0306-4933-8de8-5609340bed9e",
"version": 2,
"status": "draft",
"snapshot": {
"identity": {
"displayName": "Fixture identity",
"shortDescription": "The next generation of software.",
"domains": [
"topolo.io"
],
"locales": [
"en"
]
},
"visual": {
"logos": {
"primaryAssetId": "brand_asset_dd192c95-76da-4c2e-a61c-8b164686806b"
},
"palette": {
"primary": "#111827",
"secondary": "#E5E7EB",
"accent": "#F97316",
"background": "#FFFFFF",
"foreground": "#111827",
"semantic": {}
},
"typography": {
"heading": {
"family": "Inter",
"weights": [
700
],
"fallback": [
"sans-serif"
]
},
"body": {
"family": "Inter",
"weights": [
400,
600
],
"fallback": [
"sans-serif"
]
}
},
"layout": {
"radius": 16,
"spacingScale": [
4,
8,
16
],
"logoPlacement": "top-left"
},
"imagery": {
"direction": "Bold, graphic, product-led.",
"avoid": [
"generic stock photography"
]
}
},
"verbal": {
"positioning": "Enterprise-grade software without enterprise-era waste.",
"audiences": [
"small businesses"
],
"valuePropositions": [
"One connected software ecosystem"
],
"tone": [
"bold",
"direct"
],
"do": [
"Use specific proof"
],
"dont": [
"Use unsupported superlatives"
],
"bannedTerms": [
"guaranteed riches"
]
},
"claims": [],
"ctas": [],
"assets": [
{
"id": "brand_asset_dd192c95-76da-4c2e-a61c-8b164686806b",
"kind": "logo",
"name": "Fixture logo",
"url": "/api/brand-assets/brand_asset_dd192c95-76da-4c2e-a61c-8b164686806b/content",
"mimeType": "image/svg+xml"
}
],
"accessibility": {
"minimumContrast": 4.5,
"requireAltText": true,
"reducedMotion": true
},
"legal": {
"requiredDisclosures": [],
"prohibitedTopics": []
}
},
"changeNote": "Restored from version 1",
"createdAt": "2026-10-03T11:23:59.094Z",
"updatedAt": "2026-10-03T11:23:59.094Z",
"publishedAt": null
}
}
version identifies the destination draft, which may reuse an existing draft identifier. Restore does not republish or reactivate the source. Capture an existing working draft before replacing it.
Workflow example
Input · payload.json:
{
"brandKitId": "brand_55886012-13a4-4e95-ad31-3fe2b52cdf20",
"versionId": "brand_version_d00e1d23-0626-418b-ba5c-e9c02b746293"
}
CLI:
topolo actions validate app_topolo_brand.brand_kit_versions.restore --data @payload.json --json
topolo actions plan app_topolo_brand.brand_kit_versions.restore --resource-type workspace --resource-id "$BRAND_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_brand.brand_kit_versions.restore --resource-type workspace --resource-id "$BRAND_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_brand.brand_kit_versions.restore",
"input": {
"brandKitId": "brand_55886012-13a4-4e95-ad31-3fe2b52cdf20",
"versionId": "brand_version_d00e1d23-0626-418b-ba5c-e9c02b746293"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"version": {
"id": "brand_version_5b7e9b88-e616-4797-aef7-1c5bd094eeed",
"brandKitId": "brand_55886012-13a4-4e95-ad31-3fe2b52cdf20",
"version": 2,
"status": "draft",
"snapshot": {
"identity": {
"displayName": "Fixture identity",
"shortDescription": "The next generation of software.",
"domains": [
"topolo.io"
],
"locales": [
"en"
]
},
"visual": {
"logos": {
"primaryAssetId": "brand_asset_87bffee4-7249-419b-b4c1-8edeeb732d55"
},
"palette": {
"primary": "#111827",
"secondary": "#E5E7EB",
"accent": "#F97316",
"background": "#FFFFFF",
"foreground": "#111827",
"semantic": {}
},
"typography": {
"heading": {
"family": "Inter",
"weights": [
700
],
"fallback": [
"sans-serif"
]
},
"body": {
"family": "Inter",
"weights": [
400,
600
],
"fallback": [
"sans-serif"
]
}
},
"layout": {
"radius": 16,
"spacingScale": [
4,
8,
16
],
"logoPlacement": "top-left"
},
"imagery": {
"direction": "Bold, graphic, product-led.",
"avoid": [
"generic stock photography"
]
}
},
"verbal": {
"positioning": "Enterprise-grade software without enterprise-era waste.",
"audiences": [
"small businesses"
],
"valuePropositions": [
"One connected software ecosystem"
],
"tone": [
"bold",
"direct"
],
"do": [
"Use specific proof"
],
"dont": [
"Use unsupported superlatives"
],
"bannedTerms": [
"guaranteed riches"
]
},
"claims": [],
"ctas": [],
"assets": [
{
"id": "brand_asset_87bffee4-7249-419b-b4c1-8edeeb732d55",
"kind": "logo",
"name": "Fixture logo",
"url": "/api/brand-assets/brand_asset_87bffee4-7249-419b-b4c1-8edeeb732d55/content",
"mimeType": "image/svg+xml"
},
{
"id": "brand_asset_dce3c24f-65dd-4579-913f-9ffbf74619c9",
"kind": "logo",
"name": "Fixture email logo",
"url": "/api/brand-assets/brand_asset_dce3c24f-65dd-4579-913f-9ffbf74619c9/content",
"mimeType": "image/png",
"altText": "Fixture email identity"
}
],
"accessibility": {
"minimumContrast": 4.5,
"requireAltText": true,
"reducedMotion": true
},
"legal": {
"requiredDisclosures": [],
"prohibitedTopics": []
},
"communications": {
"emailLogoAssetId": "brand_asset_dce3c24f-65dd-4579-913f-9ffbf74619c9",
"senderDisplayName": "Fixture identity",
"replyToAddress": "reply@example.invalid",
"supportAddress": "support@example.invalid",
"legalFooter": {
"entityName": "Fixture identity Ltd",
"registeredAddress": "1 Fixture Street, Example City",
"companyNumber": "FIXTURE-001"
},
"unsubscribeText": "Manage your message preferences.",
"footerText": "Synthetic documentation example."
}
},
"changeNote": "Restored from version 1",
"createdAt": "2026-10-03T11:23:59.122Z",
"updatedAt": "2026-10-03T11:23:59.122Z",
"publishedAt": null
}
}
version identifies the destination draft, which may reuse an existing draft identifier. Restore does not republish or reactivate the source. Capture an existing working draft before replacing it.
Verify the result
Compare destination snapshot with the intended source and confirm destination status:draft; separately review publication.
Errors and recovery
refused · HTTP 404
{
"input": {
"brandKitId": "missing-fixture",
"versionId": "missing-version"
},
"response": {
"error": "version_not_found"
}
}
-
auth_error(HTTP 401): CLI/SDK authentication classification when Auth returns a non-code message: restore the authorized credential, then verify whoami and context. Preserve the exact service message. -
permission_denied(HTTP 403): Use the exact permission and granted resource required by the reviewed action; organization membership alone is insufficient. -
workspace_required(HTTP 400): Discover and select a granted Brand workspace before preparing the request. -
brand_storage_unavailable(HTTP 503): The Brand storage bindings are unavailable. Preserve the request identifier and report the service fault; do not retry an unverified mutation. -
version_not_found(HTTP 404): Discover the exact parent/resource again and inspect its lifecycle status. Missing, inaccessible or immutable resources can share this refusal.
Recovery boundary
Restore prior captured draft content with an authorized update, or discard a newly created unwanted draft. Do not discard pre-existing work without review.
Related actions
app_topolo_brand.brand_kit_versions.get: Read an exact Brand version and its rendering presentation.app_topolo_brand.brand_kit_versions.publish: Publish a draft as the immutable version consumers resolve.
Evidence
Four real local SQLite stores use all canonical migrations; Auth identity/grants and archival plus R2 object storage are explicitly simulated. Notifications are disabled in fixtures. No notification delivery, live mutation, gateway credential parity or deployed environment proof is claimed. Fixture identifiers and timestamps are synthetic and must be replaced by exact authorized resource discovery.