โ† API reference

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.

GET /reports/branding

Get Branding

Return the company's global agency-branding row, or empty defaults.

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Query parameters

NameTypeRequiredDefaultDescription
company_idstringYesโ€”โ€”

Example request

curl -X GET "https://api.lunalift.ai/reports/branding?company_id=VALUE" \
  -H "Authorization: Bearer ll_your_api_key"

Response ยท 200 OK

FieldTypeNotes
company_idstringโ€”
logo_urlstring | nullโ€”
accentstring | nullโ€”
agency_namestring | nullโ€”
PUT /reports/branding

Put 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

NameTypeRequiredDefaultDescription
company_idstringYesโ€”โ€”

Request bodyยท BrandingUpsert

FieldTypeRequiredDescription
accentstring | nullNoโ€”
agency_namestring | nullNoโ€”
logo_base64string | nullNoโ€”
logo_content_typestringNoโ€”

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

FieldTypeNotes
company_idstringโ€”
logo_urlstring | nullโ€”
accentstring | nullโ€”
agency_namestring | nullโ€”
GET /reports/{report_id}

Get Report

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
report_idstringYesโ€”

Example request

curl -X GET "https://api.lunalift.ai/reports/REPORT_ID" \
  -H "Authorization: Bearer ll_your_api_key"

Response ยท 200 OK

FieldTypeNotes
idstringโ€”
company_idstringโ€”
created_bystring | nullโ€”
report_typeReportTypeโ€”
statusReportStatusโ€”
titlestringโ€”
slugstringโ€”
spec_jsonReportSpec-OutputThe versioned snapshot. The renderer MUST handle every shipped ``spec_version`` โ€” old shared ``/r/[token]`` links must never break.
white_label_jsonWhiteLabelSnapshot 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_atstringโ€”
updated_atstringโ€”
PATCH /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

NameTypeRequiredDescription
report_idstringYesโ€”

Request bodyยท ReportPatch

FieldTypeRequiredDescription
titlestring | nullNoโ€”
white_label_jsonWhiteLabel | nullNoโ€”
spec_jsonReportSpec-Input | nullNoโ€”

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

FieldTypeNotes
idstringโ€”
company_idstringโ€”
created_bystring | nullโ€”
report_typeReportTypeโ€”
statusReportStatusโ€”
titlestringโ€”
slugstringโ€”
spec_jsonReportSpec-OutputThe versioned snapshot. The renderer MUST handle every shipped ``spec_version`` โ€” old shared ``/r/[token]`` links must never break.
white_label_jsonWhiteLabelSnapshot 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_atstringโ€”
updated_atstringโ€”