REST API
Branding
Your signers see up to five colours and a logo of your choice on the signing pages. The admin portal sets them on Settings, Branding; the API sets the same values.
| Value | Where it shows | Rule |
|---|---|---|
primary_colour |
The call-to-action buttons, for example Sign | At least 3:1 contrast against white, also on hover and when pressed. Not a red, and not close to the Decline button |
decline_colour |
The Decline buttons | A red, with at least 3:1 contrast against white, also on hover and when pressed |
secondary_colour |
The text of base buttons, for example Cancel, Back, Close and the PDF zoom level | At least 4.5:1 contrast against white and against a pressed button |
link_colour |
Links that are not buttons | At least 4.5:1 contrast against white |
chrome_colour |
The top bar of every signing page | Any colour. Its text turns black or white, whichever reads better |
| Logo | The top bar, beside your organisation name | PNG, JPEG or WebP, at most 1 MiB, 4096 pixels a side and 1 megapixel. SVG is refused |
Null is the platform colour. The footer, the security notes and the green of a signed document do not change: signers read green as signed.
Set the colours
curl -X PUT https://api.esoppari.fi/v1/branding/colours \
-H "Authorization: Bearer $ESOPPARI_KEY" \
-H "Content-Type: application/json" \
-d '{"primary_colour": "#7b2cbf", "decline_colour": null, "secondary_colour": null, "link_colour": null, "chrome_colour": "#1d3557"}'
Send all five fields. A missing field is a 422 required, so a change of one
colour cannot clear another. A refused colour is a 422 that names its field,
and nothing is stored. The codes are in the error guide. The
admin portal suggests the nearest colour that passes.
Replace the logo
curl -X PUT https://api.esoppari.fi/v1/branding/logo \
-H "Authorization: Bearer $ESOPPARI_KEY" \
-F "file=@logo.png"
The service fits the logo into 480 x 128 pixels and stores it as PNG.
DELETE /v1/branding/logo removes it, and the signing pages show your
initials again.