{"openapi":"3.1.0","info":{"title":"CLM Platform API","version":"0.2.0","description":"Contract lifecycle management. API-first: the platform's own screens use exactly these endpoints. The API enforces the lifecycle — see `x-lifecycle` for the transition table and `x-webhook-events` for what a host can subscribe to."},"servers":[{"url":"/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"clm_sk_… (organization) or clm_ik_… (integrator). Optional X-CLM-Actor header asserts the host's end user for the audit trail. With user login on (CLM_USER_LOGIN=on), a CLM user's Clerk session token, with X-CLM-Org: <organization id> (acts with the role's scopes), X-CLM-Context: platform (platform admins with a second factor), or neither (only /me). A user's request can also answer 401 session_expired (sign in again), 401 session_expired_for_org (only that organization's stricter limit passed) or 403 mfa_required (a second factor is needed in this session). X-CLM-User-Activity: 1 marks a user-initiated request; only those count as activity for the idle limit."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized","forbidden","integrator_suspended","organization_suspended","mfa_required","session_expired","session_expired_for_org","not_found","validation_failed","idempotency_conflict","secret_not_replayable","precondition_failed","conflict","subscription_retired","transition_not_allowed","packet_incomplete","documents_not_locked","document_prohibited","contract_immutable","signer_not_a_party","signer_unreachable","reason_required","audit_chain_broken","capability_not_supported","template_values_missing","generated_document_stale","provider_error","provider_unavailable","not_comparable","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"rule":{"type":"string","description":"The invariant or guard that refused the request"},"details":{}}}}},"Party":{"type":"object","required":["id","contractId","kind","side","role","isSigner","externalRef","externalSystem","externalId","personRef"],"properties":{"id":{"type":"string","format":"uuid"},"contractId":{"type":"string","format":"uuid"},"organizationId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["person","organization"]},"side":{"type":"string","enum":["us","counterparty","guarantor","other"]},"role":{"type":"string"},"firstName":{"type":["string","null"]},"middleName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"suffix":{"type":["string","null"]},"legalName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"isSigner":{"type":"boolean"},"signerSlot":{"type":["string","null"]},"signingOrder":{"type":["integer","null"]},"isPrimary":{"type":"boolean"},"externalRef":{"oneOf":[{"type":"object","required":["system","id"],"properties":{"system":{"type":"string"},"id":{"type":"string"}}},{"type":"null"}],"description":"The host's id for this party, as sent on create; null when it has none"},"externalSystem":{"type":["string","null"],"description":"Same value as externalRef.system (kept for older readers)"},"externalId":{"type":["string","null"],"description":"Same value as externalRef.id (kept for older readers)"},"personRef":{"type":["string","null"]},"sortOrder":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}},"paths":{"/contracts":{"get":{"summary":"List contracts, newest first; follow nextCursor until it is null","tags":["Contracts"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"contractType","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalSystem","in":"query","required":false,"schema":{"type":"string"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Case-insensitive match on title or external id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a contract — or return the existing one for the same externalRef (200, created: false). A draft found by its ref takes the request's parent (when it has none; 409 parent_mismatch when it has another), terms and dates; only values that differ are written, and `updated` lists what changed (parent, terms, dates). Concurrent creates of one ref yield one contract.","tags":["Contracts"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractType":{"type":"string","minLength":1,"maxLength":100,"description":"The contract type's key, e.g. residential_lease"},"title":{"type":"string","minLength":1,"maxLength":300},"externalRef":{"description":"The host's own object. Creating twice with the same ref returns the same contract.","type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["system","id"]},"groupRef":{"description":"Rule scope: e.g. the property owner's id in the host","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"subjectRef":{"description":"Rule scope: e.g. the property's id in the host","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"jurisdictionCodes":{"description":"Broad → narrow, e.g. [\"US\",\"US-CA\",\"US-CA-OAKLAND\"]","maxItems":8,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"facts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"terms":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"effectiveDate":{"type":["string","null"]},"expirationDate":{"type":["string","null"]},"parent":{"type":"object","properties":{"contractId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"relation":{"type":"string","enum":["amendment","renewal"]},"carryObligations":{"description":"\"open\": the parent's open obligations are carried into this contract, in the same transaction","type":"string","enum":["open"]}},"required":["contractId","relation"],"additionalProperties":false}},"required":["contractType","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/search":{"get":{"summary":"Full-text search: titles, parties (names, emails), facts, terms, document names and document text; best match first, paged (up to 50), with <mark>-highlighted snippets (everything else HTML-escaped)","tags":["Contracts"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200},"description":"Words, \"quoted phrases\", OR and -exclusions (web-search syntax). Matches titles, parties (names, emails), facts, terms, document names and document text. Words written inside angle brackets like tags (`<tenant>`) are not indexed."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","in_review","approved","out_for_signature","partially_executed","executed","active","expired","terminated","renewed","amended","declined","voided","cancelled","archived"]}},{"name":"contractType","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}":{"get":{"summary":"Get a contract, with the transitions available from its status","tags":["Contracts"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change content while the contract is a draft. Only values that differ are written (a no-op PATCH writes and audits nothing); `updated` lists what changed. Status cannot be set here.","tags":["Contracts"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"groupRef":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"subjectRef":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"jurisdictionCodes":{"maxItems":8,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"facts":{"description":"Merged into the stored facts; null clears a fact back to unknown","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"terms":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"effectiveDate":{"type":["string","null"]},"expirationDate":{"type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/effective-terms":{"get":{"summary":"Terms in force: the original plus every executed amendment (a view over the chain)","tags":["Contracts"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/parties":{"get":{"summary":"List parties. Each carries `externalRef` ({system, id}, or null) as well as externalSystem / externalId.","tags":["Parties"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Party"}}}}}}},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a party (201). A person is four name fields; a signer needs an email. With an externalRef already on the contract it updates that party instead (200): the fields sent are written, absent ones kept; past draft an identical body is 200 and any change is 409 contract_immutable.","tags":["Parties"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["person","organization"]},"side":{"type":"string","enum":["us","counterparty","guarantor","other"]},"role":{"type":"string","minLength":1,"maxLength":100},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","enum":["Jr","Sr","II","III","IV","V","VI"]},{"type":"string","const":""},{"type":"null"}]},"legalName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"isSigner":{"type":"boolean"},"signerSlot":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"signingOrder":{"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"isPrimary":{"type":"boolean"},"externalRef":{"description":"The host's party id. POST with an externalRef already on the contract updates that party (upsert).","type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["system","id"]},"personRef":{"description":"A stable id for the person across contracts (e.g. renewals). Stored and compared for equality only.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9:_-]+$"},"sortOrder":{"type":"integer","minimum":0,"maximum":999},"details":{"description":"Other details of the party (a form's row answers; nested groups as lists): templates read {{item.details.<key>}} and @each item.<key>","anyOf":[{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"additionalProperties":{}},{"type":"null"}]}},"required":["kind","side","role"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Party"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Party"}}}}}},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable | conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"signer_unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/parties/{partyId}":{"patch":{"summary":"Update a party (partial)","tags":["Parties"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"partyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["person","organization"]},"side":{"type":"string","enum":["us","counterparty","guarantor","other"]},"role":{"type":"string","minLength":1,"maxLength":100},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","enum":["Jr","Sr","II","III","IV","V","VI"]},{"type":"string","const":""},{"type":"null"}]},"legalName":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"string","const":""},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"isSigner":{"type":"boolean"},"signerSlot":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"signingOrder":{"anyOf":[{"type":"integer","minimum":1,"maximum":20},{"type":"null"}]},"isPrimary":{"type":"boolean"},"externalRef":{"description":"The host's party id. POST with an externalRef already on the contract updates that party (upsert).","type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["system","id"]},"personRef":{"description":"A stable id for the person across contracts (e.g. renewals). Stored and compared for equality only.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9:_-]+$"},"sortOrder":{"type":"integer","minimum":0,"maximum":999},"details":{"description":"Other details of the party (a form's row answers; nested groups as lists): templates read {{item.details.<key>}} and @each item.<key>","anyOf":[{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Party"}}}}}},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable | conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove a party","tags":["Parties"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"partyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/limits":{"get":{"summary":"The legal limits of the contract's pack (e.g. security_deposit_max_months), each resolved for its jurisdictions and facts: known (value, unit, the limit that decided it with its citation; unverified until counsel confirms), unknown (with the facts that would settle it: never 0), or none. The strictest applicable value at the most specific jurisdiction wins; a lower scope can only tighten it. Each limit the pack checks carries `check`: within or over (total and cap), exempt, or unknown (with what's missing). The deposit cap counts every move-in security, which goes under the terms `security.<name>` (security.deposit, security.petDeposit, …; not security.alterationsFee or security.screeningFee); a term elsewhere that looks like security makes it unknown.","tags":["Contracts"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/documents":{"get":{"summary":"List current documents","tags":["Documents"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Attach a document or a new version. The platform computes the SHA-256. A sent file (contentBase64) is typed by its bytes (PDF, Word without macros, JPEG, PNG, plain text; else 400 document_type_not_allowed) and scanned for malware before it's kept: refused with 400 document_scan_refused (details.reason malware, encrypted or too_complex), or 503 scanner_not_configured / scanner_unavailable with nothing kept (try again).","tags":["Documents"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentKey":{"type":"string","minLength":1,"maxLength":120,"description":"Ties the document to its packet line"},"name":{"type":"string","minLength":1,"maxLength":300},"contentBase64":{"description":"The file (at most 3 MB). Its SHA-256 is computed by the platform.","type":"string","minLength":1,"maxLength":4194304},"sourceUrl":{"description":"Register by reference instead; sha256 is then required","type":"string","format":"uri"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"contentType":{"description":"Only text/plain is read from it (text has no signature to check): a sent file's type is read from its bytes (PDF, Word without macros, JPEG, PNG, or plain text) and anything else is refused","type":"string","maxLength":120},"sequence":{"type":"integer","minimum":0,"maximum":9999},"covers":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"description":"Other packet lines this document covers (a retainer containing the fee statement): the attaching person's judgment, recorded with who and when"}},"required":["documentKey","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable | document_prohibited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/documents/comparable":{"get":{"summary":"Every document of the contract's family (the contract, its amendments and its renewals, from the root of its parent chain), each version, with its contract's title and text status: what /documents/compare can compare","tags":["Documents"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/documents/compare":{"get":{"summary":"What changed from one document of the contract's family to another, word by word: data.hunks (equal, insert, delete; unchanged runs cut to 25 words each side of a change, the rest a skip with its word count) and data.stats (words inserted, deleted, unchanged). A TEXT comparison of the text read on attach: formatting, images and signatures don't count; textTruncated when a document's text was cut at 200,000 characters. Identical bytes: identical, no hunks. 409 compare_text_pending while a text is being read; 422 compare_text_unavailable when one has none (by reference, a scan, unreadable); 422 compare_too_different past the diff's limits. A document outside the family is a 404. 60 an hour per person (429 compare_rate)","tags":["Documents"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The earlier document's id"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The later document's id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"not_comparable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/documents/generate":{"post":{"summary":"Generate the document for a packet line from a template (current version unless one is named) and attach it as a new version. Every placeholder needs a value: missing ones are listed (422 template_values_missing), never left blank. Dates and numbers are formatted in `locale` / `timeZone` (default: the organization's settings, else en-US / UTC). The document records its template version, its locale and time zone, and a hash of its inputs; submit and approve refuse with generated_document_stale if the contract changed since.","tags":["Documents"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"description":"Defaults to the template's current version","type":"integer","minimum":1,"maximum":9007199254740991},"locale":{"description":"BCP 47 locale for dates and numbers, e.g. en-US or es-US. Defaults to the organization's, else en-US","type":"string","minLength":2,"maxLength":35},"timeZone":{"description":"IANA time zone for {{document.date}}, e.g. America/Los_Angeles. Defaults to the organization's, else UTC","type":"string","minLength":1,"maxLength":64}},"required":["templateId"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable | document_prohibited | conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"template_values_missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/documents/{documentId}/covers":{"put":{"summary":"Declare the other packet lines this document covers (a retainer that contains the fee statement), replacing its list; [] clears it. The declaring person's judgment, recorded with who and when and audited. A packet line counts as attached when a current document's key or covers names it. Only the current version, while the contract is in draft; a new version declares its own (attach takes covers too).","tags":["Documents"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"covers":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"description":"Other packet lines this document covers (a retainer containing the fee statement): the attaching person's judgment, recorded with who and when"}},"required":["covers"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable | document_prohibited | conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/documents/{documentId}":{"delete":{"summary":"Remove a document from the packet (history is kept)","tags":["Documents"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"contract_immutable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/packet":{"get":{"summary":"The explained packet: every line with the rule that decided it, its citation and scope, and the facts still needed","tags":["Packet"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"asOf","in":"query","required":false,"schema":{"type":"string"},"description":"Evaluate rules as of this date"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/advance":{"post":{"summary":"Submit, approve and send as far as `to`, in order, stopping at the first step it cannot take. Each step is a normal audited transition, serialized per contract (two concurrent advances send once). A renewal is approved by the organization's policy when it allows (actor policy:renewal_auto_approve, with the evaluation in the audit event). Steps are done / skipped / blocked (with rule, message, details); refusals about the data are blocked steps, not HTTP errors. trigger \"auto\" sends only when the policy has autoSend; \"manual\" needs a human actor (400 manual_requires_actor) and sends regardless.","tags":["Lifecycle"],"description":"Required scope: `contracts:write (+ contracts:approve to approve, signature:send to send)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","enum":["in_review","approved","out_for_signature"]},"trigger":{"default":"auto","description":"\"auto\": the host's automatic run (sends only if the policy has autoSend). \"manual\": a person chose to send (needs a human actor)","type":"string","enum":["auto","manual"]},"send":{"type":"object","properties":{"connectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subject":{"type":"string","minLength":1,"maxLength":250},"message":{"type":"string","maxLength":5000},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"additionalProperties":false}},"required":["to"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/transitions":{"get":{"summary":"What can happen next, and exactly which rule blocks anything that cannot","tags":["Lifecycle"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Run a lifecycle transition — the only way status changes","tags":["Lifecycle"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"transition":{"type":"string","enum":["submit","withdraw","approve","reject","send_for_signature","signature_send_failed","record_partial_signature","complete_signature","record_decline","void","record_provider_void","cancel","reopen","activate","expire","terminate","supersede_by_renewal","supersede_by_amendment","record_import","archive"]},"reason":{"type":"string","maxLength":2000},"connectionId":{"description":"send_for_signature: which provider connection; default if omitted","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["transition"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"transition_not_allowed | packet_incomplete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"reason_required | signer_unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/audit":{"get":{"summary":"Append-only, hash-chained history, with a fresh verification of the chain","tags":["Lifecycle"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/signature":{"get":{"summary":"Signature requests and per-recipient status","tags":["Signature"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Send the approved, locked documents to the contract's signers","tags":["Signature"],"description":"Required scope: `signature:send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subject":{"type":"string","minLength":1,"maxLength":250},"message":{"type":"string","maxLength":5000},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"transition_not_allowed | documents_not_locked | conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"capability_not_supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Void at the provider, with the reason","tags":["Signature"],"description":"Required scope: `signature:send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/signature/reconcile":{"post":{"summary":"Settle a send that may have reached the provider (send_uncertain): not_sent, or sent with the provider's envelope id. Checked with the provider wherever it can be; a sent envelope is taken over only when it is live and carries exactly what would be sent now. Audited","tags":["Signature"],"description":"Required scope: `signature:send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"outcome":{"type":"string","enum":["not_sent","sent"],"description":"What the person found at the provider: \"not_sent\" (nothing went out), or \"sent\" (it went out, with its envelope id)"},"providerEnvelopeId":{"description":"Required for sent: the provider's id for the envelope that went out","type":"string","minLength":1,"maxLength":200}},"required":["outcome"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/signature/sync":{"post":{"summary":"Ask the provider for the current status now","tags":["Signature"],"description":"Required scope: `signature:send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/signature/signed-document/retry":{"post":{"summary":"The signed file the malware check refused (signedRefusal): download and scan it again. The refusal is cleared and audited first; a second refusal is recorded again","tags":["Signature"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/signature/signed-document/accept":{"post":{"summary":"Accept, after review, a refused signed file the scanner couldn't look inside (encrypted or too_complex; never malware or not_pdf), with the reason. Stored only while the provider's file still has the reviewed sha256; the contract then settles. Audited with who and why","tags":["Signature"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":5,"maxLength":1000}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signature-refusals":{"get":{"summary":"Signed files the malware check refused that still wait on an Owner or Admin (retry, or accept after review), oldest first: contract, file, reason, sha256, whether it may be accepted","tags":["Signature"],"description":"Required scope: `contracts:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/signature/remind":{"post":{"summary":"Remind signers who have not signed","tags":["Signature"],"description":"Required scope: `signature:send`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/obligations":{"get":{"summary":"Obligations and key dates of a contract","tags":["Obligations"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add an obligation to an executed contract","tags":["Obligations"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_.-]+$"},"title":{"type":"string","minLength":1,"maxLength":300},"dueDate":{"type":["string","null"]},"legalBasis":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"ownerRef":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["key","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/key-dates":{"get":{"summary":"The contract's upcoming dates: its effective date (not yet in force), its expiration (in force), and each open obligation's due date (past-due ones too), with daysLeft in whole UTC days, the key-date alert leads already emailed for that date (alertsSent), and when the next alert is due (nextAlertOn; null when the policy is off or none will be). Also today (UTC) and alertsOn","tags":["Obligations"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/obligations/{obligationId}":{"post":{"summary":"Complete (with evidence), waive (with reason), reschedule, reassign, or carry over to the successor","tags":["Obligations"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"obligationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"complete"},"evidence":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"note":{"type":"string","maxLength":2000}},"required":["action","evidence"]},{"type":"object","properties":{"action":{"type":"string","const":"waive"},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["action","reason"]},{"type":"object","properties":{"action":{"type":"string","const":"reschedule"},"dueDate":{"type":"string"},"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["action","dueDate","reason"]},{"type":"object","properties":{"action":{"type":"string","const":"reassign"},"ownerRef":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["action","ownerRef"]},{"type":"object","properties":{"action":{"type":"string","const":"carry_over"},"toContractId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["action","toContractId"]}],"description":"Close, move or hand over an obligation. Closing needs evidence or a reason."}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/obligations":{"get":{"summary":"Obligations across the organization, soonest due first; follow nextCursor until it is null","tags":["Obligations"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"dueBefore","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","done","waived","carried_over","lapsed"]}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/providers":{"get":{"summary":"The eSignature providers, with what each can and cannot do","tags":["Signature"],"description":"Required scope: `(any key)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/provider-connections":{"get":{"summary":"The organization's provider connections (credentials are never returned)","tags":["Signature"],"description":"Required scope: `connections:write`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Connect the organization's own eSignature vendor account","tags":["Signature"],"description":"Required scope: `connections:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["esign_platform","docusign","box_sign","dropbox_sign","adobe_sign"]},"name":{"type":"string","minLength":1,"maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secret":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Vendor credentials. Encrypted at rest; never returned."},"isDefault":{"type":"boolean"},"validate":{"default":true,"description":"Check the credentials with the vendor before saving","type":"boolean"}},"required":["provider","name","secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"provider_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/provider-connections/oauth":{"get":{"summary":"Providers that can be connected by the customer's consent (OAuth) on this deployment","tags":["Signature"],"description":"Required scope: `connections:write`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Start a consent flow: returns the vendor URL to send the person to; the callback creates the connection","tags":["Signature"],"description":"Required scope: `connections:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"capability_not_supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/provider-connections/{id}":{"delete":{"summary":"Deactivate a connection","tags":["Signature"],"description":"Required scope: `connections:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/provider-connections/{id}/validate":{"post":{"summary":"Check with the vendor that the stored credentials still work","tags":["Signature"],"description":"Required scope: `connections:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contract-types":{"get":{"summary":"Contract types, each with the facts its rules may test","tags":["Rules"],"description":"Required scope: `contracts:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses":{"get":{"summary":"The organization's clause library, newest first (active only unless includeInactive=true), each with its latest version's status and its latest approved version. q (at most 200 characters, websearch syntax: words, \"a phrase\", -not, or) matches the title, the key and any approved version's text; a query that can't be used is a 400 (clause_search_invalid). Filters: category, contractType, status (of the latest version)","tags":["Clauses"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]}},{"name":"contractType","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending_approval","approved","rejected","retired"]},"description":"Clauses whose latest version has this status"},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"A new clause (key unique in the organization: 409 clause_key_taken) and its first version, a DRAFT: the standard text and up to 3 fallbacks, each at most 20,000 characters of paragraphs, bullets and **bold** with {{placeholders}} (never headings, @ lines, page breaks, signer fields or other clauses; facts only for a clause of one contract type; 400 clause_invalid lists each problem). Audited clause.created","tags":["Clauses"],"description":"Required scope: `templates:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]},"contractType":{"description":"Absent: usable in any contract type's templates (its text may then use no facts)","type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":20000},"fallbacks":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["label","body"],"additionalProperties":false}}},"required":["key","title","category","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/import":{"post":{"summary":"Import up to 200 clauses in one JSON body of at most 1,000,000 bytes (400 clause_import_too_large; Content-Type application/json): all or none, each a new clause whose first version is a DRAFT (an import approves nothing). 10 imports an hour per organization (429 clause_import_rate). Each audited clause.created (via import)","tags":["Clauses"],"description":"Required scope: `templates:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clauses":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]},"contractType":{"description":"Absent: usable in any contract type's templates (its text may then use no facts)","type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":20000},"fallbacks":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["label","body"],"additionalProperties":false}}},"required":["key","title","category","body"],"additionalProperties":false}}},"required":["clauses"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}":{"get":{"summary":"A clause and every version, newest first: text, fallbacks, content hash, status, and who and when for each step; viewer says whether the caller holds clauses:approve (canDecide) and their principal (a version is never decided by its author), for a screen to offer only what the API would allow","tags":["Clauses"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a clause's title, category or active flag (the text changes only by a new version). Audited clause.updated","tags":["Clauses"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"category":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/versions":{"post":{"summary":"The clause's next version, a DRAFT (same rules as a new clause's text). Earlier versions never change. Audited clause.version_created","tags":["Clauses"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":20000},"fallbacks":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"body":{"type":"string","minLength":1,"maxLength":20000}},"required":["label","body"],"additionalProperties":false}}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/versions/{version}":{"get":{"summary":"One version of a clause","tags":["Clauses"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/versions/{version}/submit":{"post":{"summary":"Send a draft version for approval (409 clause_version_status from any other status). Audited clause.version_submitted","tags":["Clauses"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/versions/{version}/approve":{"post":{"summary":"Approve a version sent for approval, with its fallbacks as one; never by its author (403 clause_self_approval). The approver and time are recorded with the status, and a status never moves back. Audited clause.version_approved","tags":["Clauses"],"description":"Required scope: `clauses:approve`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/versions/{version}/reject":{"post":{"summary":"Reject a version sent for approval, with a reason (final: the author makes a new version). Audited clause.version_rejected","tags":["Clauses"],"description":"Required scope: `clauses:approve`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":2000}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/versions/{version}/retire":{"post":{"summary":"Retire an approved version: no new template version may pin it (templates that already do still generate). Audited clause.version_retired","tags":["Clauses"],"description":"Required scope: `clauses:approve`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clauses/{id}/usage":{"get":{"summary":"Where a clause is in use: every template version pinning one of its versions (with whether it is the template's current version), and the contracts whose current choice is one of its fallbacks (newest first, at most 200)","tags":["Clauses"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/clauses":{"get":{"summary":"The library clauses the contract's templates pin (its type's active templates at their current versions, and its current generated documents' template versions): each pinned version's standard text, its fallbacks, the templates pinning it, and the contract's current choice","tags":["Clauses"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/clauses/{key}/choice":{"post":{"summary":"Negotiate a pinned clause on a draft contract (409 contract_immutable otherwise): one of the pinned version's approved fallbacks (a reason required, 400 clause_choice_reason_required) or the standard text. version is needed when the contract's templates pin more than one version of the clause (409 clause_version_ambiguous). The current choice is superseded (kept); audited on the contract as clause.fallback_selected or clause.standard_restored; generated documents become stale until regenerated; the contract's submit and approve records list its negotiated clauses (negotiatedClauses). A choice applies only to the version it was made for","tags":["Clauses"],"description":"Required scope: `contracts:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"choice":{"type":"string","enum":["standard","fallback_1","fallback_2","fallback_3"]},"version":{"description":"The pinned version meant, when the contract's templates pin more than one version of this clause","type":"integer","minimum":1,"maximum":9007199254740991},"reason":{"description":"Why (recorded in the audit trail); required for a fallback","type":"string","minLength":1,"maxLength":1000}},"required":["choice"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict | contract_immutable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/approval-routes":{"get":{"summary":"The organization's approval routes, by contract type and priority","tags":["Policies"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"contractType","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"A new approval route for a contract type: when all its conditions hold (fact conditions over the type's facts; term conditions compared exactly as decimals), or can't be decided (an unknown fact or missing term: fail safe), submitting a contract of that type needs each of its steps in order, each approved by minApprovals (1-3) distinct people from its pool (a group's current members, members with a built-in role or above, or a host-asserted role). At most 5 steps; at most 10 active routes per type (409 approval_routes_limit); 400 approval_route_invalid lists each problem. Audited approval_route.created","tags":["Policies"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractType":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"priority":{"default":100,"type":"integer","minimum":0,"maximum":10000},"factConditions":{"default":[],"description":"The rules engine's {fact, op, value} over the type's facts","maxItems":20,"type":"array","items":{}},"termConditions":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"term":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"},"op":{"type":"string","enum":["lt","lte","gt","gte","eq"]},"value":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,2})?$"}},"required":["term","op","value"],"additionalProperties":false}},"steps":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"pool":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"group"},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","groupId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"role"},"role":{"type":"string","enum":["owner","admin","contract_manager"]}},"required":["kind","role"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asserted_role"},"role":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","role"],"additionalProperties":false}]},"minApprovals":{"type":"integer","minimum":1,"maximum":3}},"required":["name","pool","minApprovals"],"additionalProperties":false}}},"required":["contractType","name","steps"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/approval-routes/{id}":{"get":{"summary":"One approval route","tags":["Policies"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a route or (de)activate it; version counts the edits. A contract already submitted keeps the plan it was given; at its last approval, routes that now ask for more are a 409 approval_plan_changed (withdraw and submit again). Audited approval_route.updated with before and after","tags":["Policies"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"priority":{"type":"integer","minimum":0,"maximum":10000},"factConditions":{"maxItems":20,"type":"array","items":{}},"termConditions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"term":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"},"op":{"type":"string","enum":["lt","lte","gt","gte","eq"]},"value":{"type":"string","pattern":"^\\d{1,13}(\\.\\d{1,2})?$"}},"required":["term","op","value"],"additionalProperties":false}},"steps":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"pool":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"group"},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","groupId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"role"},"role":{"type":"string","enum":["owner","admin","contract_manager"]}},"required":["kind","role"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asserted_role"},"role":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","role"],"additionalProperties":false}]},"minApprovals":{"type":"integer","minimum":1,"maximum":3}},"required":["name","pool","minApprovals"],"additionalProperties":false}},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/approval-routes/{id}/versions":{"get":{"summary":"Every version of an approval route as it was written (create and each edit; never changed or deleted), newest first: a contract's frozen plan names the version (routes[].versionId) it came from","tags":["Policies"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contracts/{id}/approval":{"get":{"summary":"The contract's approval (waiting, or the latest): the plan frozen at submit (the routes that applied, what was unknown, the steps), each step's status and approvals, and whether the caller may approve now. On a routed approval, the approve transition records one person's approval of the step waiting (403 approval_step_not_yours outside its pool; 409 approval_one_step_each: one approval per person per contract approval, whatever the step); the last one approves the contract, recording every decision (approvalSteps)","tags":["Contracts"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/imports":{"get":{"summary":"The organization's legacy contract imports, newest first (at most 50)","tags":["Contracts"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Check a legacy contract import's CSV manifest (the body, text/csv, at most 1,000,000 bytes and 1,000 rows): columns title, contract_type, status (executed, active, expired, terminated), effective_date, expiration_date, signed_on, external_system, external_id, file, document_key, party1_… to party4_… (kind, side, role, first_name, middle_name, last_name, suffix, legal_name, email, phone), fact.<key>, term.<key>. Every row is checked as the API would (and an external ref already in the organization is an error, never an overwrite); nothing is made (a dry run). The manifest is kept only after its malware scan (503 while no scanner is set up). 5 a day per organization","tags":["Contracts"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/imports/{id}":{"get":{"summary":"An import: each row's status (invalid, waiting_file, ready, imported, failed), problems, file and contract","tags":["Contracts"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/imports/{id}/rows/{row}/file":{"put":{"summary":"A row's signed PDF, as the body (at most 4,000,000 bytes), with ?fileName= the row's file: a PDF by its bytes, then the malware scan (503 while unavailable; 400 document_scan_refused, held for review), then kept; the row is ready. Sent again before commit, it replaces the earlier file","tags":["Contracts"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"row","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/imports/{id}/commit":{"post":{"summary":"Make each ready row's contract, one transaction each: the contract, its parties (not signers), its signed copy (locked), the record_import transition (a record from the start), then activate, expire or terminate to its status; executed and active imports get their pack's executed obligations. Audited contract.imported. A failed row says why; the rest go on. Safe to run again: each row's contract is made once","tags":["Contracts"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/policies/renewal":{"get":{"summary":"The organization's renewal approval policy for a contract type (all off until chosen), the platform's bounds, and the effective (clamped) values","tags":["Policies"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"contractType","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Choose the renewal approval policy within the platform's bounds (400 outside_platform_bounds, each problem listed), and the renewal window: renewalWindowDays (30..180; 90 until set; absent keeps the stored value) before expiration, contract.renewal_window is sent once per contract in force with no live renewal. Audited.","tags":["Policies"],"description":"Required scope: `policies:write`.","parameters":[{"name":"contractType","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"autoApprove":{"type":"boolean"},"maxRentIncreasePct":{"type":"string","pattern":"^\\d{1,2}\\.\\d{2}$"},"autoSend":{"type":"boolean"},"requireSameParties":{"type":"boolean"},"renewalWindowDays":{"description":"Days before expiration that contract.renewal_window is sent (30..180; 90 until set). Absent: the stored value is kept","type":"integer","minimum":30,"maximum":180}},"required":["autoApprove","maxRentIncreasePct","autoSend","requireSameParties"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/policies/key-date-alerts":{"get":{"summary":"The organization's key-date alerts (off until chosen): enabled, renewalLeadDays, obligationLeadDays, obligationOverdue and recipientMemberIds","tags":["Policies"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Replace the key-date alert policy. The chosen members are emailed a digest, once per item and lead, when a contract in force with no live renewal nears its expiration date and when an open obligation on a signed contract nears (or passes, up to 30 days back) its due date. Days left are counted in UTC whole days; an item is sent at the smallest lead it has reached. Each recipient must be an active member (400 key_date_recipient_not_member); enabling needs one (400 key_date_recipients_required). Recipients are re-checked when sent (active, not opted out); a sandbox organization is never emailed; each email counts toward the organization's hourly email ceiling. obligationLeadDays and obligationOverdue also time the obligation.due_soon and obligation.overdue webhooks (7 and 1 days, and overdue, until chosen), whether or not the emails are on. Audited key_date_alerts.policy_updated","tags":["Policies"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"renewalLeadDays":{"description":"Days before a contract's expiration (1..3 values, each 1..365)","maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":365}},"obligationLeadDays":{"description":"Days before an open obligation's due date (0..3 values, each 1..90; none: no due-soon alerts)","maxItems":3,"type":"array","items":{"type":"integer","minimum":1,"maximum":90}},"obligationOverdue":{"type":"boolean","description":"Alert once when an open obligation's due date has passed (up to 30 days back)"},"recipientMemberIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["enabled","renewalLeadDays","obligationLeadDays","obligationOverdue","recipientMemberIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rules":{"get":{"summary":"The organization's rules and, read-only, the platform rules above them","tags":["Rules"],"description":"Required scope: `rules:read`.","parameters":[{"name":"contractType","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an organization, group or subject rule","tags":["Rules"],"description":"Required scope: `rules:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractType":{"type":"string","minLength":1},"documentKey":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_.-]+$"},"scope":{"type":"string","enum":["organization","group","subject"]},"scopeRef":{"description":"group or subject: the host's id for it. Omit for organization scope.","type":"string","minLength":1,"maxLength":200},"documentName":{"type":"string","minLength":1,"maxLength":200},"documentCategory":{"default":"other","type":"string","enum":["disclosure","agreement","lease_agreement","addendum","notice","inspection","other"]},"jurisdictionCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":60},{"type":"null"}]},"requirement":{"type":"string","enum":["required","recommended","optional","prohibited"]},"conditions":{"default":[],"maxItems":10,"type":"array","items":{}},"legalBasis":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"sourceNote":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"effectiveFrom":{"type":["string","null"]},"effectiveTo":{"type":["string","null"]},"sequence":{"default":500,"type":"integer","minimum":0,"maximum":9999},"isActive":{"default":true,"type":"boolean"}},"required":["contractType","documentKey","scope","documentName","requirement"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rules/{id}":{"get":{"summary":"One of the organization's own rules","tags":["Rules"],"description":"Required scope: `rules:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update one of the organization's own rules (partial)","tags":["Rules"],"description":"Required scope: `rules:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentName":{"type":"string","minLength":1,"maxLength":200},"documentCategory":{"type":"string","enum":["disclosure","agreement","lease_agreement","addendum","notice","inspection","other"]},"jurisdictionCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":60},{"type":"null"}]},"requirement":{"type":"string","enum":["required","recommended","optional","prohibited"]},"conditions":{"maxItems":10,"type":"array","items":{}},"legalBasis":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"sourceNote":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"effectiveFrom":{"type":["string","null"]},"effectiveTo":{"type":["string","null"]},"sequence":{"type":"integer","minimum":0,"maximum":9999},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Deactivate one of the organization's own rules (never deleted): it stops applying to packets resolved from now on and stays readable by id, so past packets still explain themselves. Optional reason. Audited; reactivate with PATCH isActive: true.","tags":["Rules"],"description":"Required scope: `rules:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates":{"get":{"summary":"The organization's document templates (active only unless includeInactive=true)","tags":["Templates"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"contractType","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"documentKey","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a template for one packet line of a contract type (version 1). Placeholders are checked against the type's fact vocabulary; every problem is listed (400, rule template_invalid). A whole line `@clause <key> v<N>` (outside loops) pins version N of the organization's clause <key>: it must be approved (not retired), active, and for this contract type or any (400 template_clause_invalid lists each problem); the version records its pins (clauseRefs), and a newer clause version never changes them.","tags":["Templates"],"description":"Required scope: `templates:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractType":{"type":"string","minLength":1},"documentKey":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_.-]+$","description":"The packet line this template fills"},"name":{"type":"string","minLength":1,"maxLength":300,"description":"Becomes the generated document's name"},"body":{"type":"string","minLength":1,"maxLength":200000,"description":"Template text: # headings, - bullets, --- page breaks, **bold**, {{placeholders}} (see docs/TEMPLATES.md)"},"covers":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"description":"Other packet lines this document covers (a retainer containing the fee statement): the attaching person's judgment, recorded with who and when"}},"required":["contractType","documentKey","name","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}":{"get":{"summary":"A template and its versions (newest first)","tags":["Templates"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename, deactivate or reactivate a template (never deleted). Audited.","tags":["Templates"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}/versions":{"post":{"summary":"Add a version; it becomes current. Versions are immutable. Audited. Covers are declared per version: the answer carries previousCovers, and when this version leaves some out, coversDropped and a warning (the documents it generates won't count for those lines).","tags":["Templates"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":200000,"description":"Template text: # headings, - bullets, --- page breaks, **bold**, {{placeholders}} (see docs/TEMPLATES.md)"},"covers":{"description":"Declared again for each version (its own text): absent covers nothing","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/templates/{id}/versions/{version}":{"get":{"summary":"One version, with its body","tags":["Templates"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms":{"get":{"summary":"The organization's contract intake forms","tags":["Forms"],"description":"Required scope: `contracts:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a form: the contract type it builds, the template that renders it, and version 1 as a draft. Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"contractType":{"type":"string","minLength":1,"maxLength":100,"description":"The contract type the form builds, e.g. residential_lease"},"templateId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The template that renders the contract; it must be for the same contract type. Its current version is pinned at each publish"},"definition":{"type":"object","properties":{"pages":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","minLength":1,"maxLength":300},"sections":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","maxLength":300},"fields":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"short_text"},"maxLength":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"long_text"},"maxLength":{"type":"integer","minimum":1,"maximum":20000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"number"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"currency"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"percent"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date_range"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"mapStart":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"mapEnd":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"single_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"dropdown"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"multiple_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}},"minSelected":{"type":"integer","minimum":0,"maximum":200},"maxSelected":{"type":"integer","minimum":1,"maximum":200}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"yes_no"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"acknowledgement"},"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Shown with the checkbox; kept in the version, so what was acknowledged is exact"}},"required":["id","label","type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"person_name"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"address"},"usOnly":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"email"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"phone"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"file_upload"},"accept":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(\\.[a-z0-9]{1,10}|[a-z]+\\/(\\*|[a-z0-9.+-]{1,60}))$"}},"maxBytes":{"type":"integer","minimum":1,"maximum":26214400},"maxFiles":{"type":"integer","minimum":1,"maximum":10}},"required":["id","label","type","accept","maxBytes","maxFiles"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"type":{"type":"string","const":"content"},"style":{"type":"string","enum":["heading","text","divider"]},"text":{"type":"string","maxLength":5000}},"required":["id","type","style"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"type":{"type":"string","const":"calculated"},"required":{},"prefill":{},"expression":{"type":"string","minLength":1,"maxLength":2000,"description":"e.g. rent * 2, days(move_in, move_out), if(pets = true, 500, 0)"},"valueType":{"type":"string","enum":["number","currency","percent","date"],"description":"How the result is kept: currency is 2 decimal places, rounded half-even"},"decimals":{"description":"number and percent: places kept, rounded half-even (default 2)","type":"integer","minimum":0,"maximum":6}},"required":["id","label","type","expression","valueType"],"additionalProperties":false}]}},"repeat":{"type":"object","properties":{"min":{"default":0,"type":"integer","minimum":0,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50},"rowLabel":{"description":"e.g. \"Occupant {n}\" or \"{firstName} {lastName}\"","type":"string","maxLength":200},"addLabel":{"type":"string","maxLength":100}},"additionalProperties":false},"party":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"},"side":{"default":"counterparty","type":"string","enum":["us","counterparty","guarantor","other"]},"kind":{"default":"person","type":"string","enum":["person","organization"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$","description":"The row's name field: a person name (four parts) for a person, a short text (legal name) for an organization"},"email":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"phone":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"signs":{"anyOf":[{"type":"string","enum":["always","never"]},{"type":"object","properties":{"when":{"$ref":"#/$defs/__schema0"}},"required":["when"],"additionalProperties":false}],"description":"Whether a row signs: always, never (occupants), or when a condition holds for that row"},"signingOrder":{"description":"Rows of a group sign in parallel; groups sign in this order. Defaults to the group's place among the form's party groups","type":"integer","minimum":1,"maximum":20}},"required":["role","name","signs"],"additionalProperties":false},"carry":{"description":"A follow-on form's rows carried from the agreement's people (repeating sections only)","type":"object","properties":{"roles":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"}},"lock":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"allowRemove":{"default":false,"description":"The person filling it in may leave someone out (nothing is recorded for them)","type":"boolean"},"fillBy":{"default":"submitter","description":"Who fills each row: the submitter, for everyone; or each person their own, through their own emailed link (P5, §9.6)","type":"string","enum":["submitter","each_person"]}},"required":["roles"],"additionalProperties":false},"groups":{"description":"Groups repeated inside each row (repeating sections only; one level)","maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","maxLength":300},"fields":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"short_text"},"maxLength":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"long_text"},"maxLength":{"type":"integer","minimum":1,"maximum":20000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"number"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"currency"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"percent"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date_range"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"mapStart":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"mapEnd":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"single_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"dropdown"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"multiple_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}},"minSelected":{"type":"integer","minimum":0,"maximum":200},"maxSelected":{"type":"integer","minimum":1,"maximum":200}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"yes_no"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"acknowledgement"},"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Shown with the checkbox; kept in the version, so what was acknowledged is exact"}},"required":["id","label","type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"person_name"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"address"},"usOnly":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"email"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"phone"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"file_upload"},"accept":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(\\.[a-z0-9]{1,10}|[a-z]+\\/(\\*|[a-z0-9.+-]{1,60}))$"}},"maxBytes":{"type":"integer","minimum":1,"maximum":26214400},"maxFiles":{"type":"integer","minimum":1,"maximum":10}},"required":["id","label","type","accept","maxBytes","maxFiles"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"type":{"type":"string","const":"content"},"style":{"type":"string","enum":["heading","text","divider"]},"text":{"type":"string","maxLength":5000}},"required":["id","type","style"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"type":{"type":"string","const":"calculated"},"required":{},"prefill":{},"expression":{"type":"string","minLength":1,"maxLength":2000,"description":"e.g. rent * 2, days(move_in, move_out), if(pets = true, 500, 0)"},"valueType":{"type":"string","enum":["number","currency","percent","date"],"description":"How the result is kept: currency is 2 decimal places, rounded half-even"},"decimals":{"description":"number and percent: places kept, rounded half-even (default 2)","type":"integer","minimum":0,"maximum":6}},"required":["id","label","type","expression","valueType"],"additionalProperties":false}]}},"repeat":{"type":"object","properties":{"min":{"default":0,"type":"integer","minimum":0,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50},"rowLabel":{"description":"e.g. \"Occupant {n}\" or \"{firstName} {lastName}\"","type":"string","maxLength":200},"addLabel":{"type":"string","maxLength":100}},"additionalProperties":false}},"required":["id","fields","repeat"],"additionalProperties":false}}},"required":["id","fields"],"additionalProperties":false}}},"required":["id","title","sections"],"additionalProperties":false}},"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"when":{"$ref":"#/$defs/__schema0"},"then":{"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"show":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["show"],"additionalProperties":false},{"type":"object","properties":{"hide":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["hide"],"additionalProperties":false},{"type":"object","properties":{"require":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["require"],"additionalProperties":false},{"type":"object","properties":{"unrequire":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["unrequire"],"additionalProperties":false},{"type":"object","properties":{"skipTo":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["skipTo"],"additionalProperties":false}]}}},"required":["id","when","then"],"additionalProperties":false}},"checks":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"assert":{"$ref":"#/$defs/__schema0"},"message":{"type":"string","minLength":1,"maxLength":300},"field":{"description":"Where the message shows; the form as a whole when omitted","type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["id","assert","message"],"additionalProperties":false}},"defaults":{"description":"Values the contract gets when no answer gives one","type":"object","properties":{"terms":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},"facts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"additionalProperties":false},"organizationFills":{"description":"Template placeholders the organization fills before sending (e.g. \"term.deposit\", \"party.landlord\", \"sign.landlord1\")","maxItems":100,"type":"array","items":{"type":"string","maxLength":200}},"countersigner":{"description":"The organization's signer (FB-7): one person, named in the form's settings, who signs after every party group as \"<role>1\" (e.g. landlord1). Omitted: the form adds none","type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"}},"required":["role"],"additionalProperties":false}},"required":["pages"],"additionalProperties":false,"description":"Version 1, a draft"}},"required":["name","contractType","templateId","definition"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"object","properties":{"all":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["all"],"additionalProperties":false},{"type":"object","properties":{"any":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["any"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","in","gt","gte","lt","lte","is_empty","is_not_empty"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":200,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["field"],"additionalProperties":false}]}},"required":["field","op"],"additionalProperties":false},{"type":"object","properties":{"count":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","gt","gte","lt","lte"]},"value":{"type":"integer","minimum":0,"maximum":50}},"required":["count","op","value"],"additionalProperties":false}]}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}":{"get":{"summary":"A form and its versions (newest first)","tags":["Forms"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename, or change the template (pinned at the next publish). Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"templateId":{"description":"Takes effect at the next publish, which pins its current version","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"description":"The form's short name, which makes its public link: /f/{short name}. Unique across the platform","anyOf":[{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{1,58}[a-z0-9])$"},{"type":"null"}]},"publicEnabled":{"description":"Take public submissions at the link (the live version; review before sending)","type":"boolean"},"publicSettings":{"type":"object","properties":{"jurisdictionCodes":{"default":[],"description":"The contract's jurisdictions, broad → narrow, e.g. [\"US\",\"US-CA\"]: the packet rules follow them","maxItems":8,"type":"array","items":{"type":"string","minLength":2,"maxLength":60}},"maxSigningRows":{"default":10,"type":"integer","minimum":1,"maximum":40},"submitterMustSign":{"default":true,"description":"The verified submitter must be one of the signing rows (off for an agent submitting for others)","type":"boolean"},"intakeRetentionDays":{"default":30,"type":"integer","minimum":1,"maximum":30},"draftRetentionDays":{"default":30,"description":"How long a saved draft can be finished (design §8.2)","type":"integer","minimum":1,"maximum":30},"draftsVisible":{"default":false,"description":"Whether the organization sees drafts nobody submitted (FB-5: off by default, and said in the privacy notice)","type":"boolean"},"embedOrigins":{"default":[],"description":"Sites that may embed the form (F3b): each an exact https origin, never a wildcard. Empty: the form can't be framed anywhere else","maxItems":10,"type":"array","items":{"type":"string"}},"autoSend":{"default":null,"description":"Send for signature without review (L-035), only for a contract type that needs no approval, and only when every gate passes; otherwise it waits for review with the reason. Off (null) by default","anyOf":[{"type":"object","properties":{"connectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The eSignature connection it sends with"}},"required":["connectionId"],"additionalProperties":false},{"type":"null"}]},"signing":{"default":"email","description":"How the verified submitter signs (one-motion signing §4). \"email\": the provider emails their link. \"in_flow\": right away on the page, straight after the code; needs autoSend, submitterMustSign, at most 6 signing rows, and a connection whose eSign returns signers to CLM. Left out: \"email\", so a form saved before this setting never skips its checks","type":"string","enum":["email","in_flow"]},"next":{"default":[],"description":"Follow-on forms (one-motion signing §9): after this form, the first rule that matches offers its form, which can carry this agreement's people. Empty by default","maxItems":5,"type":"array","items":{"type":"object","properties":{"formId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The next form: this organization's, public and published"},"when":{"type":"object","properties":{"outcome":{"description":"Where this form ended: signed (in the flow), sent (by email, or to others), held (with the organization), declined. Default [\"signed\"]","minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["signed","sent","held","declined"]}},"contractTypes":{"description":"Only for agreements of these contract types (keys)","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"answers":{"description":"A condition on this form's answers (top-level fields), in the rules' language","$ref":"#/$defs/__schema0"}},"additionalProperties":false},"deliver":{"default":"flow","description":"\"flow\": offered on the page (\"One more step\"), and emailed if the person leaves without starting it; \"email\": emailed once the outcome is reached, never offered on the page","type":"string","enum":["flow","email"]},"carry":{"default":"parties","description":"\"parties\": the next form carries this agreement's people (its carried sections); \"none\": it starts empty","type":"string","enum":["parties","none"]}},"required":["formId"],"additionalProperties":false}},"output":{"default":"details","description":"What a follow-on form makes (one-motion signing §9.3, §9.7): \"details\" (the default) writes each person's answers onto the first agreement's parties; \"agreement\" makes a second agreement of this form's contract type with the same people (copied, linked back), which is then reviewed or sent like a first form's. Only on a follow-on form, never with carry.fillBy \"each_person\"","type":"string","enum":["details","agreement"]},"countersigner":{"default":null,"description":"Who signs for the organization (FB-7), as the role the form's definition names, after every other signer. None (null) by default","anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"member"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"An active member of the organization, with a first and last name on file"}},"required":["type","userId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"contact"},"firstName":{"type":"string","minLength":1,"maxLength":100},"middleName":{"default":"","type":"string","maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"suffix":{"default":null,"anyOf":[{"type":"string","enum":["Jr","Sr","II","III","IV","V","VI"]},{"type":"null"}]},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["type","firstName","lastName","email"],"additionalProperties":false}]},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"object","properties":{"all":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["all"],"additionalProperties":false},{"type":"object","properties":{"any":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["any"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","in","gt","gte","lt","lte","is_empty","is_not_empty"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":200,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["field"],"additionalProperties":false}]}},"required":["field","op"],"additionalProperties":false},{"type":"object","properties":{"count":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","gt","gte","lt","lte"]},"value":{"type":"integer","minimum":0,"maximum":50}},"required":["count","op","value"],"additionalProperties":false}]}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/suspend":{"post":{"summary":"Suspend the form (reason required): no new submissions; everything is kept (R-1). Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/reactivate":{"post":{"summary":"Reactivate a suspended form. Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/prefill-tokens":{"post":{"summary":"A signed prefill token for the form's live version, and the link carrying it in its fragment (/f/{short name}#p=…; url is null until the form has a short name). Values are read as a submission reads them, and only for fields the definition marks prefill: editable or locked (never a row's field, an upload, an acknowledgement, or a field a signs rule reads); a locked field takes the token's value whatever is sent. The email is only suggested: it is verified by email like any other. Expires in 1 to 30 days (default 7). Signed with a key derived from the organization, the form and its prefill key version. Audited without the values; the response is never kept for Idempotency-Key replays.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Field id → value, read as a submission would read it; only fields the form marks prefillable"},"email":{"description":"Suggested for the submitter's email; still verified by email like any other","type":"string"},"expiresInDays":{"description":"Default 7","type":"integer","minimum":1,"maximum":30}},"required":["values"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/prefill-tokens/revoke":{"post":{"summary":"Every prefill token issued for the form stops working (its prefill key version goes up). Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions":{"post":{"summary":"Start a new draft version (a copy of the newest unless a definition is given). One draft at a time (409 form_draft_exists). Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"definition":{"description":"Defaults to a copy of the newest version","type":"object","properties":{"pages":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","minLength":1,"maxLength":300},"sections":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","maxLength":300},"fields":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"short_text"},"maxLength":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"long_text"},"maxLength":{"type":"integer","minimum":1,"maximum":20000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"number"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"currency"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"percent"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date_range"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"mapStart":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"mapEnd":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"single_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"dropdown"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"multiple_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}},"minSelected":{"type":"integer","minimum":0,"maximum":200},"maxSelected":{"type":"integer","minimum":1,"maximum":200}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"yes_no"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"acknowledgement"},"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Shown with the checkbox; kept in the version, so what was acknowledged is exact"}},"required":["id","label","type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"person_name"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"address"},"usOnly":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"email"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"phone"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"file_upload"},"accept":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(\\.[a-z0-9]{1,10}|[a-z]+\\/(\\*|[a-z0-9.+-]{1,60}))$"}},"maxBytes":{"type":"integer","minimum":1,"maximum":26214400},"maxFiles":{"type":"integer","minimum":1,"maximum":10}},"required":["id","label","type","accept","maxBytes","maxFiles"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"type":{"type":"string","const":"content"},"style":{"type":"string","enum":["heading","text","divider"]},"text":{"type":"string","maxLength":5000}},"required":["id","type","style"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"type":{"type":"string","const":"calculated"},"required":{},"prefill":{},"expression":{"type":"string","minLength":1,"maxLength":2000,"description":"e.g. rent * 2, days(move_in, move_out), if(pets = true, 500, 0)"},"valueType":{"type":"string","enum":["number","currency","percent","date"],"description":"How the result is kept: currency is 2 decimal places, rounded half-even"},"decimals":{"description":"number and percent: places kept, rounded half-even (default 2)","type":"integer","minimum":0,"maximum":6}},"required":["id","label","type","expression","valueType"],"additionalProperties":false}]}},"repeat":{"type":"object","properties":{"min":{"default":0,"type":"integer","minimum":0,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50},"rowLabel":{"description":"e.g. \"Occupant {n}\" or \"{firstName} {lastName}\"","type":"string","maxLength":200},"addLabel":{"type":"string","maxLength":100}},"additionalProperties":false},"party":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"},"side":{"default":"counterparty","type":"string","enum":["us","counterparty","guarantor","other"]},"kind":{"default":"person","type":"string","enum":["person","organization"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$","description":"The row's name field: a person name (four parts) for a person, a short text (legal name) for an organization"},"email":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"phone":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"signs":{"anyOf":[{"type":"string","enum":["always","never"]},{"type":"object","properties":{"when":{"$ref":"#/$defs/__schema0"}},"required":["when"],"additionalProperties":false}],"description":"Whether a row signs: always, never (occupants), or when a condition holds for that row"},"signingOrder":{"description":"Rows of a group sign in parallel; groups sign in this order. Defaults to the group's place among the form's party groups","type":"integer","minimum":1,"maximum":20}},"required":["role","name","signs"],"additionalProperties":false},"carry":{"description":"A follow-on form's rows carried from the agreement's people (repeating sections only)","type":"object","properties":{"roles":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"}},"lock":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"allowRemove":{"default":false,"description":"The person filling it in may leave someone out (nothing is recorded for them)","type":"boolean"},"fillBy":{"default":"submitter","description":"Who fills each row: the submitter, for everyone; or each person their own, through their own emailed link (P5, §9.6)","type":"string","enum":["submitter","each_person"]}},"required":["roles"],"additionalProperties":false},"groups":{"description":"Groups repeated inside each row (repeating sections only; one level)","maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","maxLength":300},"fields":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"short_text"},"maxLength":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"long_text"},"maxLength":{"type":"integer","minimum":1,"maximum":20000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"number"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"currency"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"percent"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date_range"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"mapStart":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"mapEnd":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"single_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"dropdown"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"multiple_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}},"minSelected":{"type":"integer","minimum":0,"maximum":200},"maxSelected":{"type":"integer","minimum":1,"maximum":200}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"yes_no"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"acknowledgement"},"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Shown with the checkbox; kept in the version, so what was acknowledged is exact"}},"required":["id","label","type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"person_name"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"address"},"usOnly":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"email"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"phone"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"file_upload"},"accept":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(\\.[a-z0-9]{1,10}|[a-z]+\\/(\\*|[a-z0-9.+-]{1,60}))$"}},"maxBytes":{"type":"integer","minimum":1,"maximum":26214400},"maxFiles":{"type":"integer","minimum":1,"maximum":10}},"required":["id","label","type","accept","maxBytes","maxFiles"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"type":{"type":"string","const":"content"},"style":{"type":"string","enum":["heading","text","divider"]},"text":{"type":"string","maxLength":5000}},"required":["id","type","style"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"type":{"type":"string","const":"calculated"},"required":{},"prefill":{},"expression":{"type":"string","minLength":1,"maxLength":2000,"description":"e.g. rent * 2, days(move_in, move_out), if(pets = true, 500, 0)"},"valueType":{"type":"string","enum":["number","currency","percent","date"],"description":"How the result is kept: currency is 2 decimal places, rounded half-even"},"decimals":{"description":"number and percent: places kept, rounded half-even (default 2)","type":"integer","minimum":0,"maximum":6}},"required":["id","label","type","expression","valueType"],"additionalProperties":false}]}},"repeat":{"type":"object","properties":{"min":{"default":0,"type":"integer","minimum":0,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50},"rowLabel":{"description":"e.g. \"Occupant {n}\" or \"{firstName} {lastName}\"","type":"string","maxLength":200},"addLabel":{"type":"string","maxLength":100}},"additionalProperties":false}},"required":["id","fields","repeat"],"additionalProperties":false}}},"required":["id","fields"],"additionalProperties":false}}},"required":["id","title","sections"],"additionalProperties":false}},"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"when":{"$ref":"#/$defs/__schema0"},"then":{"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"show":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["show"],"additionalProperties":false},{"type":"object","properties":{"hide":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["hide"],"additionalProperties":false},{"type":"object","properties":{"require":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["require"],"additionalProperties":false},{"type":"object","properties":{"unrequire":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["unrequire"],"additionalProperties":false},{"type":"object","properties":{"skipTo":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["skipTo"],"additionalProperties":false}]}}},"required":["id","when","then"],"additionalProperties":false}},"checks":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"assert":{"$ref":"#/$defs/__schema0"},"message":{"type":"string","minLength":1,"maxLength":300},"field":{"description":"Where the message shows; the form as a whole when omitted","type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["id","assert","message"],"additionalProperties":false}},"defaults":{"description":"Values the contract gets when no answer gives one","type":"object","properties":{"terms":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},"facts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"additionalProperties":false},"organizationFills":{"description":"Template placeholders the organization fills before sending (e.g. \"term.deposit\", \"party.landlord\", \"sign.landlord1\")","maxItems":100,"type":"array","items":{"type":"string","maxLength":200}},"countersigner":{"description":"The organization's signer (FB-7): one person, named in the form's settings, who signs after every party group as \"<role>1\" (e.g. landlord1). Omitted: the form adds none","type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"}},"required":["role"],"additionalProperties":false}},"required":["pages"],"additionalProperties":false}},"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"object","properties":{"all":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["all"],"additionalProperties":false},{"type":"object","properties":{"any":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["any"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","in","gt","gte","lt","lte","is_empty","is_not_empty"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":200,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["field"],"additionalProperties":false}]}},"required":["field","op"],"additionalProperties":false},{"type":"object","properties":{"count":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","gt","gte","lt","lte"]},"value":{"type":"integer","minimum":0,"maximum":50}},"required":["count","op","value"],"additionalProperties":false}]}}}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/submissions":{"get":{"summary":"A form's public submissions, newest first: status (awaiting_email_verification, submitted, contract_created, rendered, awaiting_review, then as its contract: sent_for_signature, completed, declined…), what holds one (needs_facts, values_missing), its contract","tags":["Forms"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/analytics":{"get":{"summary":"How the form's public submissions fared over a window (default the last 30 days, at most 366), in total and per version: submitted, spam-dropped, awaiting or never confirmed, confirmed, held (by reason), failed, awaiting review, sent, completed, declined, withdrawn, and the median minutes to confirm. Saved drafts (saved, open, abandoned, sent, and the furthest page each unsent draft reached) only when the form lets the organization see drafts; otherwise null. Counts only, from rows CLM already keeps","tags":["Forms"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"The window's start (inclusive), an ISO 8601 instant; default 30 days before \"to\""},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"The window's end (exclusive); default now"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/form-submissions/{id}":{"get":{"summary":"One submission, with its frozen answers (until purged by the form's retention) and the packet rules used when its contract was made. An unconfirmed one (nobody proved the address) has unverified: true and submitterEmail and answers null. A follow-on whose people fill their own rows (carry.fillBy each_person) lists them in people: status filled, waiting, not_sent or expired, when the link went out and when it dies; one person's own row has person","tags":["Forms"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/form-submissions/{id}/people/{partyId}/resend":{"post":{"summary":"Email one person their own-row link again (a fresh one; the old one dies), to the agreement's address for them, under that address's 3 emails a day, while their form is open. Audited","tags":["Forms"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"partyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}":{"get":{"summary":"The live version of a form that takes public submissions. 404 otherwise.","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}/prefill":{"post":{"summary":"Redeem the page's prefill token (from the link's fragment, in the body): the values for the fields the live version still lets a link fill, which of them are locked, and the suggested email. 400 form_prefill_invalid when it doesn't verify (another form or organization, revoked, expired, altered). 60 per network per 10 minutes.","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":4000}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}/submit":{"post":{"summary":"Submit answers and the submitter's email. Answers 202 { status: check_email }: a confirmation link goes to the email, and nothing is created until it is used. On a form that sends on its own, when the page asks for it (verifyBy: code; an embedded page can't keep the cookie, so it doesn't), the email also carries a 6-digit code, the answer adds verification: code, and an HttpOnly clm_form_verify cookie binds the code to this browser (POST /public/forms/verify-code). Spam gets the same answer. Rate-limited per network and per form; 3 confirmation emails a day per address.","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"email":{"description":"The submitter's email: verified before anything is created","type":"string"},"prefill":{"description":"The signed prefill token the page was opened with (F3b): its locked fields take the token's values","type":"string","minLength":10,"maxLength":4000},"verifyBy":{"type":"string","enum":["code","link"]},"hp_q7x2":{"type":"string","maxLength":2000}},"required":["answers","email"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}/drafts":{"post":{"summary":"Save and finish later: the answers are kept as a draft and a resume link goes to the email (202 { status: check_email }; the same email caps as submissions)","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"prefill":{"description":"The signed prefill token the page was opened with (F3b): its locked fields take the token's values","type":"string","minLength":10,"maxLength":4000},"email":{"description":"Where the resume link goes; opening it proves the address","type":"string"},"hp_q7x2":{"type":"string","maxLength":2000}},"required":["answers","email"]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/resume":{"post":{"summary":"Exchange the resume link's token (single use, 24 hours, bound to the draft and its email) for an HttpOnly session cookie on that one draft; the token is spent. Returns the form's short name. 404 form_resume_link_spent (details.canRequestNewLink) when it is the draft's latest link but used or expired: POST it to /public/forms/resume/new-link; 404 form_resume_invalid otherwise.","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":300}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}/drafts/current":{"get":{"summary":"The saved answers, and whether they can still be sent (a withdrawn version or a closed form can't: canSubmit false, with the reason and where to start again)","tags":["Public forms"],"description":"Required scope: `the draft's session cookie`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Save the draft's answers again (at most 60 saves per 10 minutes per draft). With emailLink: true (\"Save and finish later\"), also email a fresh resume link to the draft's proven address, counted in its cap; at the cap the answers are still saved and 429 says so.","tags":["Public forms"],"description":"Required scope: `the draft's session cookie`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"emailLink":{"description":"Save and finish later: also email a fresh resume link to the draft's address","type":"boolean"}},"required":["answers"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}/drafts/current/submit":{"post":{"summary":"Send the draft: the same checks as a submission; its address is proven, so the contract follows without another email. The session ends.","tags":["Public forms"],"description":"Required scope: `the draft's session cookie`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/{slug}/drafts/current/link":{"post":{"summary":"Email a new resume link to the draft's address; the old link stops working (one live link per draft)","tags":["Public forms"],"description":"Required scope: `the draft's session cookie`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The form's short name, as in its public link /f/{short name}"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/resume/new-link":{"post":{"summary":"The draft's latest resume link, once used or expired, asks for a new one: 202 { status: check_email }. It goes only to the draft's bound address, under that address's cap (3 a day) and the network's limit; the old link stops working. 404 form_resume_invalid when the link doesn't belong to a live draft (sent, expired, or an older link).","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":300}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/verify":{"post":{"summary":"Confirm a submission with the token from the email (single use, 24 hours, bound to the submission and its email). Then the contract is made, rendered, and waits for the organization's review.","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":300}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/verify-code":{"post":{"summary":"One-motion signing §5: the 6-digit code from the email, on a form that sends on its own (JSON, from CLM's own origin). Works only with the cookie submit set in that browser, for 15 minutes; 5 wrong tries kill it (400 form_code_mismatch with details.triesLeft, form_code_dead, form_code_expired). A wrong cookie, or a submission dropped as spam, answers exactly like a wrong code. Success: 200 { status: verified, flow: true }, the link is spent too, and the flow cookie is set","tags":["Public forms"],"description":"Required scope: `the submitting browser's clm_form_verify cookie`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/resend-code":{"post":{"summary":"A new code and a new link (the old ones stop working): after 30 seconds (429 form_code_too_soon, details.retryAfterSeconds), at most 3 codes per submission (400 form_code_limit), within the address's 3 emails a day","tags":["Public forms"],"description":"Required scope: `the submitting browser's clm_form_verify cookie`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/flow":{"get":{"summary":"One-motion signing §6: where the verified submitter's agreement is: stage preparing | held | failed | sent | signed | declined, the steps (confirmed, preparing, ready) and the organization's name, never an internal reason. At most 2 polls a second (429); nudges a stalled driver at most every 10 s; 401 form_flow_gone after 30 idle minutes or 4 hours","tags":["Public forms"],"description":"Required scope: `the clm_form_flow cookie (set when the address was proven)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/flow/launch":{"post":{"summary":"One-motion signing (P3): open the verified submitter's own signing on a form that signs in the flow. Only at stage ready or signing, only for the submitter's recipient, at most 5 per submission (429 form_flow_launch_limit). Answers { url }: eSign's one-time, 5-minute signing URL, which the page opens in place. Rotates the cookie every time (a replayed older value is refused), also when eSign refuses (409 form_flow_launch_failed: offer \"Email me the link\"). JSON from CLM's own origin.","tags":["Public forms"],"description":"Required scope: `the clm_form_flow cookie`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/flow/return":{"post":{"summary":"One-motion signing (P3): what the return page /f/signed shows. eSign's event in the page's URL is never used: this asks eSign for the submitter's own status and answers { stage: signed | declined | ready, organization, coSigners? (first name and last initial), launchesLeft? }.","tags":["Public forms"],"description":"Required scope: `the clm_form_flow cookie`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/flow/email-link":{"post":{"summary":"One-motion signing (P3): \"Email me the link\". eSign emails the submitter their signing link (at most 3 a day: 429 form_flow_email_link_limit); answers 202 { status: emailed } and ends the flow.","tags":["Public forms"],"description":"Required scope: `the clm_form_flow cookie`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/flow/next":{"post":{"summary":"Follow-on forms (one-motion signing §9): \"One more step\". Opens the form the first matching publicSettings.next rule offers (GET /flow and /flow/return give next: { title }) as a draft already verified, its carried sections filled with the agreement's people (row id = party id; locked fields applied again on every save and on submit). One follow-on per submission: asking again reopens the same draft (409 form_next_already_sent once it was sent). Ends the flow: clears clm_form_flow and sets the draft's session cookie; answers the next form's short name for its page, /f/{slug}?draft=1. Sent, its answers go to each person's details.forms.<formId> on the agreement, and the submission is recorded. JSON from CLM's own origin.","tags":["Public forms"],"description":"Required scope: `the clm_form_flow cookie`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/forms/follow-on":{"post":{"summary":"Follow-on forms (one-motion signing §9.4): the emailed follow-on link's token, spent for a session on the follow-on form's draft (an HttpOnly cookie, as a resume link's). 7 days, single use, bound to the first form's submission and address; only its hash is kept. The rule is checked again (409 form_next_none); a tampered, expired or used link is 404 form_follow_on_link_invalid. Answers the form's short name for its page.","tags":["Public forms"],"description":"Required scope: `none (public)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions/{version}":{"get":{"summary":"One version, with its definition","tags":["Forms"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Replace a draft's definition. A published version is frozen (409 form_version_published).","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"definition":{"type":"object","properties":{"pages":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","minLength":1,"maxLength":300},"sections":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","maxLength":300},"fields":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"short_text"},"maxLength":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"long_text"},"maxLength":{"type":"integer","minimum":1,"maximum":20000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"number"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"currency"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"percent"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date_range"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"mapStart":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"mapEnd":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"single_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"dropdown"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"multiple_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}},"minSelected":{"type":"integer","minimum":0,"maximum":200},"maxSelected":{"type":"integer","minimum":1,"maximum":200}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"yes_no"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"acknowledgement"},"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Shown with the checkbox; kept in the version, so what was acknowledged is exact"}},"required":["id","label","type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"person_name"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"address"},"usOnly":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"email"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"phone"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"file_upload"},"accept":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(\\.[a-z0-9]{1,10}|[a-z]+\\/(\\*|[a-z0-9.+-]{1,60}))$"}},"maxBytes":{"type":"integer","minimum":1,"maximum":26214400},"maxFiles":{"type":"integer","minimum":1,"maximum":10}},"required":["id","label","type","accept","maxBytes","maxFiles"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"type":{"type":"string","const":"content"},"style":{"type":"string","enum":["heading","text","divider"]},"text":{"type":"string","maxLength":5000}},"required":["id","type","style"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"type":{"type":"string","const":"calculated"},"required":{},"prefill":{},"expression":{"type":"string","minLength":1,"maxLength":2000,"description":"e.g. rent * 2, days(move_in, move_out), if(pets = true, 500, 0)"},"valueType":{"type":"string","enum":["number","currency","percent","date"],"description":"How the result is kept: currency is 2 decimal places, rounded half-even"},"decimals":{"description":"number and percent: places kept, rounded half-even (default 2)","type":"integer","minimum":0,"maximum":6}},"required":["id","label","type","expression","valueType"],"additionalProperties":false}]}},"repeat":{"type":"object","properties":{"min":{"default":0,"type":"integer","minimum":0,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50},"rowLabel":{"description":"e.g. \"Occupant {n}\" or \"{firstName} {lastName}\"","type":"string","maxLength":200},"addLabel":{"type":"string","maxLength":100}},"additionalProperties":false},"party":{"type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"},"side":{"default":"counterparty","type":"string","enum":["us","counterparty","guarantor","other"]},"kind":{"default":"person","type":"string","enum":["person","organization"]},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$","description":"The row's name field: a person name (four parts) for a person, a short text (legal name) for an organization"},"email":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"phone":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"signs":{"anyOf":[{"type":"string","enum":["always","never"]},{"type":"object","properties":{"when":{"$ref":"#/$defs/__schema0"}},"required":["when"],"additionalProperties":false}],"description":"Whether a row signs: always, never (occupants), or when a condition holds for that row"},"signingOrder":{"description":"Rows of a group sign in parallel; groups sign in this order. Defaults to the group's place among the form's party groups","type":"integer","minimum":1,"maximum":20}},"required":["role","name","signs"],"additionalProperties":false},"carry":{"description":"A follow-on form's rows carried from the agreement's people (repeating sections only)","type":"object","properties":{"roles":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"}},"lock":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"allowRemove":{"default":false,"description":"The person filling it in may leave someone out (nothing is recorded for them)","type":"boolean"},"fillBy":{"default":"submitter","description":"Who fills each row: the submitter, for everyone; or each person their own, through their own emailed link (P5, §9.6)","type":"string","enum":["submitter","each_person"]}},"required":["roles"],"additionalProperties":false},"groups":{"description":"Groups repeated inside each row (repeating sections only; one level)","maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"title":{"type":"string","maxLength":300},"fields":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"short_text"},"maxLength":{"type":"integer","minimum":1,"maximum":1000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"long_text"},"maxLength":{"type":"integer","minimum":1,"maximum":20000}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"number"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"currency"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"percent"},"min":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"max":{"type":"string","pattern":"^-?\\d{1,15}(\\.\\d{1,6})?$"},"decimals":{"type":"integer","minimum":0,"maximum":6}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"date_range"},"min":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"max":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"object","properties":{"daysFromToday":{"type":"integer","minimum":-36600,"maximum":36600}},"required":["daysFromToday"],"additionalProperties":false}]},"mapStart":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"mapEnd":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"single_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"dropdown"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"multiple_choice"},"options":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,100}$"},"label":{"type":"string","minLength":1,"maxLength":300}},"required":["value","label"],"additionalProperties":false}},"minSelected":{"type":"integer","minimum":0,"maximum":200},"maxSelected":{"type":"integer","minimum":1,"maximum":200}},"required":["id","label","type","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"yes_no"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"acknowledgement"},"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Shown with the checkbox; kept in the version, so what was acknowledged is exact"}},"required":["id","label","type","text"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"person_name"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"address"},"usOnly":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"email"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"phone"}},"required":["id","label","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"required":{"type":"boolean"},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"prefill":{"description":"A signed prefill token (F3b) may fill this field: editable (the visitor can change it) or locked (the token's value is used as is)","type":"string","enum":["editable","locked"]},"carryFrom":{"description":"A follow-on form's field, prefilled from where it came from: in a carried section, the agreement's party its row is (locked when the section locks it); at the top level, the first form's answer (answers.<fieldId>)","type":"string","pattern":"^(party\\.(name|email|phone|role|details\\.[a-z][a-z0-9_]{0,59})|answers\\.[a-z][a-z0-9_]{0,59})$"},"sensitive":{"description":"Never carried into a follow-on form (e.g. an ID number or a health detail): the next form asks again, or not at all","type":"boolean"},"type":{"type":"string","const":"file_upload"},"accept":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(\\.[a-z0-9]{1,10}|[a-z]+\\/(\\*|[a-z0-9.+-]{1,60}))$"}},"maxBytes":{"type":"integer","minimum":1,"maximum":26214400},"maxFiles":{"type":"integer","minimum":1,"maximum":10}},"required":["id","label","type","accept","maxBytes","maxFiles"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"type":{"type":"string","const":"content"},"style":{"type":"string","enum":["heading","text","divider"]},"text":{"type":"string","maxLength":5000}},"required":["id","type","style"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"label":{"type":"string","minLength":1,"maxLength":300},"help":{"type":"string","maxLength":1000},"map":{"oneOf":[{"type":"object","properties":{"to":{"type":"string","const":"term"},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"fact"},"key":{"type":"string","minLength":1,"maxLength":100}},"required":["to","key"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"contract"},"field":{"type":"string","enum":["title","effectiveDate","expirationDate"]}},"required":["to","field"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string","const":"intake"}},"required":["to"],"additionalProperties":false}]},"type":{"type":"string","const":"calculated"},"required":{},"prefill":{},"expression":{"type":"string","minLength":1,"maxLength":2000,"description":"e.g. rent * 2, days(move_in, move_out), if(pets = true, 500, 0)"},"valueType":{"type":"string","enum":["number","currency","percent","date"],"description":"How the result is kept: currency is 2 decimal places, rounded half-even"},"decimals":{"description":"number and percent: places kept, rounded half-even (default 2)","type":"integer","minimum":0,"maximum":6}},"required":["id","label","type","expression","valueType"],"additionalProperties":false}]}},"repeat":{"type":"object","properties":{"min":{"default":0,"type":"integer","minimum":0,"maximum":50},"max":{"type":"integer","minimum":1,"maximum":50},"rowLabel":{"description":"e.g. \"Occupant {n}\" or \"{firstName} {lastName}\"","type":"string","maxLength":200},"addLabel":{"type":"string","maxLength":100}},"additionalProperties":false}},"required":["id","fields","repeat"],"additionalProperties":false}}},"required":["id","fields"],"additionalProperties":false}}},"required":["id","title","sections"],"additionalProperties":false}},"rules":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"when":{"$ref":"#/$defs/__schema0"},"then":{"minItems":1,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"show":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["show"],"additionalProperties":false},{"type":"object","properties":{"hide":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["hide"],"additionalProperties":false},{"type":"object","properties":{"require":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["require"],"additionalProperties":false},{"type":"object","properties":{"unrequire":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["unrequire"],"additionalProperties":false},{"type":"object","properties":{"skipTo":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["skipTo"],"additionalProperties":false}]}}},"required":["id","when","then"],"additionalProperties":false}},"checks":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"assert":{"$ref":"#/$defs/__schema0"},"message":{"type":"string","minLength":1,"maxLength":300},"field":{"description":"Where the message shows; the form as a whole when omitted","type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["id","assert","message"],"additionalProperties":false}},"defaults":{"description":"Values the contract gets when no answer gives one","type":"object","properties":{"terms":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},"facts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}}},"additionalProperties":false},"organizationFills":{"description":"Template placeholders the organization fills before sending (e.g. \"term.deposit\", \"party.landlord\", \"sign.landlord1\")","maxItems":100,"type":"array","items":{"type":"string","maxLength":200}},"countersigner":{"description":"The organization's signer (FB-7): one person, named in the form's settings, who signs after every party group as \"<role>1\" (e.g. landlord1). Omitted: the form adds none","type":"object","properties":{"role":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,49}$"}},"required":["role"],"additionalProperties":false}},"required":["pages"],"additionalProperties":false}},"required":["definition"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"object","properties":{"all":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["all"],"additionalProperties":false},{"type":"object","properties":{"any":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["any"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","in","gt","gte","lt","lte","is_empty","is_not_empty"]},"value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]},{"maxItems":200,"type":"array","items":{"anyOf":[{"type":"string","maxLength":1000},{"type":"number"},{"type":"boolean"}]}},{"type":"object","properties":{"field":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"required":["field"],"additionalProperties":false}]}},"required":["field","op"],"additionalProperties":false},{"type":"object","properties":{"count":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"op":{"type":"string","enum":["equals","not_equals","gt","gte","lt","lte"]},"value":{"type":"integer","minimum":0,"maximum":50}},"required":["count","op","value"],"additionalProperties":false}]}}}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions/{version}/check":{"get":{"summary":"The publish check without publishing: every problem (structure, rules, mapping, and each template placeholder the form can't always fill), the template's placeholders, and warnings that don't block publishing (a rule reading a limit-derived value that hides a fact field)","tags":["Forms"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions/{version}/publish":{"post":{"summary":"Publish a draft: pins the template's current version and freezes the version; the form's link serves it. Refused with every problem listed (400 form_invalid). Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions/{version}/suspend":{"post":{"summary":"Suspend one published version (reason required): its drafts can't be submitted. Reversible. Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions/{version}/reactivate":{"post":{"summary":"Reactivate a suspended version. Audited.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{id}/versions/{version}/test-run":{"post":{"summary":"Test run: read answers exactly as a submission will be read (the server's rules, validation and mapping) and render the contract's document as a draft PDF. Returns the problems, the contract and parties it would create, and the PDF. Creates nothing, sends nothing.","tags":["Forms"],"description":"Required scope: `templates:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"answers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Top-level answers by field id; a repeating section's rows by its id, each { rowId, values }"},"locale":{"type":"string","minLength":2,"maxLength":35},"timeZone":{"type":"string","minLength":1,"maxLength":64}},"required":["answers"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-subscriptions":{"get":{"summary":"List subscriptions and the available events","tags":["Webhooks"],"description":"Required scope: `webhooks:write`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Subscribe a URL to contract events. The signing secret is returned once.","tags":["Webhooks"],"description":"Required scope: `webhooks:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["contract.created","contract.submitted","contract.approved","contract.rejected","contract.sent_for_signature","contract.partially_executed","contract.executed","contract.declined","contract.voided","contract.cancelled","contract.activated","contract.terminated","contract.expired","contract.archived","contract.returned_to_draft","signature.send_failed","contract.renewal_window","obligation.due_soon","obligation.overdue","form_submission.submitted","form_submission.contract_created","form_submission.failed"]}}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-deliveries":{"get":{"summary":"Webhook deliveries, newest first; follow nextCursor until it is null","tags":["Webhooks"],"description":"Required scope: `webhooks:write`.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"failed","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]},"description":"1 = undelivered only"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-deliveries/{id}/redeliver":{"post":{"summary":"Send a delivery again now (refused with subscription_retired when its subscription was deleted)","tags":["Webhooks"],"description":"Required scope: `webhooks:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"subscription_retired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-subscriptions/{id}":{"delete":{"summary":"Delete a subscription","tags":["Webhooks"],"description":"Required scope: `webhooks:write`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations":{"get":{"summary":"Organizations this integrator created","tags":["Integrators"],"description":"Required scope: `integrator key`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an organization for one of the host's customers (idempotent by externalRef)","tags":["Integrators"],"description":"Required scope: `integrator key`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"externalRef":{"type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["system","id"],"description":"The host's id for this customer. Creating twice with the same ref returns the same organization."},"locale":{"description":"BCP 47 locale for dates and numbers in generated documents, e.g. en-US","type":"string","minLength":2,"maxLength":35},"timeZone":{"description":"IANA time zone, e.g. America/Los_Angeles","type":"string","minLength":1,"maxLength":64},"sandbox":{"description":"A sandbox organization, for a non-production environment: CLM sends no email and no signature request to real people on its behalf. Fixed at creation; only the platform changes it","type":"boolean"}},"required":["name","externalRef"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}":{"patch":{"summary":"Suspend or reactivate one of the integrator's own organizations (never deleted; reason required to suspend). Same effects as the platform action. Audited.","tags":["Integrators"],"description":"Required scope: `integrator key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"isActive":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["isActive"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/keys":{"get":{"summary":"The keys of one of the integrator's own organizations: id, prefix, scopes, created and revoked dates. Never a secret. 404 for any other organization.","tags":["Integrators"],"description":"Required scope: `integrator key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Mint an API key for one of the integrator's own organizations. Shown once.","tags":["Integrators"],"description":"Required scope: `integrator key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","contracts:approve","signature:send","rules:read","rules:write","templates:write","policies:write","clauses:approve","console:sessions","connections:write","webhooks:write","members:read","members:manage","admin"]}}},"required":["name","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{id}/keys/{keyId}":{"delete":{"summary":"Revoke a key of one of the integrator's own organizations (kept, marked revoked; R-1). Idempotent: an already revoked key answers as it is (alreadyRevoked: true). Audited. 404 for any other organization.","tags":["Integrators"],"description":"Required scope: `integrator key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/console-sessions":{"post":{"summary":"Mint a one-time console handoff URL for the host's signed-in user (60 s, single use; only its hash is stored). The session's scopes are the role's allow-list intersected with this key's; it never carries admin, keys, webhooks or connections. returnUrl must be on one of the host's return origins (400 return_url_not_allowed). Audited; the code is never logged.","tags":["Console sessions"],"description":"Required scope: `console:sessions`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["admin","manager","viewer"]}},"required":["id","name","email","role"],"additionalProperties":false},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["organization","contract"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"externalRef":{"type":"object","properties":{"system":{"type":"string","minLength":1,"maxLength":100},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["system","id"]},"view":{"type":"string","enum":["overview","packet","documents","signature","audit","obligations"]}},"required":["kind"],"additionalProperties":false},"returnUrl":{"type":"string","maxLength":2000},"from":{"type":"string","minLength":1,"maxLength":80},"attempt":{"default":1,"anyOf":[{"type":"number","const":1},{"type":"number","const":2}]}},"required":["user","target"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/console-sessions/current":{"get":{"summary":"For the console itself, signed in by a host user's console session: who and where, the Back bar (re-validated against the host's return origins) and the host's validated branding and link settings. 404 for an API key.","tags":["Console sessions"],"description":"Required scope: `a console session (contracts:read)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/console-sessions/current/return":{"put":{"summary":"A newer `return` for the Back bar: accepted only when it passes the return-URL rule; anything else is dropped silently ({accepted: false}), never an error.","tags":["Console sessions"],"description":"Required scope: `a console session (contracts:read)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"returnUrl":{"type":"string","maxLength":4000}},"required":["returnUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/console-sessions/revoke":{"post":{"summary":"Revoke every console session of one user ({userId}) or of the whole organization ({all: true}); returns the count. An empty body is a 400. Audited.","tags":["Console sessions"],"description":"Required scope: `console:sessions`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":200}},"required":["userId"],"additionalProperties":false},{"type":"object","properties":{"all":{"type":"boolean","const":true}},"required":["all"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings":{"get":{"summary":"The organization's formatting defaults for generated documents (locale, time zone; null means en-US / UTC) and the effective values","tags":["Organization"],"description":"Required scope: `contracts:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Set the organization's default locale (BCP 47) and time zone (IANA) for generated documents; null clears to en-US / UTC. Audited.","tags":["Organization"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"locale":{"anyOf":[{"description":"BCP 47 locale for dates and numbers in generated documents, e.g. en-US","type":"string","minLength":2,"maxLength":35},{"type":"null"}]},"timeZone":{"anyOf":[{"description":"IANA time zone, e.g. America/Los_Angeles","type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"summary":"The signed-in user: the four name fields, their organizations with the role in each, and whether they are a platform admin (user login, CLM_USER_LOGIN=on)","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update one's own name: first and last required, middle optional, suffix from Jr, Sr, II–VI","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","maxLength":100},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"type":"string","maxLength":100},"suffix":{"anyOf":[{"type":"string","enum":["Jr","Sr","II","III","IV","V","VI"]},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/security":{"get":{"summary":"Session limits (the platform's, your own, the effective ones) and two-step verification: your opt-in, and the organizations that require it","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Your own shorter session limits (never longer than the platform's, else 400 outside_platform_bounds), and turning two-step verification on; off is 409 mfa_required_by_organization while an organization of yours requires it. Audited","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionAbsoluteHours":{"description":"Your own absolute limit, never longer than the platform's; null = the platform's","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"sessionIdleHours":{"description":"Your own idle limit, never longer than the platform's; null = the platform's","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"mfaOptIn":{"description":"true: require a second factor for you everywhere. false is refused while any of your organizations requires one","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys":{"get":{"summary":"This organization's API keys (no hashes); the caller's key is flagged current; mintedBy says who minted each (platform, integrator, organization_key, user), and a key its host minted is readOnly with managedBy naming the host; a personal key (personal, memberId, expiresAt) is listed too and may be revoked here","tags":["Organization"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Mint a key for this organization; the value is shown once. A signed-in user may give it only scopes their role holds (plus admin for an Owner or Admin), never console:sessions (403 scopes_beyond_role). Never from a personal key (403 personal_key_cannot_mint)","tags":["Organization"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","contracts:approve","signature:send","rules:read","rules:write","templates:write","policies:write","clauses:approve","console:sessions","connections:write","webhooks:write","members:read","members:manage","admin"]}}},"required":["name","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/keys":{"get":{"summary":"Your personal API keys in this organization (live, revoked and expired), the scopes you may put on one now (allowedScopes), maxKeys (10) and the key life (days, platformMaxDays)","tags":["Users"],"description":"Required scope: `a signed-in member, or one of their personal keys (X-CLM-Org)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a personal API key; the value is shown once. It acts as you, with its scopes intersected on every request with what you hold then (own role and groups), never admin or console:sessions (400 scope_not_on_personal_keys), never beyond what you hold now (403 scopes_beyond_role); it never passes Owner/Admin-only routes and can't mint keys (403 personal_key_cannot_mint). It expires after the organization's key life (default 90 days; expiresInDays may be shorter, 400 outside_organization_bounds). At most 10 live keys (409 personal_key_limit). Deactivating you revokes it. Audited api_key.created","tags":["Users"],"description":"Required scope: `a signed-in member (X-CLM-Org)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","contracts:approve","signature:send","rules:read","rules:write","templates:write","policies:write","clauses:approve","console:sessions","connections:write","webhooks:write","members:read","members:manage","admin"]},"description":"At most what you hold now; never admin or console:sessions"},"expiresInDays":{"description":"Shorter than the organization's personal-key life if you like; never longer (default: that life, 90 days unless the organization set another)","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/keys/{id}":{"delete":{"summary":"Revoke one of your personal keys (kept, marked revoked; a key may revoke itself). Audited api_key.revoked","tags":["Users"],"description":"Required scope: `a signed-in member, or one of their personal keys (X-CLM-Org)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports":{"get":{"summary":"The organization's saved reports and your own private ones (active; includeInactive=true for the rest), each with its definition, its schedule, and whether you may edit it","tags":["Reports"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"includeInactive","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"A saved report: a subject (contracts, obligations or clauses), its filters, columns (a fixed list per subject; fact.<key> and term.<key> on contracts with filters.contractType set, a fact in that type's vocabulary) and order. Only the definition is kept, never results: every run is the runner's own. Private (yours alone) or the organization's (403 report_share_admin_only unless an Owner or Admin). 400 report_invalid lists each problem. Audited report.created","tags":["Reports"],"description":"Required scope: `contracts:read (visibility organization: admin, or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"visibility":{"default":"private","type":"string","enum":["private","organization"]},"definition":{"oneOf":[{"type":"object","properties":{"subject":{"type":"string","const":"contracts"},"filters":{"default":{},"type":"object","properties":{"status":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","enum":["draft","in_review","approved","out_for_signature","partially_executed","executed","active","expired","terminated","renewed","amended","declined","voided","cancelled","archived"]}},"contractType":{"type":"string","minLength":1,"maxLength":100},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expirationFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expirationTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"executedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"executedTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"externalSystem":{"type":"string","minLength":1,"maxLength":100},"q":{"description":"The title or the external id contains this","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string","const":"obligations"},"filters":{"default":{},"type":"object","properties":{"status":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["open","done","waived","carried_over","lapsed"]}},"contractType":{"type":"string","minLength":1,"maxLength":100},"key":{"type":"string","minLength":1,"maxLength":100},"dueFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string","const":"clauses"},"filters":{"default":{},"type":"object","properties":{"category":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]},"latestStatus":{"type":"string","enum":["draft","pending_approval","approved","rejected","retired"]},"contractType":{"type":"string","minLength":1,"maxLength":100},"includeInactive":{"type":"boolean"},"q":{"description":"The title or the key contains this","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false}]}},"required":["name","definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/preview":{"post":{"summary":"An unsaved definition's first 50 rows, run as you: data.columns, data.rows (cell text) and data.more. Shares a budget of 30 an hour per person with results and exports (429 report_rate)","tags":["Reports"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"definition":{"oneOf":[{"type":"object","properties":{"subject":{"type":"string","const":"contracts"},"filters":{"default":{},"type":"object","properties":{"status":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","enum":["draft","in_review","approved","out_for_signature","partially_executed","executed","active","expired","terminated","renewed","amended","declined","voided","cancelled","archived"]}},"contractType":{"type":"string","minLength":1,"maxLength":100},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expirationFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expirationTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"executedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"executedTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"externalSystem":{"type":"string","minLength":1,"maxLength":100},"q":{"description":"The title or the external id contains this","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string","const":"obligations"},"filters":{"default":{},"type":"object","properties":{"status":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["open","done","waived","carried_over","lapsed"]}},"contractType":{"type":"string","minLength":1,"maxLength":100},"key":{"type":"string","minLength":1,"maxLength":100},"dueFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string","const":"clauses"},"filters":{"default":{},"type":"object","properties":{"category":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]},"latestStatus":{"type":"string","enum":["draft","pending_approval","approved","rejected","retired"]},"contractType":{"type":"string","minLength":1,"maxLength":100},"includeInactive":{"type":"boolean"},"q":{"description":"The title or the key contains this","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false}]}},"required":["definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/{id}":{"get":{"summary":"One report you can see (the organization's, or your own private one); another's private report is a 404","tags":["Reports"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename, redefine, share or unshare (an Owner or Admin; an unshared report becomes theirs), or (de)activate a report. Audited report.updated / report.shared / report.deactivated with before and after","tags":["Reports"],"description":"Required scope: `contracts:read (the organization's: admin, or a signed-in Owner / Admin; a private one: its owner)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"visibility":{"type":"string","enum":["private","organization"]},"definition":{"oneOf":[{"type":"object","properties":{"subject":{"type":"string","const":"contracts"},"filters":{"default":{},"type":"object","properties":{"status":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","enum":["draft","in_review","approved","out_for_signature","partially_executed","executed","active","expired","terminated","renewed","amended","declined","voided","cancelled","archived"]}},"contractType":{"type":"string","minLength":1,"maxLength":100},"effectiveFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effectiveTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expirationFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expirationTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"executedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"executedTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"externalSystem":{"type":"string","minLength":1,"maxLength":100},"q":{"description":"The title or the external id contains this","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string","const":"obligations"},"filters":{"default":{},"type":"object","properties":{"status":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["open","done","waived","carried_over","lapsed"]}},"contractType":{"type":"string","minLength":1,"maxLength":100},"key":{"type":"string","minLength":1,"maxLength":100},"dueFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false},{"type":"object","properties":{"subject":{"type":"string","const":"clauses"},"filters":{"default":{},"type":"object","properties":{"category":{"type":"string","enum":["general","payment","term_and_termination","liability","indemnity","confidentiality","data_protection","intellectual_property","dispute_resolution","compliance","property","other"]},"latestStatus":{"type":"string","enum":["draft","pending_approval","approved","rejected","retired"]},"contractType":{"type":"string","minLength":1,"maxLength":100},"includeInactive":{"type":"boolean"},"q":{"description":"The title or the key contains this","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":120},"direction":{"type":"string","enum":["asc","desc"]}},"required":["by","direction"],"additionalProperties":false}},"required":["subject","columns"],"additionalProperties":false}]},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/{id}/results":{"get":{"summary":"A saved report's first 100 rows, run as you now (your access, not its author's). Shares the 30-an-hour budget","tags":["Reports"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/{id}/export":{"get":{"summary":"The whole report as a CSV download (text/csv, UTF-8 with a BOM, never cached), run as you now. Every cell starting with = + - @, a tab, a CR or an LF gets a ' first (a spreadsheet never evaluates it). Over 10,000 rows or 4 MB: 413 report_too_large (narrow the filters), never a file cut short. Shares the 30-an-hour budget. Audited report.exported with the row count","tags":["Reports"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/{id}/schedule":{"get":{"summary":"The report's schedule, or null","tags":["Reports"],"description":"Required scope: `contracts:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Email the report's recipients a link to it each period (weekly on a weekday or monthly on a day 1-28, UTC), never its rows or how many. Each recipient an active member who can read the contracts (400 report_recipient_invalid); re-checked when sent (active, can read, not opted out). Periods start from the day it is saved. A sandbox organization is never emailed; each email counts toward the organization's hourly email ceiling. Audited report.schedule_updated","tags":["Reports"],"description":"Required scope: `contracts:read (the organization's report: admin, or a signed-in Owner / Admin; a private one: its owner, to themselves only)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean"},"cadence":{"type":"string","const":"weekly"},"weekday":{"type":"integer","minimum":0,"maximum":6,"description":"0 Sunday .. 6 Saturday (UTC)"},"recipientMemberIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["enabled","cadence","weekday","recipientMemberIds"],"additionalProperties":false},{"type":"object","properties":{"enabled":{"type":"boolean"},"cadence":{"type":"string","const":"monthly"},"monthDay":{"type":"integer","minimum":1,"maximum":28},"recipientMemberIds":{"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["enabled","cadence","monthDay","recipientMemberIds"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/report-emails":{"get":{"summary":"Whether you are emailed scheduled reports in this organization (emailMe)","tags":["Users"],"description":"Required scope: `a signed-in member, or one of their personal keys (X-CLM-Org)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Opt out of scheduled report emails (emailMe: false), or back in, for yourself only. Audited report_emails.member_opted_out / member_opted_in","tags":["Users"],"description":"Required scope: `a signed-in member, or one of their personal keys (X-CLM-Org)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"emailMe":{"type":"boolean"}},"required":["emailMe"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/key-date-alerts":{"get":{"summary":"Whether you are emailed key-date alerts in this organization: emailMe (your own choice) and recipient (the policy names you and is on)","tags":["Users"],"description":"Required scope: `a signed-in member, or one of their personal keys (X-CLM-Org)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Opt out of key-date alert emails (emailMe: false), or back in, for yourself only. Audited key_date_alerts.member_opted_out / member_opted_in","tags":["Users"],"description":"Required scope: `a signed-in member, or one of their personal keys (X-CLM-Org)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"emailMe":{"type":"boolean"}},"required":["emailMe"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys/{id}":{"delete":{"summary":"Revoke a key (kept, marked revoked; audited). Never the one making the request (409 cannot_revoke_current_key), and never a key the organization's host minted (403 integrator_managed_key: GET /keys lists those readOnly, managedBy the host; only the host or the platform revokes them)","tags":["Organization"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/security":{"get":{"summary":"The organization's session limits and two-step verification policy (and whether the platform locked it), with the platform's limits","tags":["Organization"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Shorter session limits for this organization (never longer than the platform's: 400 outside_platform_bounds). The two-step verification policy: a signed-in Owner only (403 owner_only), not while the platform has locked it (409 mfa_locked_by_platform). Audited before/after","tags":["Organization"],"description":"Required scope: `admin (or a signed-in Owner / Admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionAbsoluteHours":{"description":"Never longer than the platform's; null = the platform's","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"sessionIdleHours":{"description":"Never longer than the platform's; null = the platform's","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"mfaPolicy":{"description":"Owners only; not while the platform has locked it at required","type":"string","enum":["optional","required"]},"personalKeyDays":{"description":"How long a new personal API key lives, in days; never longer than the platform's maximum; null = 90","anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/sso":{"get":{"summary":"Single sign-on: the Clerk enterprise connection, enforcement (off, optional, required), ssoRequiredSince (the 24-hour grace period's start), the break-glass Owners, the claimed domains (a pending one shows the TXT record to add) and what SSO doesn't deprovision","tags":["Organization"],"description":"Required scope: `a signed-in Owner or Admin (or a key with admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Set the connection (checked with Clerk: every domain of it must be this organization's active domain, 409 connection_domain_not_verified; one organization per connection, 409 connection_taken), the enforcement (needs the connection, 409 connection_required; required needs an active domain, 409 domain_required, and starts 24 hours' grace for sessions already signed in by email), and one or two break-glass Owners (active Owners with two-step verification, 400 break_glass_not_eligible). While required, a member whose membership email is on an active domain must come through the connection (403 sso_required); a named break-glass Owner may use email with a verified second factor (audited sso.break_glass_used, emailed to the other Owners). JIT (jitEnabled, off by default): a first SSO sign-in by someone on an active domain creates a membership with jitRoleId, which may never be Owner, Admin or a role holding members:manage, webhooks:write or connections:write (400 jit_role_not_allowed; re-checked from the role's scopes at every sign-in, refused then with authz.denied and an email to the Owners). mfaDelegated: the IdP's sign-in stands for the organization's two-step verification in SSO sessions, only while the platform allows it (409 mfa_delegation_not_allowed). 403 owner_only for anyone else. Audited organization.sso_updated","tags":["Organization"],"description":"Required scope: `a signed-in Owner`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clerkConnectionId":{"description":"The Clerk enterprise connection (SAML or OIDC) for this organization; its domains must be this organization's active domains","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"enforcement":{"description":"off: no SSO; optional: SSO or email; required: members on the organization's domains must sign in with SSO (24 hours' grace for sessions already signed in)","type":"string","enum":["off","optional","required"]},"breakGlassMemberIds":{"description":"One or two active Owners with two-step verification on, who may still sign in with email + MFA while SSO is required (every use is audited and emailed to the other Owners)","maxItems":2,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"jitEnabled":{"description":"Create a membership on the first SSO sign-in of someone on your domains (off by default); needs jitRoleId","type":"boolean"},"jitRoleId":{"description":"The role JIT members get: a custom role, Contract manager or Viewer; never Owner, Admin or a role with members:manage, webhooks:write or connections:write (checked again at every use)","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"mfaDelegated":{"description":"Let your identity provider's sign-in stand for two-step verification in SSO sessions (only where the platform allows it)","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/sso/domains":{"post":{"summary":"Claim an email domain; add the returned TXT record (clm-domain-verification=…) to its DNS, then verify. At most 20. Audited sso_domain.claimed","tags":["Organization"],"description":"Required scope: `a signed-in Owner`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","maxLength":253,"pattern":"^(?=.{4,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"required":["domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/sso/domains/{id}/verify":{"post":{"summary":"Look for the TXT record (409 domain_not_verified until it's there). Found: active, or pending_review when another organization holds the domain (the platform decides; it never takes effect on its own). Audited","tags":["Organization"],"description":"Required scope: `a signed-in Owner`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/sso/domains/{id}/release":{"post":{"summary":"Release a domain (kept, marked released); SSO no longer covers it. Audited sso_domain.released","tags":["Organization"],"description":"Required scope: `a signed-in Owner`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings/address":{"get":{"summary":"The organization's address in the one address shape (address standard v2); set is false while it has none","tags":["Organization"],"description":"Required scope: `contracts:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Add or change the organization's address: US mode (state from the list, the county FIPS within that state, 5-digit ZIP or ZIP+4, country US), no coordinates on a manual address; addressSource validated is confirmed against CLM's own validation answers, else stored as manual without coordinates; autocomplete and its coordinates are taken as sent. 403 owner_only for anyone else. Audited organization.address_updated (before/after)","tags":["Organization"],"description":"Required scope: `a signed-in Owner, or a key with admin`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"streetLine1":{"type":"string","minLength":1,"maxLength":200},"streetLine2":{"default":"","type":"string","maxLength":200},"aptSuiteUnit":{"default":"","type":"string","maxLength":50},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string"},"county":{"type":"string","pattern":"^\\d{5}$"},"zipCode":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$"},"country":{"type":"string","const":"US"},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"addressSource":{"type":"string","enum":["autocomplete","validated","manual"]}},"required":["streetLine1","city","state","county","zipCode","country","latitude","longitude","addressSource"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/roles":{"get":{"summary":"The four built-in roles (with their pseudo-rights: org:admin and roles:manage for Owner and Admin, org:owner for Owner) and this organization's custom roles: scopes, flaggedScopes (held but no longer allowed by the platform, so not in effect), warnings (author_and_approve), member counts; allowedScopes and maxCustomRoles are the platform's limits (R-2)","tags":["Members"],"description":"Required scope: `members:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a custom role from scopes, or basedOn a built-in (copying only what a custom role may hold; dropped lists the rest). Never admin, console:sessions or a pseudo-right (400 scope_built_in_only); only scopes the platform allows (400 scope_not_allowed); an allowed escalation-equivalent needs its paired rights (400 paired_rights_required); only scopes the editor holds (403 role_above_actor, audited authz.denied). Built-in names are reserved (400 role_name_reserved); unique names (409 role_name_taken); at most maxCustomRoles (409 role_limit). Audited","tags":["Members"],"description":"Required scope: `roles:manage (a signed-in Owner or Admin, or a key with admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"scopes":{"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"description":"API scopes; see x-scopes. Never admin, console:sessions or a built-in's pseudo-right"},"basedOn":{"description":"Copy a built-in's scopes (those a custom role may hold) when scopes are not given","type":"string","enum":["owner","admin","contract_manager","viewer"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/roles/{id}":{"patch":{"summary":"Change a custom role's name, description or scopes. The editor must hold the role's current and new scopes (403 role_above_actor). Built-ins can't be changed (409 built_in_role). Audited before/after","tags":["Members"],"description":"Required scope: `roles:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"scopes":{"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"description":"API scopes; see x-scopes. Never admin, console:sessions or a built-in's pseudo-right"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/roles/{id}/archive":{"post":{"summary":"Archive a custom role nobody holds (active or deactivated), is invited to or gets through a group (409 role_in_use, listing memberIds, invitationIds and groupIds). Kept (R-1). Audited","tags":["Members"],"description":"Required scope: `roles:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/roles/{id}/restore":{"post":{"summary":"Restore an archived custom role (within the limit; its name must be free). Audited","tags":["Members"],"description":"Required scope: `roles:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups":{"get":{"summary":"The organization's groups (archived ones marked): each grants one role (roleId, roleName, its scopes) to its members; memberCount; maxGroups (500) and maxMembersPerGroup (5,000). A member's rights are their own role's plus the scopes of their active groups' roles; org-admin rights come only from the own role","tags":["Members"],"description":"Required scope: `members:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a group granting a role the caller may give (403 role_above_actor, audited authz.denied). Never a role with org-admin rights: not Owner, not Admin (400 group_role_not_allowed). Unique names among unarchived groups (409 group_name_taken); at most 500 (409 group_limit). Audited group.created","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The role the group grants: a custom role, or the Contract manager or Viewer built-in (never Owner or Admin)"}},"required":["name","roleId"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}":{"get":{"summary":"A group and its current members (a deactivated member stays listed and gets nothing from the group)","tags":["Members"],"description":"Required scope: `members:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a group's name, description or role. The caller must be able to give the group's role, and for a role change the new one, and act on every current member (their own role plus their groups, 403 target_above_actor). 409 group_archived. Audited group.updated (before/after)","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"roleId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The role the group grants: a custom role, or the Contract manager or Viewer built-in (never Owner or Admin)"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}/archive":{"post":{"summary":"Archive a group: its grants end on the next request. Needs \"may act on\" every current member (403 target_above_actor). Kept (R-1). Audited group.archived","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}/restore":{"post":{"summary":"Restore an archived group: as for creating it, plus \"may act on\" every current member; within the limit, its name free. Audited group.restored","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}/members":{"post":{"summary":"Add members. Each addition needs the group's role within what the caller may give AND the member within what the caller may act on (403 role_above_actor / target_above_actor; one refusal refuses all). Not oneself (403 no_self_change), not a deactivated member (409 member_deactivated), at most 5,000 members (409 group_member_limit). Adding a current member changes nothing. Audited group.member_added","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"memberIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Members to add; each is checked on its own, and one refusal refuses them all"}},"required":["memberIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}/members/{memberId}":{"delete":{"summary":"Remove a member from a group (the row is kept, marked removed). Needs \"may act on\" that member (403 target_above_actor); not oneself (403 no_self_change). Audited group.member_removed","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/members":{"get":{"summary":"The organization's members: the four name fields, email, role, status, joined, last active, and the keys of each member's lineage (createdByDeactivatedMember flags an active key of a deactivated member); grantableRoles lists what the caller may give, and each member whether the caller may manage them (against their own role plus their groups) and their active groups (groups, with addedScopes: what each adds beyond the own role, shown \"via group\")","tags":["Members"],"description":"Required scope: `members:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/members/{id}":{"patch":{"summary":"Change a member's role ({ role } for a built-in, or { roleId }). Guards compare rights (scopes plus the built-ins' pseudo-rights): the caller's rights must cover the role's and the member's current role's, so only Owners and Admins (or admin keys) give Admin and only Owners touch Owners (403 role_above_actor / target_above_actor, audited authz.denied). Nobody changes their own role (403 no_self_change), except an Owner stepping down while another active Owner remains; the last Owner stays (409 last_owner). Audited","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"description":"A built-in role: owner, admin, contract_manager or viewer","type":"string","enum":["owner","admin","contract_manager","viewer"]},"roleId":{"description":"A role by id: a built-in's, or one of this organization's custom roles","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/members/{id}/deactivate":{"post":{"summary":"Deactivate a member: their access ends on the next request. revokeKeys (default true) revokes every active key of their lineage in this organization (a key minted by a key inherits its root member), each audited api_key.revoked; false needs a reason (422 reason_required). Same guards as the role change. Audited","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","maxLength":1000},"revokeKeys":{"default":true,"description":"Revoke every key this member's lineage minted in this organization (default true). false needs a reason. Their personal keys are revoked either way","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"reason_required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/members/{id}/reactivate":{"post":{"summary":"Reactivate a member; keys revoked with the deactivation stay revoked. Not into an archived role (409 role_archived: restore the role first). Audited","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/members/transfer-ownership":{"post":{"summary":"An Owner makes another active member an Owner (403 owner_only for anyone else, keys included); they may then step down with PATCH /members/{id}. Audited ownership.transferred","tags":["Members"],"description":"Required scope: `members:manage (a signed-in Owner)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"memberId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["memberId"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations":{"get":{"summary":"The organization's invitations, every status (open, needs_approval, accepted, declined, revoked, expired), with the inviter. Never a token","tags":["Members"],"description":"Required scope: `members:read`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Invite by email with a role the caller may give ({ role } for a built-in, or { roleId }; the same rights guards as a role change). The link, valid 7 days, goes only into the email (emailSent says whether it went). 409 already_member, member_deactivated (reactivate instead) or invitation_open (resend instead). Audited member.invited. With user sign-in on (CLM_USER_LOGIN=on), the address is also invited in Clerk (so an invite-only Clerk lets them sign up), unless it has a Clerk account already; a Clerk failure never undoes the invitation (audited invitation.clerk_sent, _has_account or _failed)","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string","maxLength":100},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"type":"string","maxLength":100},"suffix":{"anyOf":[{"type":"string","enum":["Jr","Sr","II","III","IV","V","VI"]},{"type":"null"}]},"role":{"description":"A built-in role: owner, admin, contract_manager or viewer","type":"string","enum":["owner","admin","contract_manager","viewer"]},"roleId":{"description":"A role by id: a built-in's, or one of this organization's custom roles","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["email","firstName","lastName"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/{id}":{"delete":{"summary":"Revoke an open or awaiting-approval invitation (kept). Audited. With user sign-in on, the address's pending Clerk invitation is revoked too, unless it is still invited in CLM (audited invitation.clerk_*)","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/{id}/resend":{"post":{"summary":"Send a new link valid 7 days (an expired invitation opens again); the old link stops working. Audited","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/{id}/approve":{"post":{"summary":"Approve an invitation in needs_approval (its inviter could no longer give its role when it was accepted): the person joins. The approver must be able to give the role. Audited","tags":["Members"],"description":"Required scope: `members:manage`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/pending":{"get":{"summary":"Your open invitations (to your verified email), and any awaiting an administrator's approval, with the organization, role and inviter","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/lookup":{"post":{"summary":"What an invitation offers (organization, role, inviter; forYou says whether it is addressed to your email), by the token from the email or by id for one of your own. Nothing changes. Note: by token, any signed-in holder of the link sees the inviter's name and email (as the email itself shows them), even when the invitation is addressed to someone else; accepting still needs the invited, verified email","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"],"additionalProperties":false},{"type":"object","properties":{"invitationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["invitationId"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/accept":{"post":{"summary":"Join, by token or by id. Your verified primary email (read from the sign-in service now) must be the invited one (403 invitation_email_mismatch / email_unverified); the invitation must be open (409 invitation_not_open with its status). When the inviter can no longer give the role, the answer is outcome needs_approval and an administrator approves. Audited","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"],"additionalProperties":false},{"type":"object","properties":{"invitationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["invitationId"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/decline":{"post":{"summary":"Decline, by token or by id: recorded and kept; nothing else changes. Audited","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"],"additionalProperties":false},{"type":"object","properties":{"invitationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["invitationId"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"service_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/self-serve":{"post":{"summary":"Create an organization with yourself as its first Owner. Needs sign-up open (403 signup_closed), the request's own country allowed (x-vercel-ip-country; 403 signup_country_not_allowed; a VPN defeats it, the US address is the durable check), and a US address in the one address shape (state from the list, the county FIPS from that state's list, 5-digit ZIP or ZIP+4, country US, addressSource; coordinates only with autocomplete or an accepted validation suggestion). addressSource validated is checked against CLM's own validation answers, else stored as manual without coordinates; autocomplete and its coordinates are taken as the client sends them (nothing in CLM relies on them). Rate-limited per person and per network (429 self_serve_limit). Audited","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"object","properties":{"streetLine1":{"type":"string","minLength":1,"maxLength":200},"streetLine2":{"default":"","type":"string","maxLength":200},"aptSuiteUnit":{"default":"","type":"string","maxLength":50},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string"},"county":{"type":"string","pattern":"^\\d{5}$"},"zipCode":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$"},"country":{"type":"string","const":"US"},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"addressSource":{"type":"string","enum":["autocomplete","validated","manual"]}},"required":["streetLine1","city","state","county","zipCode","country","latitude","longitude","addressSource"],"additionalProperties":false}},"required":["name","address"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/sso-domains":{"get":{"summary":"SSO domain claims waiting for review (a second organization proved a domain another holds), with the current holder","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/sso-domains/{id}/review":{"post":{"summary":"Approve (the domain becomes this organization's; the holder's claim is released) or reject, with a reason. Audited sso_domain.review","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["decision","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/organizations/{id}/sso/lift":{"post":{"summary":"The last resort: an organization's SSO requirement becomes optional, with a reason. Audited organization.sso_updated (by: platform)","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why the platform lifts this organization's SSO requirement (audited)"}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/settings":{"get":{"summary":"Sign-up mode (open | invitation_only), allowed sign-up countries, and the platform's session limits","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change the sign-up mode, allowed countries (ISO 3166-1 alpha-2), session limits, or the Address Validation budget (paid calls per UTC day and month; 0 = off). Audited before/after","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"signupMode":{"description":"open: anyone may sign up and create an organization; invitation_only: only invited people","type":"string","enum":["open","invitation_only"]},"allowedSignupCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"sessionAbsoluteHours":{"type":"integer","minimum":1,"maximum":720},"sessionIdleHours":{"type":"integer","minimum":1,"maximum":720},"addressValidationDailyLimit":{"description":"Hard cap on paid Address Validation calls per UTC day, platform-wide (0 = off)","type":"integer","minimum":0,"maximum":100000},"addressValidationMonthlyLimit":{"description":"Hard cap per UTC month (0 = off)","type":"integer","minimum":0,"maximum":1000000},"customRolesAllowedScopes":{"description":"The scopes custom roles may hold (R-2). Removing one flags the roles that hold it and stops it taking effect at once","maxItems":15,"type":"array","items":{"type":"string","enum":["contracts:read","contracts:write","contracts:approve","signature:send","rules:read","rules:write","templates:write","policies:write","clauses:approve","console:sessions","connections:write","webhooks:write","members:read","members:manage","admin"]}},"customRolesMaxPerOrg":{"description":"How many unarchived custom roles an organization may have","type":"integer","minimum":0,"maximum":500},"ssoMfaDelegationAllowed":{"description":"Whether organizations may let their identity provider's sign-in stand for two-step verification in SSO sessions (R-2; off by default). Switching it off stops every delegation at once","type":"boolean"},"personalKeyMaxDays":{"description":"The longest life an organization may give a new personal API key, in days (existing keys keep theirs)","type":"integer","minimum":1,"maximum":3650}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/organizations":{"get":{"summary":"Every organization: name, host, whether it is active and whether it has an Owner","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/organizations/{id}/sandbox":{"patch":{"summary":"Mark an organization sandbox or real, with a reason (audited organization.sandbox_changed). A sandbox organization's email goes nowhere, or only to the platform's sandbox mailbox (CLM_SANDBOX_EMAIL_TO; audited email.suppressed), and its signature requests and reminders are refused (409 sandbox_signature_suppressed)","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sandbox":{"type":"boolean","description":"true: CLM sends no email and no signature request to real people for this organization"},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Why (audited)"},"force":{"description":"Needed to make a sandbox real once it has held back email (email.suppressed): the people it would have reached may not be real","type":"boolean"}},"required":["sandbox","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/organizations/{id}/security":{"patch":{"summary":"Lock an organization's two-step verification at required (its Owners can't turn it off), or lift the lock. Audited","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mfaLocked":{"type":"boolean","description":"true: required, and Owners can't turn it off; false: the lock is lifted (the policy stays as it is)"}},"required":["mfaLocked"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/organizations/{id}/invitations":{"post":{"summary":"Invite the first Owner of an organization that has no active Owner (409 has_owner otherwise); it replaces an earlier open first-Owner invitation to the same address. The person confirms as with any invitation. Audited","tags":["Platform"],"description":"Required scope: `platform key (or a platform admin)`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string","maxLength":100},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"type":"string","maxLength":100},"suffix":{"anyOf":[{"type":"string","enum":["Jr","Sr","II","III","IV","V","VI"]},{"type":"null"}]}},"required":["email","firstName","lastName"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/integrators":{"get":{"summary":"Host platforms onboarded here","tags":["Platform"],"description":"Required scope: `platform key`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Onboard a host platform; its integrator key is shown once","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9-]+$"}},"required":["name","slug"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/integrators/{id}":{"patch":{"summary":"Suspend or restore a host (never deleted), and/or set its link settings: externalSystem (its system name in external refs, e.g. lease-portal), returnOrigins (exact origins), handoffStartUrl and linkTemplates ({externalId} the only placeholder), each of which must be on a return origin (400 return_url_not_allowed). Suspended: its integrator key answers 401 and its organizations' keys 403 integrator_suspended; reactivating restores access. Audited.","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"isActive":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":1000},"externalSystem":{"description":"The host's system name in external refs, e.g. lease-portal","anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9][a-z0-9._-]*$"},{"type":"null"}]},"returnOrigins":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"handoffStartUrl":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"linkTemplates":{"type":"object","properties":{"contract":{"type":"string","maxLength":2000},"organization":{"type":"string","maxLength":2000}},"additionalProperties":false},"branding":{"description":"Host-mode branding (M2 contract §4.1); null clears it","anyOf":[{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":60},"logoUrl":{"type":"string","maxLength":2000},"colors":{"type":"object","properties":{"primary":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"primaryForeground":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"background":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"foreground":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"accent":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"border":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"required":["primary","primaryForeground","background","foreground","accent","border"],"additionalProperties":false},"radiusPx":{"type":"integer","minimum":0,"maximum":24},"mode":{"type":"string","enum":["light","dark","system"]}},"required":["productName","colors","radiusPx","mode"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/organizations/{id}":{"patch":{"summary":"Suspend or reactivate any organization (never deleted; reason required to suspend). Suspended: its keys answer 403 organization_suspended, its webhooks pause (events are kept and delivered after reactivation), lifecycle sweeps skip it. Audited.","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"isActive":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["isActive"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/contract-types":{"get":{"summary":"Platform-wide contract types, each with the facts its rules may test","tags":["Platform"],"description":"Required scope: `platform key`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a platform-wide contract type","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"packKey":{"type":["string","null"]},"policy":{"default":{},"type":"object","properties":{"requiresApproval":{"type":"boolean"},"allowSelfApproval":{"type":"boolean"},"approverAssertedRoles":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"additionalProperties":false}},"required":["key","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/contract-types/{key}":{"patch":{"summary":"Set a contract type's renewal bounds (allowAutoApprove, maxRentIncreasePctCap \"0.00\"..\"25.00\", allowAutoSend, allowPartyChanges). Organizations choose within them; tighter bounds clamp existing choices when evaluated. Audited.","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"renewalBounds":{"type":"object","properties":{"allowAutoApprove":{"type":"boolean"},"maxRentIncreasePctCap":{"type":"string","pattern":"^\\d{1,2}\\.\\d{2}$","description":"\"0.00\"..\"25.00\""},"allowAutoSend":{"type":"boolean"},"allowPartyChanges":{"type":"boolean"}},"required":["allowAutoApprove","maxRentIncreasePctCap","allowAutoSend","allowPartyChanges"],"additionalProperties":false}},"required":["renewalBounds"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/rules":{"get":{"summary":"Platform (legal) and integrator rules","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"contractType","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a legal rule — must cite its authority; UNVERIFIED cannot be required","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contractType":{"type":"string","minLength":1},"documentKey":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9_.-]+$"},"scope":{"default":"platform","type":"string","enum":["platform","integrator"]},"integratorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentName":{"type":"string","minLength":1,"maxLength":200},"documentCategory":{"default":"other","type":"string","enum":["disclosure","agreement","lease_agreement","addendum","notice","inspection","other"]},"jurisdictionCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":60},{"type":"null"}]},"requirement":{"type":"string","enum":["required","recommended","optional","prohibited"]},"conditions":{"default":[],"maxItems":10,"type":"array","items":{}},"legalBasis":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"sourceNote":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"effectiveFrom":{"type":["string","null"]},"effectiveTo":{"type":["string","null"]},"sequence":{"default":500,"type":"integer","minimum":0,"maximum":9999},"isActive":{"default":true,"type":"boolean"}},"required":["contractType","documentKey","documentName","requirement"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/rules/{id}":{"get":{"summary":"One platform rule","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a platform rule (partial; re-checked against the legal rules)","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documentName":{"type":"string","minLength":1,"maxLength":200},"documentCategory":{"type":"string","enum":["disclosure","agreement","lease_agreement","addendum","notice","inspection","other"]},"jurisdictionCode":{"anyOf":[{"type":"string","minLength":2,"maxLength":60},{"type":"null"}]},"requirement":{"type":"string","enum":["required","recommended","optional","prohibited"]},"conditions":{"maxItems":10,"type":"array","items":{}},"legalBasis":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"sourceNote":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"effectiveFrom":{"type":["string","null"]},"effectiveTo":{"type":["string","null"]},"sequence":{"type":"integer","minimum":0,"maximum":9999},"isActive":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Deactivate a platform rule (never deleted): it stops applying to packets resolved from now on and stays readable by id. Optional reason. Audited; reactivate with PATCH isActive: true.","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/seed":{"post":{"summary":"Load the packs' contract types and rules (idempotent)","tags":["Platform"],"description":"Required scope: `platform key`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"summary":"This document","tags":["Meta"],"description":"Required scope: `(public)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/address/validate":{"post":{"summary":"Address Validation for a complete US address typed by hand (address standard v2): { status: suggestion, suggestion, differences } (with the county FIPS when it maps to exactly one county, and coordinates), no_match, or unavailable (the feature is off without GOOGLE_ADDRESS_VALIDATION_API_KEY, or the provider failed: keep what was typed). A suggestion is only offered; the form asks. Cached per normalized input; limited per caller (429 address_validation_limit); a platform-wide hard budget per UTC day and month (platform settings) answers unavailable once spent","tags":["Users"],"description":"Required scope: `any signed-in caller (a user, in any context, or a key)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"streetLine1":{"type":"string","minLength":1,"maxLength":200},"streetLine2":{"default":"","type":"string","maxLength":200},"aptSuiteUnit":{"default":"","type":"string","maxLength":60},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string"},"zipCode":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$"}},"required":["streetLine1","city","state","zipCode"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sso/start":{"post":{"summary":"Start signing in through the SSO of the organization holding this work email's active domain: returns the sign-in's id and a secret (10 minutes, single use) for the starting browser's HttpOnly cookie, never a URL. 404 sso_not_configured when no organization's SSO covers the domain; 429 when rate-limited","tags":["Users"],"description":"Required scope: `(public, rate-limited per network)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string"}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/sso/complete":{"post":{"summary":"Finish an SSO sign-in: the id and the secret from the browser that started it, unused and unexpired, and Clerk's record that this session began after the sign-in started and the user authenticated through that organization's connection since. Then this session counts as SSO for the organization (403 sso_not_confirmed otherwise, with the reason: secret, used, expired, not_through_connection; 503 when Clerk can't be read). Audited sso.signed_in. membership: existing | none | created (JIT, audited member.jit_created) | refused (the default role can't be used now; the message says to ask for an invitation)","tags":["Users"],"description":"Required scope: `a signed-in user (no X-CLM-Org / X-CLM-Context)`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A replay within 72 hours returns the first response; a response that carried a secret (a key, a signing secret, a handoff code) is never stored, so its replay is 409 secret_not_replayable with the created id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"secret":{"type":"string","minLength":20,"maxLength":200}},"required":["id","secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signup-policy":{"get":{"summary":"Whether CLM takes sign-ups (signupMode open | invitation_only) and from which countries (allowedSignupCountries), for sign-up pages","tags":["Meta"],"description":"Required scope: `(public)`.","responses":{"200":{"description":"OK"},"400":{"description":"validation_failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden | integrator_suspended | organization_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}}},"x-scopes":["contracts:read","contracts:write","contracts:approve","signature:send","rules:read","rules:write","templates:write","policies:write","clauses:approve","console:sessions","connections:write","webhooks:write","members:read","members:manage","admin"],"x-webhook-events":["contract.created","contract.submitted","contract.approved","contract.rejected","contract.sent_for_signature","contract.partially_executed","contract.executed","contract.declined","contract.voided","contract.cancelled","contract.activated","contract.terminated","contract.expired","contract.archived","contract.returned_to_draft","signature.send_failed","contract.renewal_window","obligation.due_soon","obligation.overdue","form_submission.submitted","form_submission.contract_created","form_submission.failed"],"x-lifecycle":{"submit":{"from":["draft"],"to":"in_review","actor":"caller","scope":"contracts:write","requiresReason":false,"guards":["has_documents","packet_complete","has_reachable_signers","generated_documents_current","legal_limits_respected"],"description":"Submit for approval. The packet must be complete and every signer reachable."},"withdraw":{"from":["in_review","approved"],"to":"draft","actor":"caller","scope":"contracts:write","requiresReason":true,"guards":["no_active_signature_request"],"description":"Return to draft to make changes. Unlocks the documents and discards the approval."},"approve":{"from":["in_review"],"to":"approved","actor":"caller","scope":"contracts:approve","requiresReason":false,"guards":["packet_complete","generated_documents_current","not_self_approval","approver_role_allowed","legal_limits_respected"],"description":"Approve. Locks every document version and records its hash; what is signed is exactly what was approved."},"reject":{"from":["in_review"],"to":"draft","actor":"caller","scope":"contracts:approve","requiresReason":true,"guards":[],"description":"Reject back to draft, with the reason."},"send_for_signature":{"from":["approved"],"to":"out_for_signature","actor":"caller","scope":"signature:send","requiresReason":false,"guards":["documents_locked","packet_complete","has_reachable_signers","audit_chain_intact","no_active_signature_request"],"description":"Send the approved, locked documents to the signers through the organization's eSignature provider."},"signature_send_failed":{"from":["out_for_signature"],"to":"approved","actor":"system","scope":"signature:send","requiresReason":true,"guards":[],"description":"The provider refused or could not be reached; nothing was sent. The contract is approved again and can be re-sent."},"record_partial_signature":{"from":["out_for_signature","partially_executed"],"to":"partially_executed","actor":"system","scope":"signature:send","requiresReason":false,"guards":[],"description":"A signer has signed; others remain."},"complete_signature":{"from":["out_for_signature","partially_executed"],"to":"executed","actor":"system","scope":"signature:send","requiresReason":false,"guards":["audit_chain_intact"],"description":"The provider reports completion AND the signed document has been retrieved and hashed."},"record_decline":{"from":["out_for_signature","partially_executed"],"to":"declined","actor":"system","scope":"signature:send","requiresReason":true,"guards":[],"description":"A signer declined."},"void":{"from":["out_for_signature","partially_executed"],"to":"voided","actor":"caller","scope":"signature:send","requiresReason":true,"guards":[],"description":"Void the signature request at the provider, with the reason."},"record_provider_void":{"from":["out_for_signature","partially_executed"],"to":"voided","actor":"system","scope":"signature:send","requiresReason":true,"guards":[],"description":"The request was voided or expired at the provider."},"cancel":{"from":["draft","in_review","approved"],"to":"cancelled","actor":"caller","scope":"contracts:write","requiresReason":true,"guards":["no_active_signature_request"],"description":"Abandon a contract that was never sent."},"reopen":{"from":["declined","voided"],"to":"draft","actor":"caller","scope":"contracts:write","requiresReason":true,"guards":[],"description":"Return a declined or voided contract to draft to correct and resend."},"activate":{"from":["executed"],"to":"active","actor":"caller","scope":"contracts:write","requiresReason":false,"guards":["effective_date_set"],"description":"The contract's term has begun."},"expire":{"from":["active"],"to":"expired","actor":"system","scope":"contracts:write","requiresReason":false,"guards":[],"description":"The term ended without renewal."},"terminate":{"from":["executed","active"],"to":"terminated","actor":"caller","scope":"contracts:write","requiresReason":true,"guards":[],"description":"End the contract early, with the reason."},"supersede_by_renewal":{"from":["active","expired","amended"],"to":"renewed","actor":"system","scope":"contracts:write","requiresReason":false,"guards":[],"description":"A renewal contract linked to this one was executed."},"supersede_by_amendment":{"from":["executed","active"],"to":"amended","actor":"system","scope":"contracts:write","requiresReason":false,"guards":[],"description":"An amendment linked to this one was executed."},"record_import":{"from":["draft"],"to":"executed","actor":"system","scope":"contracts:write","requiresReason":false,"guards":[],"description":"A contract signed outside CLM, imported with its signed copy (lib/services/contract-import.ts): a record from the start."},"archive":{"from":["expired","terminated","renewed","amended","declined","voided","cancelled"],"to":"archived","actor":"caller","scope":"contracts:write","requiresReason":false,"guards":[],"description":"Retention archiving. Executed contracts are never deleted."}}}