# contractorOps.agreements.addContractor

Add the other party of a signed agreement or NDA that has no contractor as a new contractor and file the document with them: envelopeId, contractor (displayName, legalName, email, optional otherEmails, country, region, jobRoleId, title, rate, startDate, endDate) and idempotencyKey. Refused when an address already belongs to a contractor (use contractorOps.agreements.linkContractor), or when someone has the same or a close name unless notDuplicateOf lists them. An agreement's role, rate and dates become its terms when its title has a matching jobRoleId; otherwise the terms wait for review and role selection. With no terms given, the document is read for its terms to check. An NDA stays apart from the agreement. No invitation is sent. A document is never filed twice, whoever asks.

`POST /api/v1/accounting/contractorOps.agreements.addContractor`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required

MCP tool: `accounting_contractor_ops_agreements_add_contractor`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `envelopeId` | string (ID) | Yes | The ID of a document sent for signature, from signing.envelopes.list. |
| `contractor` | object | Yes | No other fields. |
| `contractor.displayName` | string | Yes | 1–200 characters. |
| `contractor.legalName` | string | Yes | 1–300 characters. |
| `contractor.email` | string (email) | Yes | An email address. at most 320 characters. |
| `contractor.otherEmails` | array of strings (email) |  | at most 10 items; each at most 320 characters. |
| `contractor.country` | string or null |  |  |
| `contractor.region` | string or null |  |  |
| `contractor.jobRoleId` | string (ID) or null |  |  |
| `contractor.title` | string or null |  | A short title. |
| `contractor.rate` | object or null |  |  |
| `contractor.rate.amountMinor` | string | Yes | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. Matches ^\d{1,15}$. |
| `contractor.rate.currency` | string | Yes | Three-letter currency code, such as CAD or USD. |
| `contractor.rate.unit` | enum | Yes | One of: `hour`, `day`, `month`. |
| `contractor.startDate` | string (date) or null |  |  |
| `contractor.endDate` | string (date) or null |  |  |
| `notDuplicateOf` | array of strings (ID) |  | at most 20 items. |
| `idempotencyKey` | string | Yes | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/contractorOps.agreements.addContractor \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "envelopeId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "contractor": {
    "displayName": "Synthetic Ventures Inc.",
    "legalName": "Synthetic Ventures Inc.",
    "email": "finance@example.com"
  }
}'
```

Reference page: https://app.getoatmilk.com/docs/api/contractorOps.agreements.addContractor
