Herald
OpenapiLegal

Get a single published version's full body by id (admin history view).

Admin — requires first-party Bearer + `settings.view` (realm pinned by the session token) (same gate as `admin_list_agreements`, since this is a read of the same history the list already exposes). Returns 404 when the id does not resolve. The `realmId` path segment scopes the permission check; the version itself is looked up by primary key (history rows already surfaced by the list endpoint are guaranteed to belong to the realm or be the platform default).

GET
/api/legal/admin/agreements/versions/{versionId}

Admin — requires first-party Bearer + settings.view (realm pinned by the session token) (same gate as admin_list_agreements, since this is a read of the same history the list already exposes). Returns 404 when the id does not resolve. The realmId path segment scopes the permission check; the version itself is looked up by primary key (history rows already surfaced by the list endpoint are guaranteed to belong to the realm or be the platform default).

Path Parameters

versionId*string

Agreement version ID

Formatuuid

Response Body

Version with full localized body

application/json
  1. response

Single version detail (admin GET by version id). Carries the full localized content map (same shape as LegalAgreementDraftResponse.content) so the admin "view past version" dialog can read content.en exactly like the draft preview. effective_at is the version's published_at.

agreement_type*AgreementType

Type of legal agreement. Serialized as snake_case (terms_of_service, privacy_policy) to align with the DB column values and path params.

Value in"terms_of_service""privacy_policy"
content*unknown
effective_at*string
Formatdate-time
external_url?string|null
mode*AgreementMode
Value in"full_text""link"
version_label?string|null
version_no*integer
Formatint32
Example Request
curl -X GET 'https://example.com/api/legal/admin/agreements/versions/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "agreement_type": "terms_of_service",
  "content": null,
  "effective_at": "2019-08-24T14:15:22Z",
  "external_url": "string",
  "mode": "full_text",
  "version_label": "string",
  "version_no": 0
}