Create Color Assets
POST/v1/:slug/assets/create_colors
Creates colour swatches — text assets that hold a colour rather than a file.
A swatch's value is either a hex code (#FF0000 or #F00) or a Pantone name (185 C); both are
stored verbatim in the asset's text field, with text_type: "color". Nothing is fetched or
uploaded, so swatches are created synchronously and come back complete — there is no
is_skeleton polling step.
Pantone names carry no PANTONE prefix. The accepted value is the name as it appears in
Playbook's Pantone list — 185 C, 185 CP, 20-0001 TPM — and matching is exact, including
case. Anything Playbook cannot resolve to a colour is rejected with 406 rather than stored,
because a swatch whose value resolves to nothing is created successfully and then renders as
an empty slot on the board.
Sending two or more codes merges them into a palette: a group asset whose own text_type
becomes palette and whose text is the member codes joined by |. Pass parent_token to
merge the new swatches into an existing asset or group instead. A single code with no
parent_token creates one loose swatch, and group comes back null.
Important
- Maximum 100 codes per call.
titlesis optional and positional; anullor missing entry falls back to the code itself.- If
collection_tokenis omitted or unknown, the swatches fall through to the default board. - Requires a token with the
writescope.
Request
Responses
- 200
- 401
- 403
- 404
- 406
- 422
creates swatches and merges them into a palette
unauthenticated
token without the write scope
parent_token does not name an asset in this workspace
a color code Playbook cannot resolve to a colour
more than 100 codes