White Labeling - Upload Assets
Enterprise
This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Endpoint
/i/whitelabeling/upload
Overview
Uploads branding images used by White Labeling settings (pre-login logo, sidebar logo, favicon).
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Global Plugins:
Updatepermission (global-level).
Request Parameters
Multipart form-data with one file field:
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes (or auth_token) | API key authentication |
auth_token | String | Yes (or api_key) | Auth token authentication |
prelogo | File | Conditional | Pre-login logo (png, gif, jpeg) |
stopleftlogo | File | Conditional | Sidebar logo (png, gif, jpeg) |
favicon | File | Conditional | Favicon (png, gif, x-icon) |
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"
Response
Success Response
{
"result": "Success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
result | String | Upload 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
- 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.
Limitations
- Max file size: 1.5 MB.
- One image is processed per request.
Related Endpoints
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly_fs.white-labeling.files | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |
countly_fs.white-labeling.chunks | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |