v2 Admin

Enable/disable new purchases for a channel/domain (audited)

EP-023-T23 (+ EP-024 per-domain web). Server-authoritative runtime switch, without a restart; written through this endpoint, so the change is audited ([AUDIT] purchase_flag_changed). Does not block existing subscribers. For channel=web, domain is required and must be an allow-listed public host (each site domain has its own switch). CLI: deploy/v2-tools/purchase-flags.sh.

post/api/v2/admin/purchase-flags

Request

  • Base URL: https://pdf2md.dev
  • URL: https://pdf2md.dev/api/v2/admin/purchase-flags
  • Auth: HTTP bearer

Request body

channel'extension' | 'web' required
domainstring

Required for channel=web: which public host (e.g. pdf2md.dev). Ignored for extension.

enabledboolean required

Response

New flags

extensionboolean required

Whether new extension purchases are enabled

webobject required

Per-domain web purchase flags keyed by public host, e.g. {"pdf2md.dev": true, "pdf2md.huskyhaul.online": false}

Changes

No recorded changes to this operation across all 1 revision of this API.