Provide an icon for a tenant
const url = 'https://sender.api.kivra.com/v2/tenant/example/icon';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"file":{"name":"fancy icon","data":"REVBR ...... EJFRUY=","content_type":"image/png"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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:
- sandbox: https://sandbox-static.kivra.com/img/tenant/{tenantKey}/icon.png
- production: https://static.kivra.com/img/tenant/{tenantKey}/icon.png
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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The unique Key for a Tenant
Request Body
Section titled “Request Body”object
object
Arbitrary filename
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.
The IANA media type corresponding to the file, e.g. “image/png”
Example
{ "file": { "name": "fancy icon", "data": "REVBR ...... EJFRUY=", "content_type": "image/png" }}Responses
Section titled “Responses”Empty response confirming that the put operation was successful