API
Public, read-only JSON. CORS is open to all origins and responses are cached for 5 minutes.
GET
/api/v1/documentsAll public documents with current and upcoming versions.GET
/api/v1/documents/:slugOne document plus the Markdown of its current and upcoming versions.GET
/api/v1/documents/:slug/versionsAll published and withdrawn versions of a document.GET
/api/v1/changesPublished versions, newest first.GET
/agreements/:slug/v/:version/document.txtPlain-text copy of a version.GET
/changes/feed.xmlRSS 2.0 feed of changes.POST
/api/v1/acceptancesRecord an acceptance (requires API key).Examples
curl https://legal.idealx.com/api/v1/documents
curl https://legal.idealx.com/api/v1/documents/complaints
curl https://legal.idealx.com/agreements/complaints/v/1.0/document.txt
curl -X POST https://legal.idealx.com/api/v1/acceptances \
-H "Authorization: Bearer $ACCEPTANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"external_ref":"client-123","slug":"complaints","version":"1.0"}'
# → { "ok": true, "version_url": "...", "content_hash": "..." }
# 409 if the version is not published