Branding document
The instance's branding as one branding/v1 document (api-route-review D47): the brand's published tokens and theme, the localization settings, the instance's own published widget definitions, the brand's per-widget layouts, styles and copy, the custom blueprints, and the files the brand uploaded, inlined so the document works in another instance. Only the published state is exported; drafts stay in the dashboard. Everything is named by a key, never an id, and the output is deterministic: two exports of the same state are byte-identical, and the ETag is the hash of the bytes. Send it as If-None-Match to get 304 when nothing changed. Import the document into another instance with POST /v1/branding/document/import. Needs sys:brand:read and sys:widget:read.
x-pontive-instance-id<token>Instance ID for the request
A branding/v1 document
application/json- response
Document is a branding/v1 document, passed to branding-svc as the bytes it was sent. At most 5 MB.
assets?Assets are the uploaded files the tokens reference as asset:sha256-, keyed sha256-. A URL the customer hosts stays a URL.
blueprints?array<>Blueprints are the instance's custom blueprints, by id.
brand?localization?pontive_document?"branding/v1"PontiveDocument is the document type. An import reads the current and the previous major version.
"branding/v1"pontkit?stringPontkit is the pontkit release the document was exported against. Informational: an import checks markup and the theme against the target's own release.
widget_customizations?array<>WidgetCustomizations are the brand's per-widget layouts, styles and copy, by the definition's key. The brand is a singleton: an import resets a customization the target has and the document lacks.
widgets?array<>Widgets are the instance's own published widget definitions (keys starting custom_). Built-ins are the same everywhere and never travel.
curl -X GET 'https://api.us.pontive.com/v1/branding/document'{ "assets": { "property1": { "content_type": "string", "data": "string" }, "property2": { "content_type": "string", "data": "string" } }, "blueprints": [ { "description": "string", "document": {}, "id": "string", "name": "string", "open_events": [ "string" ], "widgets": { "property1": { "from_key": "string", "markup": "string", "name": "string" }, "property2": { "from_key": "string", "markup": "string", "name": "string" } } } ], "brand": { "theme": {}, "tokens": {} }, "localization": { "default_locale": "string", "enabled_locales": [ "string" ] }, "pontive_document": "branding/v1", "pontkit": "string", "widget_customizations": [ { "layout": "string", "styles": { "instances": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "tokens": {} }, "translations": { "property1": { "property1": "string", "property2": "string" }, "property2": { "property1": "string", "property2": "string" } }, "widget_key": "string" } ], "widgets": [ { "description": "string", "key": "string", "markup": "string", "name": "string" } ]}Plans importing a branding/v1 document into this instance and, with dry_run false, applies the plan (api-route-review D47). The brand is replaced: its tokens, theme, localization settings and every per-widget customization take the document's values, and a customization the instance has and the document lacks is reset and listed as changed. Widget definitions and blueprints are merged by key: a new key is created, a differing one replaced (a published definition's markup never changes, so a different one is a conflict), and one the document lacks is listed as absent and left alone. Nothing is deleted. With publish true (the default) the import publishes one new branding version and the theme; with publish false it writes drafts for review in the dashboard. Re-importing an instance's own export plans every entry unchanged and writes nothing. The dry run's ETag fingerprints the instance's branding: send it as If-Match on the apply to be refused 412 precondition_failed if anything changed since. An apply with conflicts is 409 import_conflict, one detail per conflict, field .., and applies nothing. A document the format refuses (not JSON, a member it does not define, a pontive_document it does not read) is 422 field_invalid_format; one over 5 MB is 422 field_too_long. X-Idempotency-Key makes an apply safe to retry; the same key with another request is 422 idempotency_key_reused. Needs sys:brand:manage and sys:widget:manage, and sys:settings:manage when the localization settings change.
x-pontive-instance-id<token>Instance ID for the request
If-Match?stringThe dry run's ETag: the apply is refused 412 precondition_failed if the instance's branding changed since
X-Idempotency-Key?stringIdempotency key, read on an apply
The document and how to import it
application/json- body
The document and how to import it
discard_unpublished?booleanDiscardUnpublished lets the import overwrite a draft with unpublished changes, which is otherwise a conflict.
document?Document is a branding/v1 document, passed to branding-svc as the bytes it was sent. At most 5 MB.
dry_run?booleanDryRun returns the plan and writes nothing. True when omitted: send false to apply.
publish?booleanPublish publishes what the import changes. True when omitted; false writes drafts for review in the dashboard.
secrets?Secrets are the values of the document's {"$secret": ""} placeholders, by name; never inside the document, and never echoed back. A placeholder with no value here or in the target is a conflict.
OK
application/json- response
absent?array<>changed?array<>conflicts?array<>created?array<>dry_run?booleanDryRun is true when nothing was written.
object?"branding_import_plan""branding_import_plan"publish?booleanPublish says whether the changes are published, or left as drafts.
unchanged?array<>warnings?array<>curl -X POST 'https://api.us.pontive.com/v1/branding/document/import' \ -H 'Content-Type: application/json' \ -d '{}'{ "absent": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "changed": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "conflicts": [ { "code": "string", "field": "string", "key": "string", "kind": "string", "message": "string" } ], "created": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "dry_run": true, "object": "branding_import_plan", "publish": true, "unchanged": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "warnings": [ { "code": "string", "field": "string", "key": "string", "kind": "string", "message": "string" } ]}