> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Create a counterpart

POST https://api.sandbox.monite.com/v1/counterparts
Content-Type: application/json

Reference: https://docs.monite.com/api/counterparts/post-counterparts

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

### Body (application/json)

This endpoint expects a CounterpartCreatePayload.

- `CounterpartCreatePayload`
  - `type`: `organization`
    - `organization` (CounterpartOrganizationCreatePayload, required) — Represents counterparts that are organizations (juridical persons).
    - `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
    - `external_reference` (string, optional) — A user-defined identifier of the counterpart. For example, the customer or vendor reference number in the entity's CRM system. If specified, it will be displayed in PDF invoices and other accounts receivable documents created by the entity.
    - `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
      - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
    - `reminders_enabled` (boolean, optional, default: true)
    - `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID. For identification purposes, this field may be required for counterparts that are not VAT-registered.
  - `type`: `individual`
    - `individual` (CounterpartIndividualCreatePayload, required) — Represents counterparts that are individuals (natural persons).
    - `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
    - `external_reference` (string, optional) — A user-defined identifier of the counterpart. For example, the customer or vendor reference number in the entity's CRM system. If specified, it will be displayed in PDF invoices and other accounts receivable documents created by the entity.
    - `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
      - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
    - `reminders_enabled` (boolean, optional, default: true)
    - `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID. For identification purposes, this field may be required for counterparts that are not VAT-registered.

## Response

### 201

Successful Response

- `CounterpartResponse`

## Errors

### 401 Post Counterparts Request Unauthorized Error

Unauthorized

- `error` (ErrorSchema, required)

### 403 Post Counterparts Request Forbidden Error

Forbidden

- `error` (ErrorSchema, required)

### 422 Post Counterparts Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Post Counterparts Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema, required)

## Types

### CounterpartOrganizationCreatePayload

Represents counterparts that are organizations (juridical persons).

- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `legal_name` (string, required) — The legal name of the organization.
- `registered_address` (CounterpartAddress, required) — The address of the organization.
- `email` (string, optional) — The email address of the organization
- `phone` (string, optional) — The phone number of the organization
- `tag_ids` (list of string, optional) — A list of IDs of user-defined tags (labels) assigned to this counterpart.

### CounterpartIndividualCreatePayload

Represents counterparts that are individuals (natural persons).

- `first_name` (string, required) — The person's first name.
- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `last_name` (string, required) — The person's last name.
- `residential_address` (CounterpartAddress, required) — The person's address.
- `email` (string, optional) — The person's email address.
- `phone` (string, optional) — The person's phone number.
- `tag_ids` (list of string, optional) — A list of IDs of user-defined tags (labels) assigned to this counterpart.
- `title` (string, optional) — The person's title or honorific. Examples: Mr., Ms., Dr., Prof.

### CounterpartIndividualRootResponse

Represents counterparts that are individuals (natural persons).

- `id` (string, required) — Unique ID of the counterpart.
- `created_at` (datetime, required) — Date and time when the counterpart was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the counterpart was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `individual` (CounterpartIndividualResponse, required) — Represents counterparts that are individuals (natural persons).
- `type` (enum, required) — The counterpart type: `organization` (juridical person) or `individual` (natural person).
  - Allowed values: `individual`, `organization`
- `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
- `created_by_entity_user_id` (string, optional) — Entity user ID of counterpart creator.
- `default_billing_address_id` (string, optional) — ID of the counterpart's billing address. If the counterpart is US-based and needs to accept ACH payments, this address must have all fields filled in. If `default_billing_address_id` is not defined, the default address is instead used as the billing address for ACH payments.
- `default_shipping_address_id` (string, optional) — ID of the shipping address.
- `external_reference` (string, optional) — A user-defined identifier of the counterpart. For example, the customer or vendor reference number in the entity's CRM system. If specified, it will be displayed in PDF invoices and other accounts receivable documents created by the entity.
- `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
  - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
