Get a legal document
Legal
Get a legal document
Public fetch of the Terms & Conditions or Privacy Policy, including its sanitized HTML body.
GET
Get a legal document
Overview
Returns one published legal document with its rich-text body. The mobile app’s Terms and Privacy screens render this directly, so the client can update the wording in the admin panel without an app release.slug is one of:
| Slug | Document |
|---|---|
TERMS | Terms & Conditions |
PRIVACY | Privacy Policy |
Authentication
None. The app links to both documents from the sign-up screen, before a session exists.About bodyHtml
The body is HTML, sanitized server-side against a fixed allowlist before it is stored. It is safe to render without further processing. Only these tags can appear:
h1 h2 h3 h4 p ul ol li strong b em i u a br hr blockquote table thead tbody tr th td
The only permitted attributes are href, target and rel on <a>, and link schemes are restricted to http, https, mailto and tel. Script tags, event handlers (onclick), inline styles, classes, ids, images and javascript: URLs are stripped at write time and can never reach a client.
Response — 200 OK
| Field | Type | Notes |
|---|---|---|
slug | string | TERMS or PRIVACY |
title | string | Display title, editable by admins |
version | number | Increments only when the title or body wording changes — not when the document is published/unpublished or its effective date is corrected. Use it to detect a genuine revision. |
effectiveAt | string | ISO-8601. Shown to users as the “Last updated” date. |
bodyHtml | string | Sanitized rich text (see above) |
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_FAILED | slug is not one of the known documents |
404 | NOT_FOUND | The document has never been written, or is currently a draft |
A
404 is deliberate rather than an empty body: it lets the app show a real
error state instead of rendering a blank legal page.