Make a contract in one call
generate_contractMake a finished contract in one call: give the contract type, your side's details and, if you know them, the other side's. Clauses you leave out take the standard option. One prepaid credit is spent (the same price as any contract); with no credit the answer is HTTP 402 with code PAYMENT_REQUIRED and nothing is created. Returns the contract as Markdown, then the deal id, the link where the person can read it in Dealroom and the Markdown, HTML, PDF, DOCX and TXT links (free to fetch again).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | DPA and BAA only: the role you take (see roles in list_contract_types) | |
| party | Yes | Your side (the side the API key acts for) | |
| terms | No | Inputs by id (see inputs in list_contract_types). Send every required input in terms. A required input with a default can be left out: the default is applied. | |
| title | No | Name of the deal; made from the parties when left out | |
| inline | No | The contract itself in the answer: md (Markdown, the default here), html or txt | md |
| clauses | No | Optional clause choices: clause id to option code (see get_template) | |
| language | No | en | |
| contractType | Yes | Code (for example NDA) or guide slug (for example nda), from list_contract_types | |
| counterparty | No | The other side. Left out: its block stays blank for it to complete. | |
| governingLaw | No | Required when the contract type offers more than one | |
| idempotencyKey | No | Send the same value when retrying, so a retry never makes or charges a second contract |