{"openapi":"3.1.0","info":{"title":"BAPC Contracts API","version":"1.0.0","description":"One public REST API serves the BAPC Contracts UI, customers and other BAPC apps alike (section 8). Machines use OAuth 2.0 client credentials (1-hour scoped tokens); people use the Sign in with BAPC session. Every POST accepts Idempotency-Key. Rate limits per tenant and per client (default 100/second burst, 6,000/minute sustained) answer 429 with Retry-After. Webhooks are signed: BAPC-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"t.body\">; reject timestamps older than 5 minutes and dedupe on event_id."},"servers":[{"url":"https://e-sign.bapc.app"}],"tags":[{"name":"Authority"},{"name":"F1 AI Director"},{"name":"F10 Embedded signing"},{"name":"F10 Platform API"},{"name":"F11 Contract record"},{"name":"F12 Obligations"},{"name":"F13 Renewals"},{"name":"F14 Search"},{"name":"F15 Risk"},{"name":"F16 Proposals"},{"name":"F17 Migration"},{"name":"F18 Analytics"},{"name":"F19 Multilingual"},{"name":"F2 Workflows"},{"name":"F20 Automation"},{"name":"F21 Engagement"},{"name":"F23 Agents"},{"name":"F25 Clickwrap"},{"name":"F29 Data customization"},{"name":"F3 Documents"},{"name":"F4 Clause library"},{"name":"F5 Negotiation"},{"name":"F6 Signatures"},{"name":"F6 Signer"},{"name":"F7 Verification"},{"name":"F8 Evidence"},{"name":"F9 Multi-party"},{"name":"General"},{"name":"Retention"},{"name":"Settings"},{"name":"Workspace"}],"paths":{"/api/v1/documents/compare":{"get":{"operationId":"get_documents_compare","summary":"Compare two versions: word redline with the author(s) of each version","tags":["F3 Documents"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/documents/compare-languages":{"get":{"operationId":"get_documents_compare_languages","summary":"Side-by-side language view by clause location","tags":["F19 Multilingual"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/documents/import":{"post":{"operationId":"post_documents_import","summary":"Import a DOCX, PDF, TXT or HTML file (scanned first: macros blocked, PDF active content stripped, HTML sanitised)","tags":["F3 Documents"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workspaces":{"post":{"operationId":"post_workspaces","summary":"Create a workspace (tenant)","tags":["Workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workspaces/switch":{"post":{"operationId":"post_workspaces_switch","summary":"POST /workspaces/switch","tags":["General"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/me":{"get":{"operationId":"get_me","summary":"Who am I","tags":["Workspace"],"parameters":[],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/users":{"get":{"operationId":"get_users","summary":"List users","tags":["Workspace"],"parameters":[],"security":[{"oauth2":["contracts.admin.users"]},{"session":[]}],"x-required-scope":"contracts.admin.users","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_users","summary":"Invite or change a user","tags":["Workspace"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.admin.users"]},{"session":[]}],"x-required-scope":"contracts.admin.users","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/users/{email}/deactivate":{"post":{"operationId":"post_users_email_deactivate","summary":"POST /users/{email}/deactivate","tags":["General"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.admin.users"]},{"session":[]}],"x-required-scope":"contracts.admin.users","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/oauth/token":{"post":{"operationId":"post_oauth_token","summary":"POST /oauth/token","tags":["General"],"parameters":[],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts":{"get":{"operationId":"get_contracts","summary":"List contracts you may read (filter on any field, cf.<key> for custom fields)","tags":["F11 Contract record"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_contracts","summary":"Create a contract (Draft)","tags":["F11 Contract record"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}":{"get":{"operationId":"get_contracts_id","summary":"One contract with parties, document versions and its event timeline","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"patch_contracts_id","summary":"Change a draft contract (metadata and custom fields)","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/status":{"post":{"operationId":"post_contracts_id_status","summary":"Manual status change (cancel, activate, terminate …) — the status machine decides","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/amendments":{"post":{"operationId":"post_contracts_id_amendments","summary":"Start an amendment (a child contract) of an executed contract","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/parties":{"post":{"operationId":"post_contracts_id_parties","summary":"Add a party (customer, supplier, guarantor, internal) with signatory authority","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/parties/{pid}":{"patch":{"operationId":"patch_parties_pid","summary":"Change a party until execution","tags":["F11 Contract record"],"parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/grants":{"post":{"operationId":"post_contracts_id_grants","summary":"Grant one person read or edit access (needed for confidential contracts)","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/links":{"post":{"operationId":"post_contracts_id_links","summary":"Link two contracts (parent, amendment, sow, related_party, renewal, supersedes, related)","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/graph":{"get":{"operationId":"get_contracts_id_graph","summary":"Relationship graph to depth n (contracts you cannot open show as restricted)","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/impact":{"get":{"operationId":"get_contracts_id_impact","summary":"Impact view: every contract affected by terminating this one","tags":["F11 Contract record"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/graph/edges":{"get":{"operationId":"get_graph_edges","summary":"Query graph edges by type across the portfolio (F30 base)","tags":["F11 Contract record"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/schemas/{entity}/fields":{"get":{"operationId":"get_schemas_entity_fields","summary":"List custom fields of an entity","tags":["F29 Data customization"],"parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_schemas_entity_fields","summary":"Add a custom field","tags":["F29 Data customization"],"parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.schema.admin"]},{"session":[]}],"x-required-scope":"contracts.schema.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/schemas/{entity}/fields/{key}":{"delete":{"operationId":"delete_schemas_entity_fields_key","summary":"Retire a custom field","tags":["F29 Data customization"],"parameters":[{"name":"entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.schema.admin"]},{"session":[]}],"x-required-scope":"contracts.schema.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/objects":{"get":{"operationId":"get_objects","summary":"List custom objects","tags":["F29 Data customization"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_objects","summary":"Create a custom object (or declare a type)","tags":["F29 Data customization"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.schema.admin"]},{"session":[]}],"x-required-scope":"contracts.schema.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/objects/{id}":{"patch":{"operationId":"patch_objects_id","summary":"PATCH /objects/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.schema.admin"]},{"session":[]}],"x-required-scope":"contracts.schema.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/request-approval":{"post":{"operationId":"post_contracts_id_request_approval","summary":"Send a draft for approval (no workflow): In review until the Authority Service decides","tags":["Authority"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/approvals":{"get":{"operationId":"get_approvals","summary":"Approval requests (mine=1: the ones you may decide)","tags":["Authority"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/approvals/{id}/decide":{"post":{"operationId":"post_approvals_id_decide","summary":"Approve or reject (named people only, within authority rules)","tags":["Authority"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.approval.decide"]},{"session":[]}],"x-required-scope":"contracts.approval.decide","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/authority-rules":{"get":{"operationId":"get_authority_rules","summary":"GET /authority-rules","tags":["General"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_authority_rules","summary":"Add an authority rule","tags":["Authority"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/authority-rules/{id}":{"delete":{"operationId":"delete_authority_rules_id","summary":"DELETE /authority-rules/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/documents":{"get":{"operationId":"get_contracts_id_documents","summary":"Document versions of a contract","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_contracts_id_documents","summary":"Create a document: JSON {title, content|text|template_id} authors one; a file body uploads a version (scanned first)","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/documents/{vid}":{"get":{"operationId":"get_documents_vid","summary":"One document version (metadata, text, editor content)","tags":["F3 Documents"],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/documents/{vid}/content":{"get":{"operationId":"get_documents_vid_content","summary":"Download the exact bytes of a version (x-content-sha256 header)","tags":["F3 Documents"],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/sign/session":{"get":{"operationId":"get_sign_session","summary":"The signer's own request (guest session only)","tags":["F6 Signer"],"parameters":[],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/sign/document":{"get":{"operationId":"get_sign_document","summary":"The PDF to sign (or, when completed, the completed PDF and certificate) — own envelope only","tags":["F6 Signer"],"parameters":[],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/sign/nonce":{"get":{"operationId":"get_sign_nonce","summary":"A one-time nonce for the signing form (replay defence)","tags":["F6 Signer"],"parameters":[],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/sign/consent":{"post":{"operationId":"post_sign_consent","summary":"Record ESIGN consumer consent (disclosure version and hash)","tags":["F6 Signer"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/sign/paper-copy":{"post":{"operationId":"post_sign_paper_copy","summary":"Ask the sender for a paper copy instead of signing electronically","tags":["F6 Signer"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/sign/otp/send":{"post":{"operationId":"post_sign_otp_send","summary":"F7: email a one-time code","tags":["F7 Verification"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/sign/otp/verify":{"post":{"operationId":"post_sign_otp_verify","summary":"F7: check the emailed one-time code","tags":["F7 Verification"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/sign/sms/send":{"post":{"operationId":"post_sign_sms_send","summary":"F7: SMS one-time code — Blocked (no SMS in BAPC Notifications): always 503","tags":["F7 Verification"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/sign/submit":{"post":{"operationId":"post_sign_submit","summary":"Sign: typed or drawn signature, intent, one-time nonce; binds to the document SHA-256","tags":["F6 Signer"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/sign/decline":{"post":{"operationId":"post_sign_decline","summary":"Decline to sign, with a reason","tags":["F6 Signer"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/signers/{id}/verify":{"post":{"operationId":"post_signers_id_verify","summary":"F7: a signer verifies (email code; SMS blocked) or a sender raises the required level","tags":["F7 Verification"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/signers/{id}/auth-evidence":{"get":{"operationId":"get_signers_id_auth_evidence","summary":"F7: the auth evidence of a signer (append-only) and the events that relied on it","tags":["F7 Verification"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.evidence.read"]},{"session":[]}],"x-required-scope":"contracts.evidence.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/envelopes":{"post":{"operationId":"post_envelopes","summary":"Prepare an envelope: lock a PDF of the chosen version (SHA-256), signers, routing, fields, step-up rules","tags":["F6 Signatures"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"get_envelopes","summary":"Envelopes on contracts you may read","tags":["F6 Signatures"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/envelopes/{id}":{"get":{"operationId":"get_envelopes_id","summary":"An envelope with signers, fields and its event chain","tags":["F6 Signatures"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/envelopes/{id}/send":{"post":{"operationId":"post_envelopes_id_send","summary":"Send for signature (needs an Approved contract and a sign-in in the last 10 minutes)","tags":["F6 Signatures"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/envelopes/{id}/void":{"post":{"operationId":"post_envelopes_id_void","summary":"Void an envelope (links stop working; the contract returns to Approved)","tags":["F6 Signatures"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/envelopes/{id}/remind":{"post":{"operationId":"post_envelopes_id_remind","summary":"Remind the signers whose turn it is (a fresh single-use link)","tags":["F6 Signatures"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/envelopes/{id}/dependencies":{"post":{"operationId":"post_envelopes_id_dependencies","summary":"F9: set a signer's dependencies (waits until the listed signers signed), condition or order","tags":["F9 Multi-party"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/envelopes/{id}/fields":{"post":{"operationId":"post_envelopes_id_fields","summary":"Place fields (page number + position on the page preview) while a draft","tags":["F6 Signatures"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/signers/{id}/reassign":{"post":{"operationId":"post_signers_id_reassign","summary":"F9: reassign a signer (needs contracts.signature.admin; logged with the reason)","tags":["F9 Multi-party"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.admin"]},{"session":[]}],"x-required-scope":"contracts.signature.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/envelopes/{id}/embed-link":{"post":{"operationId":"post_envelopes_id_embed_link","summary":"F10: a single-use embedded signing URL (/embed/sign/{token}) for your own page (flag embedded_signing)","tags":["F10 Embedded signing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.signature.send"]},{"session":[]}],"x-required-scope":"contracts.signature.send","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/envelopes/{id}/evidence":{"get":{"operationId":"get_envelopes_id_evidence","summary":"The signed evidence manifest of a completed envelope, checked now (needs a recent sign-in)","tags":["F8 Evidence"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.evidence.read"]},{"session":[]}],"x-required-scope":"contracts.evidence.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/envelopes/{id}/evidence/export":{"get":{"operationId":"get_envelopes_id_evidence_export","summary":"Evidence bundle (zip: manifest, PDFs, public keys, verify.mjs, README) that verifies offline","tags":["F8 Evidence"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.evidence.read"]},{"session":[]}],"x-required-scope":"contracts.evidence.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/envelopes/{id}/documents/{which}":{"get":{"operationId":"get_envelopes_id_documents_which","summary":"Original, completed or certificate PDF of an envelope","tags":["F8 Evidence"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"which","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/verify":{"post":{"operationId":"post_verify","summary":"Public verification: upload a PDF; answers only match, completed date, signer count and evidence validity","tags":["F8 Evidence"],"parameters":[],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clickwrap/terms":{"get":{"operationId":"get_clickwrap_terms","summary":"Terms documents and their versions","tags":["F25 Clickwrap"],"parameters":[],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_clickwrap_terms","summary":"Create terms (version 1)","tags":["F25 Clickwrap"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clickwrap/terms/{id}":{"get":{"operationId":"get_clickwrap_terms_id","summary":"Terms with every version and its acceptance count","tags":["F25 Clickwrap"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"delete_clickwrap_terms_id","summary":"Retire terms (no more acceptances; the log is kept)","tags":["F25 Clickwrap"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/clickwrap/terms/{id}/versions":{"post":{"operationId":"post_clickwrap_terms_id_versions","summary":"Publish a new version (force_reacceptance: everyone must accept again)","tags":["F25 Clickwrap"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clickwrap/accept":{"post":{"operationId":"post_clickwrap_accept","summary":"Record an acceptance (API key; flag clickwrap_api): terms version hash, user id, time, IP; returns a signed receipt","tags":["F25 Clickwrap"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clickwrap/status":{"get":{"operationId":"get_clickwrap_status","summary":"Has this user accepted the current terms (or must they accept again)?","tags":["F25 Clickwrap"],"parameters":[],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/clickwrap/acceptances":{"get":{"operationId":"get_clickwrap_acceptances","summary":"The acceptance log (hash-chained)","tags":["F25 Clickwrap"],"parameters":[],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/clickwrap/evidence/seal":{"post":{"operationId":"post_clickwrap_evidence_seal","summary":"Seal new acceptances into an evidence manifest (Merkle root, RFC 3161 timestamp, platform signature)","tags":["F25 Clickwrap"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clickwrap/evidence":{"get":{"operationId":"get_clickwrap_evidence","summary":"GET /clickwrap/evidence","tags":["General"],"parameters":[],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/clickwrap/evidence/{id}":{"get":{"operationId":"get_clickwrap_evidence_id","summary":"A sealed clickwrap manifest, checked now","tags":["F25 Clickwrap"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clickwrap.admin"]},{"session":[]}],"x-required-scope":"contracts.clickwrap.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/documents/{docId}":{"get":{"operationId":"get_contracts_id_documents_docId","summary":"One document with its versions (authors of each) and the latest editor content","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"put_contracts_id_documents_docId","summary":"Save the document: creates a new immutable version (Draft contracts only)","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_contracts_id_documents_docId","summary":"Archive a document (its versions stay, immutable)","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/documents/{docId}/restore":{"post":{"operationId":"post_contracts_id_documents_docId_restore","summary":"Restore an archived document","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/documents/{vid}/export":{"get":{"operationId":"get_documents_vid_export","summary":"Export a version as DOCX or PDF (?format=docx|pdf)","tags":["F3 Documents"],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/templates":{"get":{"operationId":"get_templates","summary":"Template gallery","tags":["F3 Documents"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_templates","summary":"Add a template (legal admins)","tags":["F3 Documents"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/templates/{id}":{"get":{"operationId":"get_templates_id","summary":"One template with its content and merge fields","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"put_templates_id","summary":"Change a template","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_templates_id","summary":"Retire a template","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/templates/{id}/create":{"post":{"operationId":"post_templates_id_create","summary":"Create a document (and, if no contract_id is given, a Draft contract) from a template","tags":["F3 Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clauses":{"get":{"operationId":"get_clauses","summary":"Clause library (filter by category, jurisdiction, risk_level, q)","tags":["F4 Clause library"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_clauses","summary":"Add a clause (legal admins)","tags":["F4 Clause library"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/clauses/{id}":{"get":{"operationId":"get_clauses_id","summary":"One clause (?revision=n for an earlier revision)","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"put_clauses_id","summary":"Revise a clause (appends a new revision)","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_clauses_id","summary":"Retire a clause (revisions are kept)","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/clauses/{id}/revisions":{"get":{"operationId":"get_clauses_id_revisions","summary":"Every revision of a clause","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/clauses/{id}/negotiation-history":{"get":{"operationId":"get_clauses_id_negotiation_history","summary":"Per-clause negotiation outcomes (proposed, countered, accepted text and party)","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_clauses_id_negotiation_history","summary":"Record a negotiation outcome for a clause (e.g. agreed outside the room)","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/playbooks":{"get":{"operationId":"get_playbooks","summary":"Playbooks","tags":["F4 Clause library"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_playbooks","summary":"Add a playbook","tags":["F4 Clause library"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/playbooks/{id}":{"get":{"operationId":"get_playbooks_id","summary":"One playbook","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"put_playbooks_id","summary":"Change a playbook","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_playbooks_id","summary":"Retire a playbook","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/playbooks/{id}/evaluate":{"post":{"operationId":"post_playbooks_id_evaluate","summary":"Evaluate a document version against a playbook: clause instances, deviation scores, fallback ladder, prohibited wording","tags":["F4 Clause library"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/analyze":{"post":{"operationId":"post_contracts_id_analyze","summary":"AI analysis: cited summary, risks, clause explanations and suggestions (10 languages)","tags":["F1 AI Director"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.ai.use"]},{"session":[]}],"x-required-scope":"contracts.ai.use","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/analyses":{"get":{"operationId":"get_contracts_id_analyses","summary":"AI analyses of a contract","tags":["F1 AI Director"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/analyses/{id}":{"get":{"operationId":"get_analyses_id","summary":"One AI analysis","tags":["F1 AI Director"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/analyses/{id}/suggestions/{sid}/accept":{"post":{"operationId":"post_analyses_id_suggestions_sid_accept","summary":"A person accepts one AI suggestion (new document version)","tags":["F1 AI Director"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/analyses/{id}/suggestions/{sid}/dismiss":{"post":{"operationId":"post_analyses_id_suggestions_sid_dismiss","summary":"Dismiss an AI suggestion","tags":["F1 AI Director"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.ai.use"]},{"session":[]}],"x-required-scope":"contracts.ai.use","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/analyses/{id}/risks/{rid}/decide":{"post":{"operationId":"post_analyses_id_risks_rid_decide","summary":"A person confirms or dismisses an AI risk flag (Unvalidated until then)","tags":["F1 AI Director"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"rid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.ai.use"]},{"session":[]}],"x-required-scope":"contracts.ai.use","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/ai/settings":{"get":{"operationId":"get_ai_settings","summary":"Tenant AI controls","tags":["F1 AI Director"],"parameters":[],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"put_ai_settings","summary":"Change tenant AI controls (Enterprise tier)","tags":["F1 AI Director"],"parameters":[],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/agents":{"get":{"operationId":"get_agents","summary":"AI agents (service identities with their own scopes)","tags":["F23 Agents"],"parameters":[],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_agents","summary":"Register an AI agent (an api_clients row of kind agent)","tags":["F23 Agents"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/agents/{id}":{"patch":{"operationId":"patch_agents_id","summary":"Change an agent’s scopes or switch it off","tags":["F23 Agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_agents_id","summary":"Retire an agent (its tokens stop working)","tags":["F23 Agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/documents/{vid}/translate":{"post":{"operationId":"post_documents_vid_translate","summary":"AI translation into a new version (reference only until a reviewer approves)","tags":["F19 Multilingual"],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/documents/{vid}/translation-review":{"post":{"operationId":"post_documents_vid_translation_review","summary":"Approve or reject a translation (reviewer with that language and contracts.translation.review)","tags":["F19 Multilingual"],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.translation.review"]},{"session":[]}],"x-required-scope":"contracts.translation.review","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/documents/{vid}/translation-status":{"get":{"operationId":"get_documents_vid_translation_status","summary":"Review state of a translated version","tags":["F19 Multilingual"],"parameters":[{"name":"vid","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/governing-language":{"get":{"operationId":"get_contracts_id_governing_language","summary":"Governing-language clause check","tags":["F19 Multilingual"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/i18n/formats":{"get":{"operationId":"get_i18n_formats","summary":"Regional date, currency and number formats from the workspace locale","tags":["F19 Multilingual"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/i18n/locale":{"put":{"operationId":"put_i18n_locale","summary":"Set the workspace locale (dates and currency formats)","tags":["F19 Multilingual"],"parameters":[],"security":[{"oauth2":["contracts.settings.admin"]},{"session":[]}],"x-required-scope":"contracts.settings.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/glossary":{"get":{"operationId":"get_glossary","summary":"Approved terminology glossary","tags":["F19 Multilingual"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_glossary","summary":"Add an approved term","tags":["F19 Multilingual"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/glossary/{id}":{"put":{"operationId":"put_glossary_id","summary":"Change an approved term","tags":["F19 Multilingual"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_glossary_id","summary":"Retire an approved term","tags":["F19 Multilingual"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.clause.admin"]},{"session":[]}],"x-required-scope":"contracts.clause.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/collab/{docId}/ticket":{"post":{"operationId":"post_collab_docId_ticket","summary":"A 60-second ticket for the collaboration room WebSocket (people: negotiation.participate; outside parties: negotiate guest session)","tags":["F5 Negotiation"],"parameters":[{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/documents/{docId}/snapshot":{"post":{"operationId":"post_documents_docId_snapshot","summary":"Save the collaborative room as a new immutable version (authors recorded)","tags":["F5 Negotiation"],"parameters":[{"name":"docId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/documents/{docId}/room":{"get":{"operationId":"get_documents_docId_room","summary":"Room state: connections, unsaved changes, contributors since the last save","tags":["F5 Negotiation"],"parameters":[{"name":"docId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/share-external":{"post":{"operationId":"post_contracts_id_share_external","summary":"Share the negotiation room with an outside party (single-use guest link)","tags":["F5 Negotiation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/shares":{"get":{"operationId":"get_contracts_id_shares","summary":"Outside parties this room is shared with","tags":["F5 Negotiation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/shares/{shareId}":{"delete":{"operationId":"delete_contracts_id_shares_shareId","summary":"Withdraw an outside party’s access","tags":["F5 Negotiation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/threads":{"get":{"operationId":"get_threads","summary":"Comment threads (channel=internal|external; outside parties: external only)","tags":["F5 Negotiation"],"parameters":[],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_threads","summary":"Add a comment or reply (internal or external channel)","tags":["F5 Negotiation"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/threads/{commentId}":{"patch":{"operationId":"patch_threads_commentId","summary":"Edit (author) or resolve a comment","tags":["F5 Negotiation"],"parameters":[{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_threads_commentId","summary":"Delete your comment","tags":["F5 Negotiation"],"parameters":[{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/suggestions":{"get":{"operationId":"get_contracts_id_suggestions","summary":"Redlines and suggestions, per author","tags":["F5 Negotiation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_contracts_id_suggestions","summary":"Suggest a change (redline) — tracked per author, accepted only by a person with edit rights","tags":["F5 Negotiation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/suggestions/{sid}/accept":{"post":{"operationId":"post_suggestions_sid_accept","summary":"Accept a suggestion (new document version)","tags":["F5 Negotiation"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/suggestions/{sid}/reject":{"post":{"operationId":"post_suggestions_sid_reject","summary":"Reject a suggestion","tags":["F5 Negotiation"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.document.edit"]},{"session":[]}],"x-required-scope":"contracts.document.edit","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/suggestions/{sid}/withdraw":{"post":{"operationId":"post_suggestions_sid_withdraw","summary":"Withdraw your suggestion","tags":["F5 Negotiation"],"parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.negotiation.participate"]},{"session":[]}],"x-required-scope":"contracts.negotiation.participate","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/search":{"post":{"operationId":"post_search","summary":"Search contracts you may open: keyword | filter | semantic | answer; filters on standard and cf.* fields; every result cites document and clause","tags":["F14 Search"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"get_search","summary":"Search by query string (q, mode, filters as params); format=csv exports","tags":["F14 Search"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/search/reindex":{"post":{"operationId":"post_search_reindex","summary":"Rebuild this workspace search index","tags":["F14 Search"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.settings.admin"]},{"session":[]}],"x-required-scope":"contracts.settings.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/saved-searches":{"get":{"operationId":"get_saved_searches","summary":"GET /saved-searches","tags":["General"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_saved_searches","summary":"Save a search (yours only)","tags":["F14 Search"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/saved-searches/{id}":{"get":{"operationId":"get_saved_searches_id","summary":"GET /saved-searches/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"patch_saved_searches_id","summary":"PATCH /saved-searches/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_saved_searches_id","summary":"DELETE /saved-searches/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/saved-searches/{id}/run":{"get":{"operationId":"get_saved_searches_id_run","summary":"Run a saved search with your current permissions (format=csv exports)","tags":["F14 Search"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/obligations":{"get":{"operationId":"get_obligations","summary":"Obligations on contracts you may open (filters: contract_id, status, owner=me, owner_id, type, from, to; format=csv)","tags":["F12 Obligations"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_obligations","summary":"Add an obligation (owner, party responsible, type, due date, recurrence, evidence rule)","tags":["F12 Obligations"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.obligation.manage"]},{"session":[]}],"x-required-scope":"contracts.obligation.manage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/obligations/{id}":{"get":{"operationId":"get_obligations_id","summary":"One obligation with the outcome history of its series","tags":["F12 Obligations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"patch_obligations_id","summary":"Change an open obligation","tags":["F12 Obligations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.obligation.manage"]},{"session":[]}],"x-required-scope":"contracts.obligation.manage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_obligations_id","summary":"Cancel an open obligation (kept on record)","tags":["F12 Obligations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.obligation.manage"]},{"session":[]}],"x-required-scope":"contracts.obligation.manage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/obligations/{id}/complete":{"post":{"operationId":"post_obligations_id_complete","summary":"Complete an obligation (evidence where configured); recurrence creates the next one","tags":["F12 Obligations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.obligation.manage"]},{"session":[]}],"x-required-scope":"contracts.obligation.manage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/obligations-performance":{"get":{"operationId":"get_obligations_performance","summary":"Outcome history by responsible party (F26 base: on time, late, missed)","tags":["F12 Obligations"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/renewals":{"get":{"operationId":"get_renewals","summary":"Renewals whose notice deadline falls within the window (e.g. ?window=90d); deadline = expiry − notice period","tags":["F13 Renewals"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/renewal-decision":{"post":{"operationId":"post_contracts_id_renewal_decision","summary":"Decide renew | terminate | renegotiate — routed for approval through the Authority Service","tags":["F13 Renewals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.renewal.manage"]},{"session":[]}],"x-required-scope":"contracts.renewal.manage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/renewal-decisions":{"get":{"operationId":"get_contracts_id_renewal_decisions","summary":"GET /contracts/{id}/renewal-decisions","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/calendar/token":{"post":{"operationId":"post_calendar_token","summary":"Issue your personal calendar-feed link (replaces any earlier one)","tags":["F13 Renewals"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/risk/portfolio":{"get":{"operationId":"get_risk_portfolio","summary":"Risk across contracts you may open: bands, scores, top categories, category × severity heatmap","tags":["F15 Risk"],"parameters":[],"security":[{"oauth2":["contracts.risk.read"]},{"session":[]}],"x-required-scope":"contracts.risk.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/risk/exceptions":{"get":{"operationId":"get_risk_exceptions","summary":"Exception queue: unvalidated AI flags and open high/critical policy findings","tags":["F15 Risk"],"parameters":[],"security":[{"oauth2":["contracts.risk.read"]},{"session":[]}],"x-required-scope":"contracts.risk.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/risk":{"get":{"operationId":"get_contracts_id_risk","summary":"Risk score, breakdown and current flags of one contract (all=1 includes resolved findings)","tags":["F15 Risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.risk.read"]},{"session":[]}],"x-required-scope":"contracts.risk.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/risk/assess":{"post":{"operationId":"post_contracts_id_risk_assess","summary":"Re-run the deterministic policy checks now","tags":["F15 Risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.risk.read"]},{"session":[]}],"x-required-scope":"contracts.risk.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/risk/ai-review":{"post":{"operationId":"post_contracts_id_risk_ai_review","summary":"Ask AI for risks (stored Unvalidated until a risk admin confirms or dismisses each)","tags":["F15 Risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.ai.use"]},{"session":[]}],"x-required-scope":"contracts.ai.use","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/risk/{id}/validate":{"post":{"operationId":"post_risk_id_validate","summary":"Confirm or dismiss a risk flag (named risk admins only); the score is recomputed","tags":["F15 Risk"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.risk.admin"]},{"session":[]}],"x-required-scope":"contracts.risk.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/policies":{"get":{"operationId":"get_policies","summary":"Risk policies in force (built-in defaults until the workspace sets its own)","tags":["F15 Risk"],"parameters":[],"security":[{"oauth2":["contracts.risk.read"]},{"session":[]}],"x-required-scope":"contracts.risk.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_policies","summary":"Add a risk policy (required clause, prohibited term, value threshold)","tags":["F15 Risk"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.risk.admin"]},{"session":[]}],"x-required-scope":"contracts.risk.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/policies/install-defaults":{"post":{"operationId":"post_policies_install_defaults","summary":"Copy the built-in policies into the workspace so they can be edited","tags":["F15 Risk"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.risk.admin"]},{"session":[]}],"x-required-scope":"contracts.risk.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/policies/{id}":{"get":{"operationId":"get_policies_id","summary":"GET /policies/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.risk.read"]},{"session":[]}],"x-required-scope":"contracts.risk.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"patch_policies_id","summary":"PATCH /policies/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.risk.admin"]},{"session":[]}],"x-required-scope":"contracts.risk.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_policies_id","summary":"DELETE /policies/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.risk.admin"]},{"session":[]}],"x-required-scope":"contracts.risk.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/reports":{"get":{"operationId":"get_reports","summary":"Report types and group-by keys","tags":["F18 Analytics"],"parameters":[],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/reports/{type}":{"get":{"operationId":"get_reports_type","summary":"Run a report (value | renewal_exposure | cycle_time | obligation_completion | signing_turnaround), group_by any standard or cf.<key> field; read-filtered; format=csv","tags":["F18 Analytics"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/dashboards":{"get":{"operationId":"get_dashboards","summary":"GET /dashboards","tags":["General"],"parameters":[],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_dashboards","summary":"Save a dashboard layout (shared dashboards still show each viewer only what they may open)","tags":["F18 Analytics"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/dashboards/{id}":{"get":{"operationId":"get_dashboards_id","summary":"A dashboard (data=1 runs every widget with your permissions)","tags":["F18 Analytics"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"patch_dashboards_id","summary":"PATCH /dashboards/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_dashboards_id","summary":"DELETE /dashboards/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/reports/schedule":{"post":{"operationId":"post_reports_schedule","summary":"Schedule a report email (daily or weekly; flag scheduled_reports; Enterprise)","tags":["F18 Analytics"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/reports/schedules":{"get":{"operationId":"get_reports_schedules","summary":"GET /reports/schedules","tags":["General"],"parameters":[],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/reports/schedules/{id}":{"delete":{"operationId":"delete_reports_schedules_id","summary":"DELETE /reports/schedules/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/graph/analytics":{"get":{"operationId":"get_graph_analytics","summary":"Portfolio graph analytics: edge counts by type, most-connected contracts (both ends readable)","tags":["F18 Analytics"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/analytics/insights":{"post":{"operationId":"post_analytics_insights","summary":"AI insights on your portfolio metrics (flag ai; each tied to a metric; not legal advice)","tags":["F18 Analytics"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workflows":{"get":{"operationId":"get_workflows","summary":"List workflows (with the executor in use)","tags":["F2 Workflows"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_workflows","summary":"Create a workflow (draft definition)","tags":["F2 Workflows"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workflows/{id}":{"get":{"operationId":"get_workflows_id","summary":"One workflow with its published versions","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"put_workflows_id","summary":"Save the draft definition","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_workflows_id","summary":"Archive a workflow","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/workflows/{id}/validate":{"post":{"operationId":"post_workflows_id_validate","summary":"Check a definition against the policy rules (no cycles, no unreachable steps, valid fields, no owner self-approval …)","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workflows/{id}/simulate":{"post":{"operationId":"post_workflows_id_simulate","summary":"Simulate a definition against a sample contract (writes nothing; Enterprise tier)","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workflows/{id}/publish":{"post":{"operationId":"post_workflows_id_publish","summary":"Publish the draft as a new immutable version (blocked unless policy validation passes)","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/workflow-runs":{"post":{"operationId":"post_contracts_id_workflow_runs","summary":"Start a published workflow on a draft contract","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"get_contracts_id_workflow_runs","summary":"Workflow runs of a contract","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/workflow-runs/{id}":{"get":{"operationId":"get_workflow_runs_id","summary":"One run with its append-only event history","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/workflow-runs/{id}/cancel":{"post":{"operationId":"post_workflow_runs_id_cancel","summary":"Cancel a running workflow (pending approvals are withdrawn; the contract returns to Draft)","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/workflow-tasks":{"get":{"operationId":"get_workflow_tasks","summary":"Open workflow tasks (mine=1: assigned to you)","tags":["F2 Workflows"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/workflow-tasks/{id}/complete":{"post":{"operationId":"post_workflow_tasks_id_complete","summary":"Complete a workflow task","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/intake/{id}":{"get":{"operationId":"get_intake_id","summary":"Legal intake form (F24 roadmap extension point): fields from F29","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/intake/{id}/submit":{"post":{"operationId":"post_intake_id_submit","summary":"Submit a legal intake form: creates the contract and starts the workflow","tags":["F2 Workflows"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.create"]},{"session":[]}],"x-required-scope":"contracts.record.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/openapi.json":{"get":{"operationId":"get_openapi_json","summary":"This OpenAPI 3.1 document","tags":["F10 Platform API"],"parameters":[],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/api-clients":{"get":{"operationId":"get_api_clients","summary":"List API clients","tags":["F10 Platform API"],"parameters":[],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_api_clients","summary":"Create an API client (sandbox, or production with the api_production flag); the secret is shown once","tags":["F10 Platform API"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/api-clients/{id}":{"patch":{"operationId":"patch_api_clients_id","summary":"Change scopes, name or rate limits of a client","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_api_clients_id","summary":"Revoke an API client","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/api-clients/{id}/rotate-secret":{"post":{"operationId":"post_api_clients_id_rotate_secret","summary":"Rotate a client secret (shown once)","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/webhooks":{"get":{"operationId":"get_webhooks","summary":"List webhook endpoints","tags":["F10 Platform API"],"parameters":[],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_webhooks","summary":"Add a webhook endpoint (signing secret shown once)","tags":["F10 Platform API"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/webhooks/{id}":{"patch":{"operationId":"patch_webhooks_id","summary":"Change or switch off a webhook endpoint","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_webhooks_id","summary":"Remove a webhook endpoint (switched off; delivery history is kept)","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/webhooks/{id}/deliveries":{"get":{"operationId":"get_webhooks_id_deliveries","summary":"Deliveries of an endpoint (status=dead: the dead-letter list)","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/webhook-deliveries":{"get":{"operationId":"get_webhook_deliveries","summary":"Dead-letter queue across endpoints (status=dead by default)","tags":["F10 Platform API"],"parameters":[],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/webhook-deliveries/{id}/redeliver":{"post":{"operationId":"post_webhook_deliveries_id_redeliver","summary":"Redeliver a dead-lettered (or delivered) event","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/webhooks/{id}/test":{"post":{"operationId":"post_webhooks_id_test","summary":"Send a signed test event","tags":["F10 Platform API"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.developer.admin"]},{"session":[]}],"x-required-scope":"contracts.developer.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/catalog":{"get":{"operationId":"get_catalog","summary":"Product catalog","tags":["F16 Proposals"],"parameters":[],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_catalog","summary":"Add a catalog product (unit price in cents)","tags":["F16 Proposals"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/catalog/{id}":{"patch":{"operationId":"patch_catalog_id","summary":"Change a catalog product (price changes apply to new and edited proposals only)","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_catalog_id","summary":"Retire a catalog product","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/proposals":{"get":{"operationId":"get_proposals","summary":"Proposals","tags":["F16 Proposals"],"parameters":[],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_proposals","summary":"Create a proposal (line items priced from the catalog)","tags":["F16 Proposals"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/proposals/{id}":{"get":{"operationId":"get_proposals_id","summary":"One proposal with its lines","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"patch_proposals_id","summary":"Change a draft proposal","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/proposals/{id}/submit":{"post":{"operationId":"post_proposals_id_submit","summary":"Submit: ready to send, or asks the Authority Service when the discount is above the threshold","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/proposals/{id}/send":{"post":{"operationId":"post_proposals_id_send","summary":"Mark sent (emails the customer when an email is given)","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/proposals/{id}/accept":{"post":{"operationId":"post_proposals_id_accept","summary":"Record the customer's acceptance (refused after expiry)","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/proposals/{id}/convert":{"post":{"operationId":"post_proposals_id_convert","summary":"Convert an accepted proposal into a Contract with a pricing schedule","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/proposals/{id}/withdraw":{"post":{"operationId":"post_proposals_id_withdraw","summary":"Withdraw a proposal","tags":["F16 Proposals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.proposal.create"]},{"session":[]}],"x-required-scope":"contracts.proposal.create","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/settings/proposals":{"put":{"operationId":"put_settings_proposals","summary":"Set the discount threshold above which a proposal needs approval","tags":["F16 Proposals"],"parameters":[],"security":[{"oauth2":["contracts.settings.admin"]},{"session":[]}],"x-required-scope":"contracts.settings.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/imports":{"post":{"operationId":"post_imports","summary":"Create an import batch (up to 10,000 documents; Business plan 5,000); documents may be added inline (≤ 200)","tags":["F17 Migration"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"get":{"operationId":"get_imports","summary":"Import batches","tags":["F17 Migration"],"parameters":[],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/imports/{id}/documents":{"post":{"operationId":"post_imports_id_documents","summary":"Add documents to an open batch (multipart files or JSON, ≤ 200 per request)","tags":["F17 Migration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/imports/{id}/start":{"post":{"operationId":"post_imports_id_start","summary":"Start processing: the batch is split into chunks on the event bus","tags":["F17 Migration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/imports/{id}":{"get":{"operationId":"get_imports_id","summary":"Progress of a batch (counts per status)","tags":["F17 Migration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/imports/{id}/items":{"get":{"operationId":"get_imports_id_items","summary":"Files of a batch (filter by status; cursor = after)","tags":["F17 Migration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/import-review":{"get":{"operationId":"get_import_review","summary":"The human review queue (low-confidence fields, near-duplicates, scanned files)","tags":["F17 Migration"],"parameters":[],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/import-items/{id}/approve":{"post":{"operationId":"post_import_items_id_approve","summary":"Approve a reviewed file (with corrected fields): creates the Contract and its document version","tags":["F17 Migration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/import-items/{id}/reject":{"post":{"operationId":"post_import_items_id_reject","summary":"Reject a file in the review queue (its staged copy is deleted)","tags":["F17 Migration"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.migration.admin"]},{"session":[]}],"x-required-scope":"contracts.migration.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/automation/recipes":{"get":{"operationId":"get_automation_recipes","summary":"Automation recipes, triggers and the actions your plan allows","tags":["F20 Automation"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_automation_recipes","summary":"Create a recipe (event → request to another BAPC app, or an export file)","tags":["F20 Automation"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/automation/recipes/{id}":{"patch":{"operationId":"patch_automation_recipes_id","summary":"Switch a recipe on or off","tags":["F20 Automation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}},"delete":{"operationId":"delete_automation_recipes_id","summary":"Remove (switch off) a recipe","tags":["F20 Automation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.workflow.admin"]},{"session":[]}],"x-required-scope":"contracts.workflow.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/automation/requests":{"get":{"operationId":"get_automation_requests","summary":"Requests sent to other BAPC apps (and export files)","tags":["F20 Automation"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/automation/requests/{id}/file":{"get":{"operationId":"get_automation_requests_id_file","summary":"Download an accounting export (CSV)","tags":["F20 Automation"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/settings/operations":{"get":{"operationId":"get_settings_operations","summary":"Workspace settings owned by operations (AI controls, theme and domain, retention, privacy)","tags":["Settings"],"parameters":[],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/settings/ai":{"put":{"operationId":"put_settings_ai","summary":"AI controls: switch AI off entirely, per feature or per contract type (Enterprise)","tags":["Settings"],"parameters":[],"security":[{"oauth2":["contracts.ai.admin"]},{"session":[]}],"x-required-scope":"contracts.ai.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/settings/theme":{"put":{"operationId":"put_settings_theme","summary":"F27 extension point: brand name, theme tokens and custom domain mapping (white_label flag)","tags":["Settings"],"parameters":[],"security":[{"oauth2":["contracts.settings.admin"]},{"session":[]}],"x-required-scope":"contracts.settings.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/settings/privacy":{"put":{"operationId":"put_settings_privacy","summary":"F21 privacy setting: track external viewers (off by default)","tags":["Settings"],"parameters":[],"security":[{"oauth2":["contracts.settings.admin"]},{"session":[]}],"x-required-scope":"contracts.settings.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/settings/retention":{"put":{"operationId":"put_settings_retention","summary":"Default retention (years after the end of the contract; default 7)","tags":["Retention"],"parameters":[],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/engagement/events":{"post":{"operationId":"post_engagement_events","summary":"F21 extension point: record a view or interaction (external viewers only when the workspace allows)","tags":["F21 Engagement"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/engagement/summary":{"get":{"operationId":"get_engagement_summary","summary":"F21: engagement counts","tags":["F21 Engagement"],"parameters":[],"security":[{"oauth2":["contracts.analytics.read"]},{"session":[]}],"x-required-scope":"contracts.analytics.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/retention/policies":{"get":{"operationId":"get_retention_policies","summary":"Retention policies by contract type","tags":["Retention"],"parameters":[],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"post_retention_policies","summary":"Set the retention for a contract type (years after the end of the contract)","tags":["Retention"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/retention/policies/{id}":{"delete":{"operationId":"delete_retention_policies_id","summary":"DELETE /retention/policies/{id}","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/retention":{"get":{"operationId":"get_contracts_id_retention","summary":"When this contract’s documents may be destroyed, and any legal hold","tags":["Retention"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/contracts/{id}/legal-holds":{"post":{"operationId":"post_contracts_id_legal_holds","summary":"Place a legal hold (overrides deletion; audited)","tags":["Retention"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/legal-holds/{id}/release":{"post":{"operationId":"post_legal_holds_id_release","summary":"Release a legal hold (audited)","tags":["Retention"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/legal-holds":{"get":{"operationId":"get_legal_holds","summary":"Legal holds","tags":["Retention"],"parameters":[],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/retention/run":{"post":{"operationId":"post_retention_run","summary":"Run the retention purge for this workspace now (also runs daily)","tags":["Retention"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/retention/certificates":{"get":{"operationId":"get_retention_certificates","summary":"Certificates of destruction","tags":["Retention"],"parameters":[],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/retention/certificates/{id}":{"get":{"operationId":"get_retention_certificates_id","summary":"One certificate of destruction (signed with the platform evidence key)","tags":["Retention"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.retention.admin"]},{"session":[]}],"x-required-scope":"contracts.retention.admin","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/flags":{"get":{"operationId":"get_flags","summary":"GET /flags","tags":["General"],"parameters":[],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/flags/{flag}":{"post":{"operationId":"post_flags_flag","summary":"POST /flags/{flag}","tags":["General"],"parameters":[{"name":"flag","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (e.g. a UUID). The first answer is replayed for 24 hours for the same key; a different body with the same key answers 422.","schema":{"type":"string","maxLength":200}}],"security":[{"oauth2":[]},{"session":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/contracts/{id}/attrs":{"get":{"operationId":"get_contracts_id_attrs","summary":"GET /contracts/{id}/attrs","tags":["General"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":["contracts.record.read"]},{"session":[]}],"x-required-scope":"contracts.record.read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/api/v1/oauth/token","scopes":{"contracts.admin.users":"admin users","contracts.ai.admin":"ai admin","contracts.ai.use":"ai use","contracts.analytics.read":"analytics read","contracts.approval.decide":"approval decide","contracts.clause.admin":"clause admin","contracts.clickwrap.admin":"clickwrap admin","contracts.developer.admin":"developer admin","contracts.document.edit":"document edit","contracts.evidence.read":"evidence read","contracts.migration.admin":"migration admin","contracts.negotiation.participate":"negotiation participate","contracts.obligation.manage":"obligation manage","contracts.proposal.create":"proposal create","contracts.record.create":"record create","contracts.record.read":"record read","contracts.renewal.manage":"renewal manage","contracts.retention.admin":"retention admin","contracts.risk.admin":"risk admin","contracts.risk.read":"risk read","contracts.schema.admin":"schema admin","contracts.settings.admin":"settings admin","contracts.signature.admin":"signature admin","contracts.signature.send":"signature send","contracts.translation.review":"translation review","contracts.workflow.admin":"workflow admin"}}}},"session":{"type":"apiKey","in":"cookie","name":"ctr_session","description":"Sign in with BAPC browser session (same-origin requests only)."}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"trace_id":{"type":"string"}},"required":["code","message"]}}}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"webhooks":{"event":{"post":{"summary":"A domain event (contract.status_changed, envelope.completed, …), at-least-once, HMAC-signed","parameters":[{"name":"BAPC-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>"},{"name":"BAPC-Event-Id","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string"},"type":{"type":"string"},"occurred_at":{"type":"string"},"contract_id":{"type":["string","null"]},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery"}}}}}}