Skip to main content

White Labeling - Upload Assets

Endpoint

/i/whitelabeling/upload

Enterprise Only
This API is available exclusively in Countly Enterprise.

Overview

Uploads branding images used by White Labeling settings (pre-login logo, sidebar logo, favicon).

Authentication

Authentication methods:

  • API Key (parameter): api_key=YOUR_API_KEY
  • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
  • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Global Plugins: Update permission (global-level).

Request Parameters

Multipart form-data with one file field:

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
prelogoFileConditionalPre-login logo (png, gif, jpeg)
stopleftlogoFileConditionalSidebar logo (png, gif, jpeg)
faviconFileConditionalFavicon (png, gif, x-icon)

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringUpload status

Error Responses

  • HTTP 400 - Invalid file type:
{
"result": "white-labeling.imagef-error"
}
  • HTTP 400 - Invalid image file:
{
"result": "white-labeling.imagefico-error"
}
  • HTTP 400 - File too large:
{
"result": "white-labeling.image-error"
}

Behavior/Processing

  • Accepts only the first matching file in this order: prelogo, stopleftlogo, favicon.
  • Enforces max file size of 1.5 MB.
  • Converts uploaded file to base64 data URI and stores in GridFS bucket white-labeling.

Database Collections

CollectionUsed forData touched by this endpoint
countly_fs.white-labeling.filesEndpoint data sourceStores endpoint-related records this endpoint reads or modifies.
countly_fs.white-labeling.chunksEndpoint data sourceStores endpoint-related records this endpoint reads or modifies.

Examples

curl -X POST "https://your-server.com/i/whitelabeling/upload?api_key=YOUR_API_KEY" \
-F "prelogo=@./brand-login.png"
curl -X POST "https://your-server.com/i/whitelabeling/upload?api_key=YOUR_API_KEY" \
-F "favicon=@./favicon.ico"

Limitations

  • Max file size: 1.5 MB.
  • One image is processed per request.

Ⓔ Enterprise

This feature is part of Countly Enterprise.

Get Access:

Already a Customer? Use support portal if you have any questions.


Last Updated

2026-02-16