Get Latest Audit
Latest audit of one type for a brand, or null when none exists yet.
brand_audits carries UNIQUE (brand_id, audit_type, platform). The
optional platform therefore participates in the lookup; omitting it reads
the platform-less (including holistic social) lineage rather than choosing
whichever platform happened to be created most recently. Consumers used
to do list-then-filter client-side, which pulls every audit of every type
to answer a one-row question.
“No audit yet” is the COMMON case (most brands have never run a content
audit), so it is a 200 with a null body, not a 404 — the caller renders
an empty state with a “Run audit” CTA, and reserving 404 for real errors
keeps that distinguishable.
MUST stay declared above /{brand_id}/audits/{audit_id} — FastAPI
matches in declaration order, and “latest” would otherwise be parsed as a
UUID path param and 422.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Audit type, e.g. 'seo' or 'content_marketing'
Platform slug for a platform-scoped audit
1 - 64^[A-Za-z0-9][A-Za-z0-9_-]*$Response
Successful Response