Skip to main content
PATCH
Update a Counterparty

Authorizations

Authorization
string
header
required

Token from POST /auth/token

Path Parameters

counterpartyId
string
required

Counterparty ID (ctp_ prefix).

Body

application/json

Partial update — every field optional; omitted fields are unchanged. Unknown fields are rejected with 400 (strict decode) by the handler. entityType cannot be changed (create a new counterparty instead) and name cannot be written (it is server-composed). Send only the name fields matching the counterparty's existing entityType: businessName on an individual, or firstName/lastName on a business, is rejected with 422 Validation.

firstName
string

Given name. Individual counterparties only. Recomposes name.

Required string length: 1 - 140
lastName
string

Family name. Individual counterparties only. Recomposes name.

Required string length: 1 - 140
businessName
string

Registered legal name. Business counterparties only. Recomposes name.

Required string length: 1 - 140
address
object

The counterparty's postal address.

email
string

Contact email address.

phone
string

Phone in E.164 format.

taxId
string

Tax ID (CPF, CNPJ, SSN, etc.). Required for some external-account types.

dateOfBirth
string<date>

Date of birth (YYYY-MM-DD).

nationality
string
metadata
object

Free-form key-value pairs stored on the resource and echoed back on reads.

Response

The request has succeeded.

A third party a customer transacts with — an entry in the customer's address book. Counterparties will own External Accounts (registered payment destinations) in a later slice.

customer
object
required

The customer whose address book holds this counterparty.

id
string

Public TypeID, e.g. txn_01h455vb4pex5vsknk084sn02q.

Pattern: ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
status
enum<string>

Lifecycle of a counterparty. rejected is set when compliance screening finds a prohibited country, on create or on a later update. A counterparty rejected only for countryProhibited returns to active when an update moves its address to an allowed country; deleted marks a soft-deleted record that remains readable by id.

Available options:
active,
rejected,
deleted
failure
object

Why the counterparty was rejected. Present only when status is rejected.

name
string

Single-line display name, read-only and server-composed: businessName for a business, or firstName + " " + lastName for an individual. It is the same string an instrument's owner.name carries. Write the structured fields; read this one.

entityType
enum<string>

Determines which structured name fields apply. Can be absent on reads for older counterparties that have not been classified yet.

Available options:
individual,
business
firstName
string

Given name — present when entityType is individual and the row has structured name fields. Echoed back exactly as supplied.

lastName
string

Family name — present when entityType is individual and the row has structured name fields. Echoed back exactly as supplied.

businessName
string

Registered legal name — present when entityType is business and the row has structured name fields. Echoed back exactly as supplied.

address
object

Registered address. Omitted when the counterparty has none, such as one created without an address on a project that does not require it.

email
string
phone
string
taxId
string
dateOfBirth
string<date>
nationality
string

ISO 3166-1 alpha-2.

metadata
object
createdAt
string<date-time>
updatedAt
string<date-time>