# Dealroom for developers

Make a contract in one call from your code or your AI agent, through the API or MCP, and read it in Dealroom.

Source: https://dealroom.todo.law/developers

## On this page

- [Three steps](#steps)
- [The one call](#one-call)
- [MCP](#mcp)
- [REST API](#rest)
- [Contract types](#contract-types)
- [Formats](#formats)
- [Price](#pricing)
- [For machines](#machines)

<a id="steps"></a>

## Three steps

1. **Get an API key.** Sign in, open Settings, API keys and choose Create key. Copy the key: it starts with drk_ and is shown once. [Open Settings, API keys](https://dealroom.todo.law/settings/api-keys)
2. **Buy credits.** On the same page, choose Buy credits. Each contract made through the API or MCP spends one credit.
3. **Make the call.** Send the contract type and your details. The answer holds the contract and the links to read and download it.

<a id="one-call"></a>

## The one call

With curl. Replace drk_YOUR_KEY with your key.

### Request

```sh
curl -X POST https://dealroom.todo.law/api/v1/agent/contracts \
  -H "Authorization: Bearer drk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "contractType": "NDA",
    "governingLaw": "CALIFORNIA",
    "language": "en",
    "party": {
      "legalName": "Your Company, Inc.",
      "signatoryName": "Alex Smith",
      "signatoryTitle": "CEO",
      "email": "alex@yourcompany.example"
    },
    "counterparty": {
      "legalName": "Other Company, LLC"
    },
    "inline": "md"
  }'
```

### Fields

- `contractType`: Required. The code (NDA) or the address of the contract's guide (nda). See Contract types below.
- `party`: Required. Your side: legalName (required), address, taxId, signatoryName, signatoryTitle, email.
- `counterparty`: The other side, same fields. Left out, its block stays blank for them to complete.
- `governingLaw`: CALIFORNIA, NEW_YORK, ENGLAND_WALES or SPAIN. Needed only when the contract is offered under more than one.
- `language`: en or es, where the contract is offered in both. Default en.
- `terms`: Facts the contract asks for, by input id, such as a city or an amount. Inputs left out take their default.
- `clauses`: Optional clause choices: clause id to option code. Clauses left out take the standard option.
- `role`: DPA and BAA only: the role you take, such as PROCESSOR or CONTROLLER.
- `inline`: md, html or txt: the contract itself in the answer. Through MCP the default is md.
- `title`: A name for the deal. Made from the parties when left out.

### Answer

```json
{
  "dealId": "cm9abc123",
  "dealRoomId": "cm9def456",
  "status": "AGREED",
  "contractType": "NDA",
  "governingLaw": "CALIFORNIA",
  "language": "en",
  "paid": "credit",
  "dealUrl": "https://dealroom.todo.law/deals/cm9def456",
  "documents": {
    "pdf": "https://dealroom.todo.law/api/v1/agent/deals/cm9abc123/document",
    "docx": "https://dealroom.todo.law/api/v1/agent/deals/cm9abc123/document/docx",
    "txt": "https://dealroom.todo.law/api/v1/agent/deals/cm9abc123/document/txt",
    "md": "https://dealroom.todo.law/api/v1/agent/deals/cm9abc123/document/md",
    "html": "https://dealroom.todo.law/api/v1/agent/deals/cm9abc123/document/html"
  },
  "guide": "https://dealroom.todo.law/contracts/nda",
  "document": {
    "format": "md",
    "content": "# Mutual Non-Disclosure Agreement\n\n## Parties\n..."
  }
}
```

### Good to know

- With no credit left, the answer is HTTP 402 and nothing is created.
- When you retry, send the same Idempotency-Key header: the retry returns the first answer and is not charged again.
- Every format of a paid contract can be downloaded again for free.
- The dealUrl link opens for the person whose e-mail owns the API key, once signed in.

<a id="mcp"></a>

## Connect an AI agent through MCP

The MCP server address. Your key goes in the Authorization header.

```
https://dealroom.todo.law/api/v1/agent/mcp
```

### Setup by client

#### Claude Code

Run this in a terminal.

```sh
claude mcp add --transport http dealroom https://dealroom.todo.law/api/v1/agent/mcp \
  --header "Authorization: Bearer drk_YOUR_KEY"
```

#### Claude Desktop

Claude Desktop reaches remote servers through the mcp-remote bridge, which needs Node.js. Add this to claude_desktop_config.json and restart Claude Desktop.

```json
{
  "mcpServers": {
    "dealroom": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://dealroom.todo.law/api/v1/agent/mcp",
        "--header",
        "Authorization:${DEALROOM_AUTH}"
      ],
      "env": {
        "DEALROOM_AUTH": "Bearer drk_YOUR_KEY"
      }
    }
  }
}
```

#### Cursor

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project.

```json
{
  "mcpServers": {
    "dealroom": {
      "url": "https://dealroom.todo.law/api/v1/agent/mcp",
      "headers": {
        "Authorization": "Bearer drk_YOUR_KEY"
      }
    }
  }
}
```

#### VS Code

Add this to .vscode/mcp.json. VS Code asks for the key the first time and keeps it.

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "dealroom-key",
      "description": "Dealroom API key",
      "password": true
    }
  ],
  "servers": {
    "dealroom": {
      "type": "http",
      "url": "https://dealroom.todo.law/api/v1/agent/mcp",
      "headers": {
        "Authorization": "Bearer ${input:dealroom-key}"
      }
    }
  }
}
```

#### Other clients

Most MCP clients accept this shape.

```json
{
  "mcpServers": {
    "dealroom": {
      "type": "http",
      "url": "https://dealroom.todo.law/api/v1/agent/mcp",
      "headers": {
        "Authorization": "Bearer drk_YOUR_KEY"
      }
    }
  }
}
```

### Tools

- `list_contract_types`: Every contract type and the facts it needs. No key needed.
- `generate_contract`: Make a contract in one call. Returns it as Markdown, with the links.
- `download_contract`: One contract as Markdown, HTML, PDF, DOCX or TXT.
- `get_deal`: A deal's clauses and status.
- `buy_credits`: A payment link for a pack of credits, for a person to open.
- `get_credit_balance`: Credits left on the account.
- `list_templates, get_template`: Clauses and options of each contract.
- `create_playbook, initiate_negotiation, join_negotiation`: Negotiate a contract between two agents.

<a id="rest"></a>

## REST API

Any language that can send HTTP requests works. All paths start with https://dealroom.todo.law.

| Method | Path | What it does | Key |
| --- | --- | --- | --- |
| GET | `/api/v1/agent/contract-types` | Contract types and the facts each needs | No |
| POST | `/api/v1/agent/contracts` | Make a contract in one call | Yes |
| GET | `/api/v1/agent/deals/{dealId}/document/md` | The contract as Markdown (also /html, /txt, /docx; PDF without suffix) | Yes |
| GET | `/api/v1/agent/deals/{dealId}` | A deal's clauses and status | Yes |
| GET | `/api/v1/agent/credits/balance` | Credits left | Yes |
| POST | `/api/v1/agent/credits/checkout` | A payment link for a pack of credits | Yes |
| GET | `/api/v1/agent/templates/{code}` | Clauses and options of one contract | Yes |
| POST | `/api/v1/agent/negotiate` | Start a negotiation between two agents | Yes |
| POST | `/api/v1/agent/mcp` | The MCP server | Yes |

### Example

```sh
curl https://dealroom.todo.law/api/v1/agent/contract-types

curl -X POST https://dealroom.todo.law/api/v1/agent/contracts \
  -H "Authorization: Bearer drk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "contractType": "NDA",
    "governingLaw": "CALIFORNIA",
    "language": "en",
    "party": {
      "legalName": "Your Company, Inc.",
      "signatoryName": "Alex Smith",
      "signatoryTitle": "CEO",
      "email": "alex@yourcompany.example"
    },
    "counterparty": {
      "legalName": "Other Company, LLC"
    },
    "inline": "md"
  }'
```

[Read the full agent API guide](https://dealroom.todo.law/docs/agent-api)

<a id="contract-types"></a>

## Contract types

Every contract the one call can make, grouped as in the contract guides. Send the code as contractType. Inputs marked with a default can be left out.

### Commercial and technology

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Joint Venture Agreement](https://dealroom.todo.law/contracts/joint-venture-agreement) | `JOINT_VENTURE` | California, England and Wales, Spain | English, Spanish | `jv-name`, `jv-purpose` |
| [Master Services Agreement](https://dealroom.todo.law/contracts/master-services-agreement) | `MSA` | California, England and Wales, Spain | English, Spanish | None |
| [Non-Disclosure Agreement](https://dealroom.todo.law/contracts/nda) | `NDA` | California, England and Wales, Spain | English, Spanish | `dispute-forum-city (only under Spain; default Madrid)` |
| [SaaS Subscription Agreement](https://dealroom.todo.law/contracts/saas-agreement) | `SAAS` | California, England and Wales, Spain | English, Spanish | None |
| [Software Development Agreement](https://dealroom.todo.law/contracts/software-development-agreement) | `SOFTWARE_DEVELOPMENT` | California, England and Wales, Spain | English, Spanish | `project-name`, `project-description` |
| [Technology License Agreement](https://dealroom.todo.law/contracts/technology-license-agreement) | `TECHNOLOGY_LICENSE` | California, England and Wales, Spain | English, Spanish | `technology-description` |

### Data protection and privacy

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Data Licensing Agreement](https://dealroom.todo.law/contracts/data-licensing-agreement) | `DATA_LICENSING` | California, England and Wales, Spain | English, Spanish | `data-categories`, `license-fee`, `license-term (default 12)` |
| [Data Processing Agreement](https://dealroom.todo.law/contracts/data-processing-agreement) | `DPA` | California, England and Wales, Spain | English, Spanish | `processing-purpose`, `data-categories`, `processor-establishment (default EEA)` |
| [HIPAA Business Associate Agreement Negotiator](https://dealroom.todo.law/contracts/business-associate-agreement) | `BAA_NEGOTIATOR` | California | English | None |
| [Privacy Notice](https://dealroom.todo.law/contracts/privacy-notice) | `PRIVACY_NOTICE` | California, England and Wales, Spain | English, Spanish | `jurisdictions`, `company-name`, `company-website`, `dpo-email`, `effective-date` |

### Team and services

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Advisory Agreement](https://dealroom.todo.law/contracts/advisory-agreement) | `ADVISORY` | California, England and Wales, Spain | English, Spanish | `advisor-name` |
| [Consulting Agreement](https://dealroom.todo.law/contracts/consulting-agreement) | `CONSULTING` | California, England and Wales | English, Spanish | `service-description`, `hourly-rate`, `rate-currency (default USD)` |
| [Employment Agreement](https://dealroom.todo.law/contracts/employment-agreement) | `EMPLOYMENT` | California, England and Wales | English, Spanish | `start-date`, `base-salary`, `salary-currency (default USD)` |
| [Employment Contract (Contrato Laboral)](https://dealroom.todo.law/contracts/employment-contract-spain) | `CONTRATO_LABORAL` | Spain | Spanish, English | `convenio-colectivo`, `salario-bruto-anual`, `puesto-grupo-profesional`, `centro-trabajo` |
| [IP Assignment (Cesión de PI)](https://dealroom.todo.law/contracts/ip-assignment-spain) | `CESION_PI` | Spain | Spanish, English | None |
| [IP Assignment Agreement](https://dealroom.todo.law/contracts/ip-assignment-agreement) | `IP_ASSIGNMENT` | California, England and Wales, Spain | English, Spanish | `subject-matter`, `assignment-fee` |
| [Service Agreement (Contrato de Servicios)](https://dealroom.todo.law/contracts/services-agreement-spain) | `CONTRATO_SERVICIOS` | Spain | Spanish, English | `objeto-entregables`, `honorarios`, `plazo-pago-dias (default 30)` |

### Startups and investment

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Certificate of Incorporation (Delaware C-Corp)](https://dealroom.todo.law/contracts/delaware-certificate-of-incorporation) | `DELAWARE_CERT_OF_INCORPORATION` | California | English | `company-name`, `registered-agent`, `par-value`, `incorporator` |
| [Convertible Note](https://dealroom.todo.law/contracts/convertible-note) | `CONVERTIBLE_NOTE` | California, England and Wales, Spain | English, Spanish | `principal-amount`, `valuation-cap-amount`, `qualified-financing-threshold` |
| [Equity Incentive Plan](https://dealroom.todo.law/contracts/equity-incentive-plan) | `EQUITY_INCENTIVE` | California, England and Wales, Spain | English, Spanish | `plan-name` |
| [Founders Agreement](https://dealroom.todo.law/contracts/founders-agreement) | `FOUNDERS` | California, England and Wales, Spain | English, Spanish | None |
| [SAFE Agreement](https://dealroom.todo.law/contracts/safe-agreement) | `SAFE` | California, England and Wales, Spain | English, Spanish | `valuation-cap-amount` |
| [Seed Investment Agreement](https://dealroom.todo.law/contracts/seed-investment-agreement) | `SEED_INVESTMENT` | California, England and Wales, Spain | English, Spanish | `pre-money-valuation`, `investment-amount`, `share-count`, `share-price`, `board-size` |
| [Shareholders Agreement](https://dealroom.todo.law/contracts/shareholders-agreement) | `SHAREHOLDERS` | California, England and Wales | English, Spanish | `company-name`, `company-jurisdiction`, `board-size` |
| [Shareholders' Agreement (Pacto de Socios)](https://dealroom.todo.law/contracts/shareholders-agreement-spain) | `PACTO_SOCIOS` | Spain | Spanish, English | None |
| [Term Sheet](https://dealroom.todo.law/contracts/term-sheet) | `TERM_SHEET` | California, England and Wales, Spain | English, Spanish | `round-amount`, `pre-money-valuation` |

### Marketing and distribution

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Advertising Insertion Order](https://dealroom.todo.law/contracts/advertising-insertion-order) | `ADVERTISING_IO` | California, England and Wales, Spain | English, Spanish | `campaign-name`, `total-budget`, `start-date`, `end-date` |
| [Affiliate / Referral Program Agreement](https://dealroom.todo.law/contracts/affiliate-agreement) | `AFFILIATE_PROGRAM` | California, England and Wales, Spain | English, Spanish | `program-name`, `base-commission` |
| [Influencer Marketing Agreement](https://dealroom.todo.law/contracts/influencer-marketing-agreement) | `INFLUENCER_MARKETING` | California, England and Wales, Spain | English, Spanish | `campaign-name`, `total-compensation`, `num-deliverables` |
| [White-Label / Reseller Agreement](https://dealroom.todo.law/contracts/reseller-agreement) | `WHITE_LABEL_RESELLER` | California, England and Wales, Spain | English, Spanish | None |

### Spanish company law

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Acta de Consejo de Administración](https://dealroom.todo.law/contracts/board-minutes-spain) | `ACTA_CONSEJO_ADMINISTRACION` | Spain | Spanish | `company-name`, `cif`, `registered-address`, `meeting-date`, `president-name`, `secretary-name` |
| [Acta de Junta General](https://dealroom.todo.law/contracts/general-meeting-minutes-spain) | `ACTA_JUNTA_GENERAL` | Spain | Spanish | `company-name`, `cif`, `registered-address`, `meeting-date`, `meeting-type`, `quorum-percentage`, `secretary-name`, `president-name` |
| [Asignación Individual de Phantom Shares](https://dealroom.todo.law/contracts/phantom-shares-grant) | `PHANTOM_SHARES_GRANT` | Spain | Spanish | `employee-name`, `phantom-count`, `grant-date`, `plan-date`, `individual-vesting-months` |
| [Marco de Phantom Shares](https://dealroom.todo.law/contracts/phantom-shares-plan) | `PHANTOM_SHARES_PLAN` | Spain | Spanish | `company-name`, `cif`, `total-pool-percentage`, `cliff-months`, `vesting-months`, `plan-effective-date`, `payment-term-days` |

### Property

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| [Assured Periodic Tenancy Agreement](https://dealroom.todo.law/contracts/assured-periodic-tenancy) | `RESIDENTIAL_TENANCY_GB` | England and Wales | English | `property-address`, `monthly-rent`, `annual-rent (only under England and Wales)` |
| [California Residential Lease Agreement](https://dealroom.todo.law/contracts/california-residential-lease) | `RESIDENTIAL_TENANCY_US_CA` | California | English | `property-address`, `monthly-rent` |
| [Contrato de Arrendamiento de Vivienda](https://dealroom.todo.law/contracts/residential-lease-spain) | `RESIDENTIAL_TENANCY_ES` | Spain | Spanish | `property-address`, `monthly-rent` |

### Other

| Contract | Code | Governing laws | Languages | Required inputs |
| --- | --- | --- | --- | --- |
| Template Agreement | `TEMPLATE` | California, England and Wales, Spain | English | None |

<a id="formats"></a>

## Formats

One contract, five formats, all from the same text. A paid contract can be downloaded in every format at no extra cost.

| Format | Media type | Best for | How to get it |
| --- | --- | --- | --- |
| Markdown | `text/markdown` | AI agents and tools that read text | `inline: "md", or /document/md` |
| HTML | `text/html` | Web pages, previews and screen readers; one file, no outside assets | `inline: "html", or /document/html` |
| Text | `text/plain` | Plain text systems | `inline: "txt", or /document/txt` |
| PDF | `application/pdf` | Reading and printing | `/document` |
| DOCX | `Word document` | Editing in a word processor | `/document/docx` |

<a id="pricing"></a>

## Price

Drafting and negotiating are free. Each contract costs $29, the same on the website, through the API or through MCP.

Agents pay with prepaid credits, one credit per contract. Credits are sold in packs of 10: $217.50 a pack.

[See the pricing page](https://dealroom.todo.law/pricing)

<a id="machines"></a>

## For machines

- This page as Markdown: https://dealroom.todo.law/developers.md
- Contract types and the facts each one needs (JSON): https://dealroom.todo.law/api/v1/agent/contract-types
- MCP tools with their REST endpoints (JSON): https://dealroom.todo.law/api/v1/agent/mcp
- Agent card: https://dealroom.todo.law/.well-known/agent.json
- Summary for AI models: https://dealroom.todo.law/llms.txt

---

The contracts come from templates written by lawyers. Read each contract before you sign it. This page is general information, not legal advice.
