Legal API
Auto-generated from
openapi-snapshot.json. Do not edit by hand — changes are overwritten byscripts/docs/generate_api_reference.py.
8 endpoints in this group.
POST /api/legal/accept
Accept Document
Record user acceptance of a specific legal document version.
Request body: application/json
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /api/legal/accept/current
Accept Current Documents
Accept active legal documents by doc_type.
This is the backend contract for the first-registration click-wrap modal:
the client can ask for terms + privacy without knowing raw document
IDs, while the server pins the current active versions in
legal_acceptances.
Request body: application/json
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/legal/acceptances/me
Get My Acceptance Status
Return current terms/privacy acceptance status for the authenticated user.
Contract (#1770): the response MUST always include the canonical three
fields — required (list), missing (list[str]), and
needs_acceptance (bool). Even on infra hiccups (DB error, no rows for
the required doc types) we degrade gracefully to required=[] +
needs_acceptance=False instead of raising 5xx with an error envelope
that omits required — that envelope crashed the FE (#1766) before the
defensive coerce in PR
Responses
| Code | Description |
|---|---|
200 | Successful Response |
GET /api/legal/documents/{doc_type}/current
Get Current Document
Return the row where doc_type=… AND is_active=TRUE; 404 otherwise.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
doc_type | path | string | required |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/legal/settings/public
Get Public Settings
Return every legal_settings row where is_public=TRUE.
Responses
| Code | Description |
|---|---|
200 | Successful Response |
GET /api/legal/sub-processors/confirm
Confirm
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | required | |
email | query | string | required |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /api/legal/sub-processors/subscribe
Subscribe
Insert (or refresh) a subscription row + send confirmation email.
Idempotent: re-subscribing within _RESEND_COOLDOWN returns the
same response without sending a second email.
Request body: application/json
Responses
| Code | Description |
|---|---|
202 | Successful Response |
422 | Validation Error |
GET /api/legal/sub-processors/unsubscribe
Unsubscribe
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | required | |
email | query | string | required |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |