Skip to main content
Docs

Tenant and settings

Settings describe how your programme behaves: defaults, release controls, the dispute rule, notifications, branding and terminology. They are shared by test and live, are versioned, and are changed with expected_version so two people cannot overwrite each other (409 settings_version_conflict). Some changes are routine, some loosen a safety control; the latter need a reason and a second member through a change request.

The catalogue (GET /catalogue) returns the vocabularies a client needs: conditions, evidence types, event types, error codes, reason codes, fund flows and rail labels.

The base is https://holdyn-fb2e34c7cbae.herokuapp.com/api/v1/b2b. Every endpoint below lists who may call it.

At a glance#

Objects

Tenant

Tenant (example values)
{
  "id": "ten_6543a1b2c3d4e5f6a7b8c9d0",
  "object": "tenant",
  "slug": "acme",
  "display_name": "Acme",
  "company_name": "Acme Inc.",
  "legal_name": "Acme Inc.",
  "country": "US",
  "timezone": "America/Los_Angeles",
  "default_currency": "usd",
  "support_email": "help@acme.example",
  "support_phone": "+14155550100",
  "billing_email": "billing@acme.example",
  "billing_contact_name": "Alex M.",
  "lifecycle": "approved",
  "account_status": "active",
  "live": {
    "enabled": false,
    "requested_at": "2026-11-05T17:02:11.000Z",
    "enabled_at": null,
    "disabled_at": null,
    "disabled_reason": null,
    "missing": ["live_connection_missing", "platform_payout_protection_missing", "pricing_plan_missing"],
    "warnings": ["dual_control_members_insufficient", "return_hold_zero_exposure"]
  },
  "onboarding": {
    "warning_version": "2026-11-01",
    "warning_acknowledged_at": "2026-11-02T09:00:00.000Z",
    "warning_acknowledged_by": "mem_6543a1b2c3d4e5f6a7b8c9d1",
    "control_profile": "recommended_controls",
    "control_profile_chosen_at": "2026-11-02T09:03:00.000Z",
    "control_profile_customised": false,
    "checklist": [
      { "key": "email_verified", "done": true, "required_for": "test" },
      { "key": "warning_acknowledged", "done": true, "required_for": "live" },
      { "key": "control_profile_chosen", "done": true, "required_for": "test" },
      { "key": "test_connection", "done": true, "required_for": "test" },
      { "key": "preset_installed", "done": true, "required_for": null },
      { "key": "preset_values_confirmed", "done": false, "required_for": null },
      { "key": "test_mandate_completed", "done": false, "required_for": null },
      { "key": "second_approver_invited", "done": false, "required_for": null },
      { "key": "approved", "done": true, "required_for": "live" },
      { "key": "live_connection", "done": false, "required_for": "live" },
      { "key": "live_account_verified", "done": false, "required_for": "live" },
      { "key": "live_payout_protection", "done": false, "required_for": "live" },
      { "key": "pricing_plan", "done": false, "required_for": "live" },
      { "key": "live_enabled", "done": false, "required_for": "live" }
    ],
    "presets": [
      { "key": "milestone_project", "version": 1, "values_status": "draft_values", "installed_at": "2026-11-02T09:05:00.000Z",
        "installed_by": "mem_6543a1b2c3d4e5f6a7b8c9d1", "values_confirmed_at": null, "values_confirmed_by": null }
    ]
  },
  "settings_version": 3,
  "automation_pause": null,
  "platform_notice": null,
  "suspension": null,
  "limits": { "rate_limit_per_minute": null, "max_mandate_amount": null },
  "legacy_api_enabled": false,
  "legacy_api_available": false,
  "is_qa_tenant": false,
  "terms_accepted": { "version": "2026-10-01", "accepted_at": "2026-11-02T08:55:00.000Z" },
  "created_at": "2026-11-02T08:55:00.000Z",
  "updated_at": "2026-11-05T17:02:11.000Z"
}

Endpoints

GET/tenant

Credential
Member session or API key
Permission
tenant.read
API key scope
any
Mode
tenant-wide

Response

200 Tenant.

GET/overview

Credential
Member session or API key
Permission
mandates.read
API key scope
mandates:read
Mode
scoped

Response

