---
title: "Link Payees"
method: POST
path: "/entity/{entityId}/addPayees"
tags: ["entity > counterparty"]
---

# Link Payees

`POST /entity/{entityId}/addPayees`

## Request

- Base URL: `https://api.mercoa.com`
- URL: `https://api.mercoa.com/entity/{entityId}/addPayees`
- Auth: HTTP bearer

Create association between Entity and a given list of Payees. If a Payee has previously been archived, unarchive the Payee.

## Path parameters

- `entityId` string, required

## Request body

- EntityTypesEntityAddPayeesRequest
  - `payees` EntityTypesEntityId[], required: List of payee entity IDs or foreign IDs to associate with the entity
  - `customizations` EntityTypesCounterpartyCustomizationRequest[]: List of customizations to apply to the payees. If the payee is not currently a counterparty of the entity, the counterparty will be created with the provided customizations.
    - `counterpartyId` string, required
    - `accounts` EntityTypesCounterpartyCustomizationAccount[]: The list of accounts the entity has with the counterparty.
      - `accountId` string, required: The ID the counterparty has assigned to this account.
      - `postalCode` string: The postal code the counterparty has assigned to this account.
      - `nameOnAccount` string: The name on the account the counterparty has assigned to this account.

## Response `200`

Successful response

## Other responses

- `400`: Error response with status 400
- `401`: Error response with status 401
- `403`: Error response with status 403
- `404`: Error response with status 404
- `409`: Error response with status 409
- `500`: Error response with status 500
- `501`: Error response with status 501

---

[API](https://skmtc.dev/mercoa/apis/mercoa-2.md) - [All operations](https://skmtc.dev/mercoa/apis/mercoa-2/llms.txt) - [OpenAPI document](https://skmtc.dev/mercoa/apis/mercoa-2/revisions/00a8e403ae18?raw)
