Compose a layer onto a brand
add_brand_layerAdds a design record to a brand project's axis (image direction, interface style, or page recipe), pinning the chosen revision. Handles single-value axes with replace and rejects conflicts.
Instructions
Put one catalogue record onto a brand project alongside its design kit, so the choice is stored on the user's brand rather than living in this conversation. One tool for all three axes: pass axis to say which. The layers belong to the PROJECT and not to the kit, so swapping the kit later leaves them alone — that independence is the whole point of composing axes separately. The pin records the revision the record is at right now, which is what lets get_brand_layers later report that it moved instead of silently applying someone else's edit to the user's brand. recordId is the record's permanent id from list_image_directions, list_interface_styles or list_page_recipes, never a slug: slugs are mutable handles and a pin keyed on one could come to mean a different record. imageDirection and interfaceStyle hold ONE each, so composing a second is refused with 409 unless you pass replace: true — which is also how you accept a drifted revision after the user has seen what changed. Page recipes are a list and simply accumulate. A Pro record on a key without Pro is refused with 403 and an upgrade path; that is not a conflict and replace will not help. This overwrites live brand state without asking and mints a version recording that your key did it. Requires the kits:write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| axis | Yes | Which axis this record belongs to. imageDirection and interfaceStyle hold one each; pageRecipe holds any number. | |
| replace | No | Replace what is already on a single-value axis, or accept a revision that has drifted. Ignored for pageRecipe, which is a list. Default false, so a clash is reported rather than overwritten. | |
| recordId | Yes | The record's permanent id (the `id` field), not its slug. From list_image_directions, list_interface_styles or list_page_recipes. | |
| projectId | Yes | Owned brand project id from list_brand_projects. |