200 Overview (dashboard home; computed on read, cached ≤ 60 s per tenant+mode): {"object": "overview", "livemode": false, "currency": "usd", "money": {"held_amount": 1400000, "collected_30d_amount": 1800000, "released_30d_amount": 600000, "refunded_30d_amount": 0, "scheduled_next_7d_amount": 900000, "releases_waiting_amount": 1400000}, "mandates": {"by_status": {"active": 3, "awaiting_acceptance": 1}, "late": 0, "defaulted": 0, "with_open_dispute": 1, "stalled": 0, "setup_expiring_7d": 0}, "attention": {"inbox_open": 4, "inbox_urgent": 1, "releases_needing_approval": 1, "releases_blocked": 1, "open_breaks": 0, "open_disputes": 1, "collections_action_required": 0, "parties_unreachable": 0}, "connection": {"health": "connected", "balance_status": "ok", "payout_protection": "manual_payouts"}, "onboarding": {"checklist_done": 6, "checklist_total": 14, "next_step": "live_connection"}, "computed_at": "…"}. connection is null when this mode has no active connection; attention counts only what the caller may act on (members) or null for API keys.

GET/catalogue

Credential
Member session or API key
Permission
tenant.read
API key scope
any
Mode
tenant-wide

Response

200 Catalogue (: conditions, evidence types, trigger types and anchors, fund flows and rail labels, event and record types, roles → permissions, API scopes with live ceilings, reason codes, consent ids, reversal bases, cancellation bases and remainders, failure categories, break types, inbox types, notification templates, risk-flag codes, compliance packs, live prerequisites, error codes). Static per deploy (Cache-Control: private, max-age=300); the dashboard and docs render vocabularies from it instead of hard-coding them.

POST/tenant/revoke-sessions

Credential
Member session
Permission
members.manage
Mode
tenant-wide
Step-up
live (tenant live-enabled)
Idempotency
honoured

Request

reason string required (10–500).

Response

200 {"object": "logout_result", "current_session_revoked": true, "sessions_revoked": true}.

Record and events

member.sessions_revoked (data.scope: "tenant") · Notes: bumps tenant.sessionsVersion: every member session of the tenant, including the caller's, answers 401 session_revoked (a compromise response). API keys and portal grants are unaffected.

PATCH/tenant

Credential
Member session
Permission
tenant.update
Mode
tenant-wide
Step-up
live (tenant live-enabled) when support_email, support_phone, billing_email or billing_contact_name changes (: support_email is the Reply-To of party mail)
Idempotency
honoured

Request

