Skip to content
This is a new version of the Kivra Developer Docs. Report issues or share feedback at avsandare.support@kivra.se. The previous version can be found here.

Provide an icon for a tenant

POST
/v2/tenant/{tenantKey}/icon
curl --request POST \
--url https://sender.api.kivra.com/v2/tenant/example/icon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "file": { "name": "fancy icon", "data": "REVBR ...... EJFRUY=", "content_type": "image/png" } }'

Add or update the tenant icon. If an icon already exists, it will be changed.

To check the current icon associated to a tenant you can simply check the following address:

The icon needs to be provided according to the following format:

  • Dimensions: squared icon with size between 256x256 px and 512x512 px
  • Alpha Channel: 32-bits
  • Format: PNG
  • File size: up to 1MB

We recommend to leave a little white area around the logo, to provide the best experience for the users.

tenantKey
required
string format: hexadecimal

The unique Key for a Tenant

Media typeapplication/json
object
file
Icon
object
name

Arbitrary filename

string
data
required

Base64-encoded data. Max size is 134 kB when encoded which is roughly equivalent to 100 kB before encoding. The image format must be PNG. The image must be quadratic (that is, width and height must be the same). The sides must be at least 256 pixels long, and at most 512 pixels long. The image must have an alpha channel.

string format: Base64-encoded data
content_type
required

The IANA media type corresponding to the file, e.g. “image/png”

string
Allowed values: image/png
Example
{
"file": {
"name": "fancy icon",
"data": "REVBR ...... EJFRUY=",
"content_type": "image/png"
}
}

Empty response confirming that the put operation was successful