Developer ยท API reference
Reports
Read and edit shareable analytics reports and white-label branding.
Reports are the shareable, white-labelled analytics summaries you can generate for a company. These endpoints read and update a report and its branding.
/reports/brandingGet Branding
Return the company's global agency-branding row, or empty defaults.
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
company_id | string | Yes | โ | โ |
Example request
curl -X GET "https://api.lunalift.ai/reports/branding?company_id=VALUE" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
company_id | string | โ |
logo_url | string | null | โ |
accent | string | null | โ |
agency_name | string | null | โ |
/reports/brandingPut Branding
Upsert the ONE global agency-branding row. Logo is base64 JSON; decoded + stored in DO Spaces under reports/branding/{company_id}/, URL persisted.
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
company_id | string | Yes | โ | โ |
Request bodyยท BrandingUpsert
| Field | Type | Required | Description |
|---|---|---|---|
accent | string | null | No | โ |
agency_name | string | null | No | โ |
logo_base64 | string | null | No | โ |
logo_content_type | string | No | โ |
Example request
curl -X PUT "https://api.lunalift.ai/reports/branding?company_id=VALUE" \
-H "Authorization: Bearer ll_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"accent": "string",
"agency_name": "string",
"logo_base64": "string",
"logo_content_type": "string"
}'Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
company_id | string | โ |
logo_url | string | null | โ |
accent | string | null | โ |
agency_name | string | null | โ |
/reports/{report_id}Get Report
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
report_id | string | Yes | โ |
Example request
curl -X GET "https://api.lunalift.ai/reports/REPORT_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
id | string | โ |
company_id | string | โ |
created_by | string | null | โ |
report_type | ReportType | โ |
status | ReportStatus | โ |
title | string | โ |
slug | string | โ |
spec_json | ReportSpec-Output | The versioned snapshot. The renderer MUST handle every shipped ``spec_version`` โ old shared ``/r/[token]`` links must never break. |
white_label_json | WhiteLabel | Snapshot of the agency branding shown on THIS report. Seeded at generation time from the company's ``report_branding`` row + active ``Plan.partner_tier``. Per-report override via PATCH is allowed but global is always the default. There is NO cobranding-removal/hide field โ the "powered by LunaLift" mark is hard-rendered by every renderer/exporter. |
created_at | string | โ |
updated_at | string | โ |
/reports/{report_id}Patch Report
Writable subset is EXACTLY {title, white_label_json, spec_json}. ``status`` is server-managed and rejected at the model boundary (extra fields forbidden).
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
report_id | string | Yes | โ |
Request bodyยท ReportPatch
| Field | Type | Required | Description |
|---|---|---|---|
title | string | null | No | โ |
white_label_json | WhiteLabel | null | No | โ |
spec_json | ReportSpec-Input | null | No | โ |
Example request
curl -X PATCH "https://api.lunalift.ai/reports/REPORT_ID" \
-H "Authorization: Bearer ll_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"white_label_json": {},
"spec_json": {}
}'Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
id | string | โ |
company_id | string | โ |
created_by | string | null | โ |
report_type | ReportType | โ |
status | ReportStatus | โ |
title | string | โ |
slug | string | โ |
spec_json | ReportSpec-Output | The versioned snapshot. The renderer MUST handle every shipped ``spec_version`` โ old shared ``/r/[token]`` links must never break. |
white_label_json | WhiteLabel | Snapshot of the agency branding shown on THIS report. Seeded at generation time from the company's ``report_branding`` row + active ``Plan.partner_tier``. Per-report override via PATCH is allowed but global is always the default. There is NO cobranding-removal/hide field โ the "powered by LunaLift" mark is hard-rendered by every renderer/exporter. |
created_at | string | โ |
updated_at | string | โ |