display_name (1–120; no CR/LF, no <>"); legal_name (≤ 200); support_email; support_phone (≤ 40); billing_email; billing_contact_name (≤ 120); timezone (IANA name).

Response

200 Tenant.

Errors

400 parameter_invalid.

Record and events

tenant.profile_updated (diff of changed fields; contact values as keyed digests) · Notes: slug, company_name and country are changed only by Holdyn admins (portal links embed the slug). A timezone change applies to future date evaluations and to billing periods that have not started.

GET/tenant/onboarding

Credential
Member session
Permission
tenant.read
Mode
tenant-wide

Response

200 TenantOnboarding: {"object": "tenant_onboarding", "warning": {"version": "2026-11-01", "title": "Before you hold money for others", "text": "…", "text_hash": "…", "acknowledged_at": null, "acknowledged_by": null}, "control_profile": null, "control_profile_customised": null, "control_profiles": [{"key": "recommended_controls", "name": "Recommended controls", "recommended": true}, {"key": "start_minimal", "name": "Start minimal", "recommended": false}], "checklist": [ …as Tenant.onboarding.checklist ], "presets": [ …as Tenant.onboarding.presets ], "live_warnings": [ …as Tenant.live.warnings ], "record_key_fingerprints": [{"kid": "rk1", "fingerprint": "…64 hex"}]}. The warning text is Holdyn's standard onboarding warning (: the tenant's legal position is the tenant's; not legal advice). record_key_fingerprints: the record signing keys' fingerprints, shown at onboarding so the tenant holds them out of band.

POST/tenant/onboarding/acknowledge-warning

Credential
Member session
Permission
tenant.update
Mode
tenant-wide
Idempotency
honoured

Request

warning_version string required; text_hash string required (the hash of the text the member saw).

Response

200 TenantOnboarding.

Errors

409 terms_changed (+ terms_hash of the current warning) when the version/hash is stale.

Record and events

tenant.terms_acknowledged (warningVersion, textHash, member).

POST/tenant/request-live

Credential
Member session
Permission
tenant.update
Mode
tenant-wide
Idempotency
honoured

Request

note string optional (≤ 1000).

Response

200 Tenant (live.requested_at set; live.missing lists what is still needed, live.warnings what is advisable).

Errors

409 invalid_state_transition (already live-enabled, suspended, offboarded or rejected).

Record and events

tenant.live_requested · Notes: Slack ADMIN to Holdyn; enabling is an admin action.

GET/tenant/terminology

Credential
Member session or API key
Permission
tenant.read
API key scope
any
Mode
tenant-wide

Response

200 {"object": "terminology", "mandate": ["Project", "Projects"], "payer": ["Client", "Clients"], "payee": ["Provider", "Providers"], "stage": ["Milestone", "Milestones"], "collection": ["Payment", "Payments"], "release": ["Provider payment", "Provider payments"], "evidence": ["Evidence", "Evidence"]} (missing labels fall back to the generic term).

GET/tenant/holdyn-access

Credential
Member session
Permission
holdyn_access.read (owner, admin; API scope: none)
Mode
tenant-wide
Pagination
cursor

Request

period YYYY-MM (tenant timezone; default the previous month).

Response

200 {"object": "holdyn_access_report", "period": "2026-11", "timezone": "America/Los_Angeles", "entries": [{"id": "hacc_…", "at": "…", "admin": "hadm_…", "action": "b2b.read.mandate"|"b2b.read.party"|"b2b.read.evidence"|"b2b.read.timeline", "object": {"kind": "mandate", "id": "man_…"}, "mandate": "man_…"|null}], "has_more": false}. entries[].id is the cursor: starting_after=hacc_… (the bare 24-hex id earlier clients sent is still accepted); limit ≤ 100. - Notes: every Holdyn-admin READ of this tenant's mandates, parties, evidence and timelines is logged; owners and admins also get a monthly inbox item holdyn_access listing them (consistent with the independence promise).

GET/settings

Credential
Member session or API key
Permission
settings.read
API key scope
templates:read
Mode
tenant-wide

Response

200 SettingsVersion (the current version, with test_recipients_status) plus "pending_change_request": "chg_…"|null.

GET/settings/defaults

Credential
Member session or API key
Permission
settings.read
API key scope
templates:read
Mode
tenant-wide

Response

200 {"object": "settings_defaults", "version": "2026-11-01", "settings": <settings document with Holdyn defaults>}.

GET/settings/versions

Credential
Member session
Permission
settings.read
Mode
tenant-wide
Pagination
cursor (cursor values are `setv_` ids; newest first)

Response

200 ListResponse<SettingsVersion>.

GET/settings/versions/:version

Credential
Member session
Permission
settings.read
Mode
tenant-wide

Request

:version = integer version number (or a setv_ id).

Response

200 SettingsVersion.

POST/settings/preview

Credential
Member session
Permission
settings.update
Mode
tenant-wide
Idempotency
not stored (read-only)

Request

exactly one of settings (full document) or patch (deep partial; arrays replace).

Response

200 {"object": "settings_preview", "valid": true, "errors": [], "change_class": "weakening", "diff": [ …SettingsVersion.diff ], "requires_second_member": true, "sole_approver": false, "reason_required": true, "reason_required_paths": ["gate.duplicate_check.enabled"], "warnings": [ …SettingsVersion.warnings ]}. errors[]: {"code": "invalid_setting", "param", "message", "expected"}. sole_approver: true when the caller is the tenant's only active owner/admin (a weakening change would then apply itself after 72 h with notices). Nothing is stored.

PUT/settings

Credential
Member session
Permission
settings.update
Mode
tenant-wide
Idempotency
honoured

Request

settings object required (full document); expected_version integer required (the version the member edited); reason string (10–1000) required when any gate/control is switched off or the change class is weakening.

Response

200 {"object": "settings_update_result", "applied": true, "version": SettingsVersion, "change_request": null} — or 202 {"object": "settings_update_result", "applied": false, "version": null, "change_request": ChangeRequest} when the change is weakening and the TENANT is live-enabled, whatever the request mode. A tenant that is not live-enabled applies every class at once (recorded, author named). A document identical to the current one answers 200 with the current version (applied: false, no new version, no record).

Errors

400 invalid_setting (param, expected), reason_required; 409 settings_version_conflict (+ current_version), compliance_acknowledgement_required (+ pack), change_request_pending (+ change_request); 422 fund_flow_unavailable (direct_charge), feature_not_available (a P1 leaf switched on: payer_kinds with tenant, silence_rule.enabled, partial_when_underfunded, use_ach_target_date).

Record and events

settings.version_created (+ tenant.branding_updated / tenant.terminology_updated when those sections changed), or settings.change_requested + change_request.opened (inbox change_request_pending for members with settings.approve_change, not the proposer).

Notes

classification is computed by the server (lib/b2b/settings/classify.js; a leaf without a declared direction is weakening), never by the client. Sent mandates never change: a mandate's controls change only through POST /mandates/:id/controls. New test_recipients addresses each get a confirmation email (test_recipient_verification).

PATCH/settings

Credential
Member session
Permission
settings.update
Mode
tenant-wide
Idempotency
honoured - Same as PUT /settings but the body is {"patch": <deep partial>, "expected_version": n, "reason"?: string}; the server merges the patch into the current version (arrays replace) and proceeds exactly as PUT.

GET/change-requests

Credential
Member session
Permission
settings.read
Mode
tenant-wide
Pagination
cursor

Request

status (multi; default pending), kind (multi: settings, template_publish, mandate_controls, role_grant, api_key_live_write), mandate.

Response

200 ListResponse<ChangeRequest>.

GET/change-requests/:id

Credential
Member session
Permission
settings.read
Mode
tenant-wide

POST/change-requests/:id/approve

Credential
Member session
Permission
settings.approve_change (owner, admin, finance) for settings, template_publish, mandate_controls; owner or admin only for role_grant and api_key_live_write
Mode
tenant-wide
Step-up
live (tenant live-enabled)

Request

note string optional (≤ 1000).

Response

200 ChangeRequest (status: applied, applied_version set where a version applies).

Errors

403 insufficient_permission; 409 same_member_not_allowed (the proposer), approver_cooling (+ available_at), invalid_state_transition (not pending), settings_version_conflict (the settings/template/mandate controls moved since the proposal; the request is set withdrawn and the proposer re-proposes).

Record and events

change_request.decided then settings.change_approved + settings.version_created (kind settings), template.version_published (kind template_publish), mandate.controls_changed (kind mandate_controls), member.role_changed or the invitation email (kind role_grant), api_key.activated (kind api_key_live_write) · Events: mandate.controls_changed (kind mandate_controls).

POST/change-requests/:id/reject

Credential
Member session
Permission
as approve
Mode
tenant-wide
Idempotency
honoured

Request

note string required (10–1000).

Response

200 ChangeRequest (status: rejected; a rejected role_grant invitation is revoked change_request_rejected; a rejected api_key_live_write key is revoked). · Errors: 409 same_member_not_allowed, invalid_state_transition.

Record and events

change_request.decided, settings.change_rejected (kind settings).

POST/change-requests/:id/withdraw

Credential
Member session
Permission
settings.update and the caller is the proposer (else 403 insufficient_permission)
Mode
tenant-wide

Record and events

settings.change_withdrawn.

Notes

a sole-approver request applies itself at sole_approver.activates_at unless withdrawn (change_request.auto_applied).

GET/compliance-packs

Credential
Member session or API key
Permission
settings.read
API key scope
templates:read
Mode
tenant-wide

Response

200 ListResponse<CompliancePack> where CompliancePack = {"object": "compliance_pack", "id": "ca_bp_7159_5", "version": "2026-11-01", "name": "California B&P 7159.5 (home improvement payments)", "description": "…", "rules": [{"id": "deposit_cap", "description": "…"}, {"id": "payment_ahead_of_work", "description": "…"}], "exemption_kinds": ["bonded_contractor", "joint_control"], "modes": ["off", "warn", "block"], "options": [{"id": "count_held_collections_as_payment", "default": true, "description": "Count collections held before the first work stage is approved as payment to the provider (your attorney decides)."}], "disclaimer": "This check reflects California Business and Professions Code section 7159.5 as configured. It is not legal advice; your attorney decides how it applies.", "acknowledgement": {"text_version": "v1", "text": "…", "text_hash": "…"}, "tenant": {"mode": "warn", "options": {"count_held_collections_as_payment": false}, "acknowledged_at": "…", "acknowledged_by_member_id": "mem_…"}}.

POST/compliance-packs/:id/acknowledge

Credential
Member session
Permission
settings.update
Mode
tenant-wide
Idempotency
honoured

Request

text_version string required; text_hash string required.

Response

200 CompliancePack (a neutral-class settings version stores acknowledged_at / acknowledged_by_member_id).

Errors

409 terms_changed (stale text).

Record and events

compliance.pack_acknowledged, settings.version_created · Notes: required once before a pack's mode can leave off (409 compliance_acknowledgement_required from PUT /settings otherwise).

Tenant and settings · Holdyn Business docs