- `reminders_enabled` (boolean, optional)
- `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID.

### CounterpartOrganizationRootResponse

Represents counterparts that are organizations (juridical persons).

- `id` (string, required) — Unique ID of the counterpart.
- `created_at` (datetime, required) — Date and time when the counterpart was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the counterpart was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `organization` (CounterpartOrganizationResponse, required) — Represents counterparts that are organizations (juridical persons).
- `type` (enum, required) — The counterpart type: `organization` (juridical person) or `individual` (natural person).
  - Allowed values: `individual`, `organization`
- `created_automatically` (boolean, optional, default: false) — `true` if the counterpart was created automatically by Monite when processing incoming invoices with OCR. `false` if the counterpart was created by the API client.
- `created_by_entity_user_id` (string, optional) — Entity user ID of counterpart creator.
- `default_billing_address_id` (string, optional) — ID of the counterpart's billing address. If the counterpart is US-based and needs to accept ACH payments, this address must have all fields filled in. If `default_billing_address_id` is not defined, the default address is instead used as the billing address for ACH payments.
- `default_shipping_address_id` (string, optional) — ID of the shipping address.
- `external_reference` (string, optional) — A user-defined identifier of the counterpart. For example, the customer or vendor reference number in the entity's CRM system. If specified, it will be displayed in PDF invoices and other accounts receivable documents created by the entity.
- `language` (enum, optional) — The language used to generate PDF documents for this counterpart.
  - Allowed values: `ab`, `aa`, `af`, `ak`, `sq`, `am`, `ar`, `an`, `hy`, `av`, `ae`, `ay`, `az`, `bm`, `ba`, `eu`, `be`, `bn`, `bi`, `bs`, `br`, `bg`, `my`, `ca`, `ch`, `ce`, `ny`, `zh`, `cu`, `cv`, `kw`, `co`, `cr`, `hr`, `cs`, `da`, `dv`, `nl`, `dz`, `en`, `eo`, `et`, `ee`, `fo`, `fj`, `fi`, `fr`, `fy`, `ff`, `gd`, `gl`, `lg`, `ka`, `de`, `el`, `kl`, `gn`, `gu`, `ht`, `ha`, `he`, `hz`, `hi`, `ho`, `hu`, `io`, `ig`, `id`, `ia`, `ie`, `iu`, `ik`, `ga`, `it`, `ja`, `jv`, `kn`, `kr`, `ks`, `kk`, `km`, `ki`, `rw`, `ky`, `kv`, `kg`, `ko`, `kj`, `ku`, `lo`, `la`, `lv`, `li`, `ln`, `lt`, `lu`, `lb`, `mk`, `mg`, `ms`, `ml`, `mt`, `gv`, `mi`, `mr`, `mh`, `mn`, `na`, `nv`, `nd`, `nr`, `ng`, `ne`, `no`, `nb`, `nn`, `ii`, `oc`, `oj`, `om`, `os`, `pi`, `ps`, `fa`, `pl`, `pt`, `pa`, `qu`, `ro`, `rm`, `rn`, `ru`, `se`, `sm`, `sg`, `sa`, `sc`, `sr`, `sn`, `sd`, `si`, `sk`, `sl`, `so`, `st`, `es`, `su`, `sw`, `ss`, `sv`, `tl`, `ty`, `tg`, `ta`, `tt`, `te`, `th`, `bo`, `ti`, `to`, `ts`, `tn`, `tr`, `tk`, `tw`, `ug`, `uk`, `ur`, `uz`, `ve`, `vi`, `vo`, `wa`, `cy`, `wo`, `xh`, `yi`, `yo`, `za`, `zu`
- `reminders_enabled` (boolean, optional)
- `tax_id` (string, optional) — The counterpart's taxpayer identification number or tax ID.

### ErrorSchema

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### CounterpartAddress

Address information.

- `city` (string, required) — City name.
- `country` (enum, required) — Two-letter ISO country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX`
- `line1` (string, required) — Street address.
- `postal_code` (string, required) — ZIP or postal code.
- `line2` (string, optional) — Additional address information (if any).
- `state` (string, optional) — State, region, province, or county.

### CounterpartIndividualResponse

Represents counterparts that are individuals (natural persons).

- `first_name` (string, required) — The person's first name.
- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `last_name` (string, required) — The person's last name.
- `email` (string, optional) — The person's email address.
- `phone` (string, optional) — The person's phone number.
- `tags` (list of CounterpartTagSchema, optional) — The list of tags for this counterpart.
- `title` (string, optional) — The person's title or honorific. Examples: Mr., Ms., Dr., Prof.

### CounterpartOrganizationResponse

Represents counterparts that are organizations (juridical persons).

- `is_customer` (boolean, required) — Indicates if the counterpart is a customer.
- `is_vendor` (boolean, required) — Indicates if the counterpart is a vendor.
- `legal_name` (string, required) — The legal name of the organization.
- `email` (string, optional) — The email address of the organization
- `phone` (string, optional) — The phone number of the organization
- `tags` (list of CounterpartTagSchema, optional) — The list of tags for this counterpart.

### ValidationErrorLocItem

### CounterpartTagSchema

Represents a user-defined tag that can be assigned to resources to filter them.

- `id` (string, required) — A unique ID of this tag.
- `created_at` (datetime, required) — Date and time when the tag was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `updated_at` (datetime, required) — Date and time when the tag was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard.
- `name` (string, required) — The tag name.
- `category` (enum, optional) — The tag category.
  - Allowed values: `document_type`, `department`, `project`, `cost_center`, `vendor_type`, `payment_method`, `approval_status`
