Skip to content
Connect an agent
Organisations

Preview brand colors

Draws two fixed sample diagrams in the colors given, in light and dark, with the check.

POST/orgs/{org}/brand/preview

TL;DR

QuestionAnswer
What does it do?Preview brand colors.
What does it take?A JSON body of type BrandBody.
What does it return?Status 200 with a body of type BrandPreview.
What can go wrong?400 the body is not valid; 401 not signed in; 403 the caller's role may not (orgs.forbidden), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 422 a color is not valid, or there is no primary (brand.invalid, with every issue in details); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

Draws two fixed sample diagrams in the colors given, in light and dark, with the check. Works on every plan. The owner and admins may. Stores nothing.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Request body

The body has the type BrandBody.

FieldTypeRequiredDescription
primarystring | nullnoThe main brand color, as #rrggbb or #rgb in any case. Takes the place of the blue tone. A brand needs one. at most 32 characters.
secondarystring | nullnoTakes the place of the violet tone. Left out or null, it is made from the primary by turning its hue, and follows the primary. at most 32 characters.
accentstring | nullnoTakes the place of the aqua tone. Left out or null, it is made from the primary by turning its hue, and follows the primary. at most 32 characters.

Responses

StatusMeaningBody
200The check and the sample pictures.BrandPreview
400The body is not valid.ErrorResponse
401Not signed in.ErrorResponse
403The caller's role may not (orgs.forbidden), or the request came from an origin that may not make changes.ErrorResponse
404No such organisation, or the caller is not a member of it.ErrorResponse
422A color is not valid, or there is no primary (brand.invalid, with every issue in details).ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type BrandPreview.

FieldTypeRequiredDescription
checkBrandCheckyes
check.issuesBrandIssue[]yes
check.issues[].role"primary" | "secondary" | "accent"yes
check.issues[].severity"error" | "warning" | "note"yesAn error stops a save. A warning and a note are advice.
check.issues[].code"not-a-color" | "missing-primary" | "reads-as-status" | "too-similar" | "adjusted"yes
check.issues[].messagestringyes
check.swatchesobject | nullyesThe color each scheme draws for each role, made darker or lighter where it would not keep 3:1 against the surface.
check.swatches.lightobjectyes
check.swatches.darkobjectyes
picturesBrandPreviewPicture[]yes
pictures[].idstringyes
pictures[].titlestringyes
pictures[].lightstringyesThe sample as an SVG in the light scheme.
pictures[].darkstringyesThe sample as an SVG in the dark scheme.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools