Skip to content

Agreement Acceptance

Check whether the authenticated tenant needs to re-accept any agreements, and record a new acceptance when they do.

Use this on login/app-load to drive a re-acceptance modal. If needsAcceptance is true, show the updated documents listed in outdated and call POST /v1/tenants/agreements when the user confirms.

Check status

GET /v1/tenants/agreements

Authentication: Authorization: Bearer <api-key>

Response

All current — no action needed

json
{
  "ok": true,
  "agreements": {
    "needsAcceptance": false,
    "outdated": [],
    "hasPublishedAgreements": true
  }
}

One or more documents updated since last acceptance

json
{
  "ok": true,
  "agreements": {
    "needsAcceptance": true,
    "outdated": [
      {
        "documentType": "DPA",
        "currentVersion": "2026-07-01",
        "acceptedVersion": "2026-06-28",
        "url": "/v1/tenants/agreements/DPA",
        "acceptUrl": "/v1/tenants/agreements"
      }
    ],
    "hasPublishedAgreements": true
  }
}

No agreement templates have ever been published

json
{
  "ok": true,
  "agreements": {
    "needsAcceptance": false,
    "outdated": [],
    "hasPublishedAgreements": false
  }
}

Each entry in outdated names the specific document type that changed. Use the url to fetch and display the updated document before asking for re-acceptance.

FieldDescription
needsAcceptancetrue if any document type has a new template version that isn't yet ACCEPTED
outdated[].documentTypeTERMS, PRIVACY, or DPA
outdated[].currentVersionTemplate version currently published
outdated[].acceptedVersionTemplate version the tenant last accepted, or null if never accepted
outdated[].statusPENDING (generated, not accepted), or NOT_GENERATED (template published but instance not yet created)
outdated[].urlURL to the tenant's personalized document instance (GET /v1/tenants/agreements/:type)
hasPublishedAgreementsfalse only when no agreement template has ever been published (a fresh/pre-launch environment) — distinguishes that case from needsAcceptance: false meaning "everything's accepted." A false value means outdated is empty because there's nothing to show yet, not because the tenant is caught up.

Calling this endpoint automatically generates any missing PENDING instances for new template versions — no separate backfill call needed after the admin publishes an update.

Errors

StatusCodeWhen
401UNAUTHORIZEDMissing or invalid API key
429TOO_MANY_REQUESTSRate limit exceeded

This is a read-only endpoint, so it stays reachable even if the tenant's account is SUSPENDED — see the ACCOUNT_SUSPENDED entry in the error catalogue.

Record acceptance

POST /v1/tenants/agreements

Authentication: Authorization: Bearer <api-key>

Request body

json
{ "termsVersion": "2026-07-01" }
FieldTypeRequiredDescription
termsVersionstringYesThe version string from the current TERMS document (from GET /v1/agreements). The server validates this against what's currently published before recording anything.

Response

200 OK

json
{ "ok": true }

Records one acceptance row per currently-published document type (TERMS, PRIVACY, DPA), capturing the IP address and user agent of the request alongside the version and content hash.

Errors

StatusCodeWhen
400VALIDATION_FAILEDtermsVersion missing or too long
400VERSION_MISMATCHThe submitted termsVersion does not match the currently published TERMS version — the document was updated between when your UI loaded and when the user clicked accept. Re-fetch GET /v1/agreements, show the updated content, and ask for acceptance again.
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENAccount is suspended
429TOO_MANY_REQUESTSRate limit exceeded

Notes

  • Changes to any one of the three documents (TERMS, PRIVACY, or DPA) independently will surface as a mismatch for that type only — the other two won't appear in outdated unless they also changed. This means a DPA-only update triggers re-acceptance for the DPA without forcing the tenant to "re-accept" unchanged Terms or Privacy content.
  • The API key does not need X-Issuer-Id — this is a tenant-level operation.

Comprobify API Documentation