- `created_by_entity_user_id` (string, optional) — ID of the user who created the tag.
- `description` (string, optional) — The tag description.

## Examples

**Request**

```json
{
  "type": "organization",
  "organization": {
    "is_customer": true,
    "is_vendor": true,
    "legal_name": "Acme Inc.",
    "registered_address": {
      "city": "Berlin",
      "country": "AF",
      "line1": "Flughafenstrasse 52",
      "postal_code": "10115"
    }
  }
}
```

**Response**

```json
{
  "id": "id",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "created_automatically": true,
  "created_by_entity_user_id": "created_by_entity_user_id",
  "default_billing_address_id": "default_billing_address_id",
  "default_shipping_address_id": "default_shipping_address_id",
  "external_reference": "123456789",
  "individual": {
    "email": "asingh@example.net",
    "first_name": "Adnan",
    "is_customer": true,
    "is_vendor": true,
    "last_name": "Singh",
    "phone": "5553211234",
    "tags": [
      {
        "id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
        "created_at": "2022-09-07T16:35:18Z",
        "updated_at": "2022-09-07T16:35:18Z",
        "category": "document_type",
        "created_by_entity_user_id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
        "description": "Tag for the Marketing Department",
        "name": "Marketing"
      }
    ],
    "title": "Mr."
  },
  "language": "ab",
  "reminders_enabled": true,
  "tax_id": "tax_id",
  "type": "individual"
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/counterparts"

payload = {
    "type": "organization",
    "organization": {
        "is_customer": True,
        "is_vendor": True,
        "legal_name": "Acme Inc.",
        "registered_address": {
            "city": "Berlin",
            "country": "AF",
            "line1": "Flughafenstrasse 52",
            "postal_code": "10115"
        }
    }
}
headers = {
    "x-monite-version": "2023-09-01",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/counterparts';
const options = {
  method: 'POST',
  headers: {
    'x-monite-version': '2023-09-01',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"type":"organization","organization":{"is_customer":true,"is_vendor":true,"legal_name":"Acme Inc.","registered_address":{"city":"Berlin","country":"AF","line1":"Flughafenstrasse 52","postal_code":"10115"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/counterparts"

	payload := strings.NewReader("{\n  \"type\": \"organization\",\n  \"organization\": {\n    \"is_customer\": true,\n    \"is_vendor\": true,\n    \"legal_name\": \"Acme Inc.\",\n    \"registered_address\": {\n      \"city\": \"Berlin\",\n      \"country\": \"AF\",\n      \"line1\": \"Flughafenstrasse 52\",\n      \"postal_code\": \"10115\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-monite-version", "2023-09-01")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/counterparts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-monite-version"] = '2023-09-01'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"type\": \"organization\",\n  \"organization\": {\n    \"is_customer\": true,\n    \"is_vendor\": true,\n    \"legal_name\": \"Acme Inc.\",\n    \"registered_address\": {\n      \"city\": \"Berlin\",\n      \"country\": \"AF\",\n      \"line1\": \"Flughafenstrasse 52\",\n      \"postal_code\": \"10115\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sandbox.monite.com/v1/counterparts")
  .header("x-monite-version", "2023-09-01")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"type\": \"organization\",\n  \"organization\": {\n    \"is_customer\": true,\n    \"is_vendor\": true,\n    \"legal_name\": \"Acme Inc.\",\n    \"registered_address\": {\n      \"city\": \"Berlin\",\n      \"country\": \"AF\",\n      \"line1\": \"Flughafenstrasse 52\",\n      \"postal_code\": \"10115\"\n    }\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sandbox.monite.com/v1/counterparts', [
  'body' => '{
  "type": "organization",
  "organization": {
    "is_customer": true,
    "is_vendor": true,
    "legal_name": "Acme Inc.",
    "registered_address": {
      "city": "Berlin",
      "country": "AF",
      "line1": "Flughafenstrasse 52",
      "postal_code": "10115"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2023-09-01',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/counterparts");
var request = new RestRequest(Method.POST);
request.AddHeader("x-monite-version", "2023-09-01");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"type\": \"organization\",\n  \"organization\": {\n    \"is_customer\": true,\n    \"is_vendor\": true,\n    \"legal_name\": \"Acme Inc.\",\n    \"registered_address\": {\n      \"city\": \"Berlin\",\n      \"country\": \"AF\",\n      \"line1\": \"Flughafenstrasse 52\",\n      \"postal_code\": \"10115\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2023-09-01",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "type": "organization",
  "organization": [
    "is_customer": true,
    "is_vendor": true,
    "legal_name": "Acme Inc.",
    "registered_address": [
      "city": "Berlin",
      "country": "AF",
      "line1": "Flughafenstrasse 52",
      "postal_code": "10115"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/counterparts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```