# parties.create

Create a customer or vendor account with displayName, optional legal name, contacts, address, jurisdiction (for example CA-ON), tax treatment, currency, payment terms, preferred payment methods, invoice prefix, metadata, and an idempotency key.

`POST /api/v1/accounting/parties.create`

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

MCP tool: `accounting_parties_create`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `kind` | enum |  | Which kind of record or job this is. One of: `customer`, `vendor`, `both`. |
| `displayName` | string | Yes | 1–200 characters. |
| `legalName` | string or null |  |  |
| `email` | string (email) or null |  | An email address. |
| `phone` | string or null |  |  |
| `website` | string (uri) or null |  |  |
| `contacts` | array of objects |  | at most 25 items. |
| `contacts[].id` | string |  | The record's ID. at most 64 characters. |
| `contacts[].name` | string |  | A display name. at most 200 characters. Default `""`. |
| `contacts[].email` | string (email) or null |  | An email address. |
| `contacts[].phone` | string or null |  |  |
| `contacts[].title` | string or null |  | A short title. |
| `contacts[].primary` | boolean |  | Default `false`. |
| `contacts[].billing` | boolean |  | Default `false`. |
| `address` | object |  | No other fields. |
| `address.line1` | string |  | at most 200 characters. |
| `address.line2` | string |  | at most 200 characters. |
| `address.city` | string |  | at most 120 characters. |
| `address.region` | string |  | at most 120 characters. |
| `address.postalCode` | string |  | at most 20 characters. |
| `address.country` | string |  | at most 60 characters. |
| `jurisdiction` | string or null |  |  |
| `taxTreatment` | enum |  | One of: `auto`, `hst`, `gst`, `gst_qst`, `zero_rated`, `exempt`, `none`. |
| `taxRateCode` | enum or null |  | One of: `HST_13`, `HST_14`, `HST_15`. |
| `taxId` | string or null |  |  |
| `currency` | string |  | Three-letter currency code, such as CAD or USD. |
| `paymentTerms` | object or null |  |  |
| `paymentTerms.code` | enum | Yes | One of: `due_on_receipt`, `net_7`, `net_15`, `net_30`, `net_45`, `net_60`, `custom`, `split_50_50`, `monthly`. |
| `paymentTerms.days` | integer or null |  |  |
| `preferredPaymentMethodIds` | array of strings (ID) |  | A list of record IDs. at most 10 items. |
| `invoicePrefix` | string or null |  |  |
| `notes` | string |  | Notes kept with the record. at most 5000 characters. |
| `metadata` | map |  |  |
| `external` | map |  |  |
| `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/parties.create \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "displayName": "Synthetic Ventures Inc."
}'
```

Reference page: https://app.getoatmilk.com/docs/api/parties.create
