/api/v1/agreementslinks:readThe library, most recently edited first, with how much each one is used.
Returns
{ data: Agreement[] } — id, name, body, requireName, linkCount, acceptedCount, createdAt, updatedAt
API reference
An agreement is a set of confidentiality terms written once and picked by name on any link. Readers accept it before the document opens; editing the wording asks everybody who accepted the old version again, while their earlier acceptance is kept.
Base URL https://xdocs.io/api/v1, with Authorization: Bearer xdk_… on every request. Pagination, rate limits, scopes and error codes are the same for every endpoint and are described once, in how the API behaves.
Confidentiality terms written once and picked by name on any link. Editing one re-asks everybody who accepted the old wording, while their record keeps the text they actually agreed to.
/api/v1/agreementslinks:readThe library, most recently edited first, with how much each one is used.
Returns
{ data: Agreement[] } — id, name, body, requireName, linkCount, acceptedCount, createdAt, updatedAt
/api/v1/agreements/:idlinks:readOne agreement with its usage counts.
Returns
{ data: Agreement }
/api/v1/agreementslinks:writeWrite terms once; pick them by id on any link.
Body (JSON)
namestringrequiredbodystringrequiredrequireNamebooleanReturns
201 { data: Agreement }
/api/v1/agreements/:idlinks:writeChange the wording. New wording is a new agreement for everyone who accepted the old one.
Body (JSON)
namestringbodystringrequireNamebooleanReturns
{ data: Agreement, regatedLinks: number } — regatedLinks is how many links now ask again, and is 0 unless the wording itself changed
/api/v1/agreements/:idlinks:writeRemove from the library. Links using it keep the gate, with the text copied onto them, so deleting never quietly opens a document; link presets that named it keep its words the same way.
Returns
204