---
title: "Update Counterparty"
method: PATCH
path: "/api/v1/counterparties/:counterpartyId"
tags: ["Counterparties"]
---

# Update Counterparty

`PATCH /api/v1/counterparties/:counterpartyId`

## Request

- Base URL: `https://merchant-api.accruesavings.com`
- URL: `https://merchant-api.accruesavings.com/api/v1/counterparties/:counterpartyId`
- Auth: none declared. Required headers: `Client-ID`, `Authorization`
- TypeScript: <https://skmtc.dev/byaccrue/apis/accrue-merchant-api/docs/api/v1/counterparties/:counterpartyId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a counterparty. Use this endpoint to update editable fields. Some fields, like account number and routing number, can't be edited.

## Path parameters

- `counterpartyId` string, uuid, required: ID of the counterparty to update.

## Headers

- `Client-ID` string, uuid, required: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
- `Authorization` string, uuid, required: Secure secret to access privileged endpoints.

## Request body

- object
  - `data` object, required
    - `type` 'UpdateCounterparty', required
    - `attributes` object, required
      - `label` string: Optional label for the counterparty.

## Response `200`

Counterparty updated successfully

- UpdateCounterpartyResponse
  - `data` Counterparty, required: A counterparty represents a payee. `externalBankAccount` is the payee's own bank account for settlement. Top-level `accountNumber` / `routingNumber` / `accountType` still echo those values but are deprecated. `internalBankAccount` is the Accrue account you can fund over bank rails when one has been provisioned.
    - `id` string, uuid, required: Unique identifier for the object.
    - `type` 'Counterparty', required
    - `attributes` object, required
      - `updatedAt` string, date-time, required
      - `createdAt` string, date-time, required
      - `label` string: Optional label for the counterparty.
      - `accountNumber` string: Deprecated. Use `externalBankAccount.accountNumber` instead. Still returned for compatibility.
      - `routingNumber` string: Deprecated. Use `externalBankAccount.routingNumber` instead. Still returned for compatibility.
      - `accountType` 'Checking' | 'Savings': Deprecated. Use `externalBankAccount.accountType` instead. Still returned for compatibility.
      - `externalBankAccount` CounterpartyExternalBankAccount: The payee's own bank account for settlement.
        - `accountNumber` string, required: The payee's bank account number for settlement.
        - `routingNumber` string, required: The payee's ABA routing number for settlement.
        - `accountType` 'Checking' | 'Savings', required: The type of the payee's settlement bank account.
      - `internalBankAccount` CounterpartyInternalBankAccount: The Accrue bank account associated with this counterparty. Present only when a dedicated Accrue deposit account has been provisioned. Use these details to send funds to this counterparty over bank rails.
        - `accountNumber` string, required: Account number of the Accrue bank account associated with this counterparty.
        - `routingNumber` string, required: Routing number of the Accrue bank account associated with this counterparty.
        - `accountType` 'Checking' | 'Savings', required: Account type of the Accrue bank account associated with this counterparty.
      - `balance` object
        - `pending` integer, required: Incoming credits that have not posted yet, in cents. Outgoing payouts and transfers are not included. Can exceed the int32 range — read it into a 64-bit integer.
        - `available` integer, required: Posted credits minus every debit, whether posted or still in flight, in cents. This is the amount that can be paid out now. Can exceed the int32 range — read it into a 64-bit integer. A single payout is capped below this (see the payout `amount` field), so a balance above that cap is paid out across multiple payouts.
        - `posted` integer, required: Posted credits minus posted debits, in cents. It changes only when a transaction posts (a transaction's `postedAt`), so it is the balance to reconcile the `Posted` transactions against. `posted - available` is the debits still in flight, such as payouts that have not completed. Can exceed the int32 range — read it into a 64-bit integer.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/byaccrue/apis/accrue-merchant-api.md) - [All operations](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/revisions/3e2d97ef2e6e?raw)
