Skip to content

Documents

List documents, download HTML or Markdown versions, and publish hosted pages.

View .mdOpen llms.txt

GET /v1/documents and GET /v1/documents/{id}

Lists documents for a profile_id with current version, draft/final state and publication metadata.

GET /v1/documents/{id}/versions/{n|latest}

Returns the rendered version as JSON with statutory provenance, or as HTML/Markdown with ?format=html or ?format=md.

GET, PUT and DELETE /v1/documents/{id}/publication

Reads publication state (GET), publishes the newest final version to pages.policygrain.com (PUT with {"slug": "example-privacy"} the first time, then {}; the slug never changes), or unpublishes and purges the hosted page (DELETE).

Expiring share links (POST/GET /v1/documents/{id}/share-links and DELETE /v1/share-links/{id}) are planned under gap G16.