Concepts

Logos and colours

What a customer's employees see in the Monotree app, and how to send it.

What is shown

The Monotree app shows each company in its own look: its logo in the header, its main colour on buttons, links and the welcome card, and an optional accent colour for highlights. In dark mode it uses the dark logo when there is one.

Colours

brand.primary_color and brand.secondary_color are hex colours, #rrggbb. Pick a main colour that white text reads on; very light colours are hard to read on buttons.

Logos

Send a logo as base64 in the JSON body with its format:

JSON
{
  "brand": {
    "logo_light": { "format": "svg", "content": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgNDgiPi4uLjwvc3ZnPg==" },
    "logo_dark": { "format": "png", "content": "iVBORw0KGgoAAAANSUhEUgAA…" }
  }
}
Rule
Formats svg or png
Size at most 512 KB before encoding
Shape a wide wordmark works best; it is shown about 24 px high
Light logo for a white background
Dark logo optional, for dark mode: a light version of the logo
SVGs are cleaned when stored: only drawing elements are kept. <style> elements are removed, so colour the shapes with attributes (fill, stroke, or a style attribute on the shape), not with a style sheet. A file with a script, an event handler, foreign content or an entity is refused with 422

A customer answers with brand.logo_light_url and brand.logo_dark_url: links to the stored files that you can show in your own product, null when there is no logo. The links are public: they need no token. A logo that is not base64, is too large or is not the format it says answers 422 on brand.logo_light.content.

LOGO=$(base64 < logo.svg | tr -d '\n')
curl -X PATCH https://partners.monotree.com/api/v1/customers/external_ref:org_48213 \
  -H "Authorization: Bearer $MONOTREE_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{ \"brand\": { \"logo_light\": { \"format\": \"svg\", \"content\": \"$LOGO\" } } }"

Send "logo_dark": null to remove a logo.