Set brand rules in one go
const url = 'http://localhost:3000/api/v1/brand/rules';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"set":[{"key":"example","label":"example","context":"example","type":"color","value":"example","usage":"example","assets":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","rendition":"example"}],"spec":{"token":"example","group":"example","weight":1,"pair":"example","tints":[1],"cmyk":["example"],"pantone":["example"],"ral":"example","rgb":["example"],"print":"specified","texture":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","gradient":{"kind":"linear","angle":1,"stops":[{"color":"example","at":1,"opacity":1}]}}}],"remove":[{"key":"example","context":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/brand/rules \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "set": [ { "key": "example", "label": "example", "context": "example", "type": "color", "value": "example", "usage": "example", "assets": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rendition": "example" } ], "spec": { "token": "example", "group": "example", "weight": 1, "pair": "example", "tints": [ 1 ], "cmyk": [ "example" ], "pantone": [ "example" ], "ral": "example", "rgb": [ "example" ], "print": "specified", "texture": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "gradient": { "kind": "linear", "angle": 1, "stops": [ { "color": "example", "at": 1, "opacity": 1 } ] } } } ], "remove": [ { "key": "example", "context": "example" } ] }'The MCP tool set_rules. Each of set is made, or changes the rule with its key and context (its type can’t change: remove it first); each of remove goes, a key without a context with every context version. All or none, checked together, so a gradient and the colors it names can arrive at once: a 422 lists every problem with its path, e.g. set[0].spec: .... One change in the brand’s history.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”A brand’s slug; the default brand when left out
Request Bodyrequired
Section titled “Request Bodyrequired”object
Rules to make, or change where the key and context exist
object
object
A scale name beside the brand name: Pink-500
Primary, Secondary, Neutrals: palettes group by it
Its share of the brand’s color, for the proportion bar
The color set on it: text on this ground, or its light partner
Tint steps in percent: [80, 60, 40, 20]
Free codes, coated and uncoated: 485 C, 485 U
When the book states it rather than deriving it from the hex
Whether the print values were given or converted
An image laid over the swatch
object
Markdown (GFM)
object
object
object
object
ISO 15924: Latn, Arab
OpenType features on: ss01, tnum
Where the family comes from, or its license
A CSS stack: Georgia, serif
False: readers see the face but get no files
Responses
Section titled “Responses”What changed, each as key (context)
object
object
Examplegenerated
{ "data": { "brand": "example", "created": [ "example" ], "updated": [ "example" ], "removed": [ "example" ] }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}