Skip to main content
POST
Create a Counterparty

Authorizations

Authorization
string
header
required

Token from POST /auth/token

Headers

Idempotency-Key
string
required

Required on POST and PUT requests. Use a unique value per logical mutation attempt, for example a UUID.

Body

application/json

Individual counterparty create arm. The server composes the response name as firstName + " " + lastName.

entityType
enum<string>
required

Entity type discriminator.

Available options:
individual
firstName
string
required

Given name, as it appears on the counterparty's identity document. 1..140 chars.

Required string length: 1 - 140
lastName
string
required

Family name, as it appears on the counterparty's identity document. 1..140 chars.

Required string length: 1 - 140
customerId
string
required

Owning customer (cst_… TypeID or legacy public id).

address
object
required

Registered address. Required: must include non-blank line1, city, zipCode and a two-letter ISO country (state required for US).

dateOfBirth
string<date>

Date of birth (YYYY-MM-DD).

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.

nationality
string

ISO 3166-1 alpha-2.

metadata
object

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

Response

201 - application/json

The request has succeeded and a new resource has been created as a result.

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.

address
object
required

Registered address. Required since v0.11 — always present in responses.

id
string

Public TypeID, e.g. txn_01h455vb4pex5vsknk084sn02q; legacy UUID suffixes are accepted until non-v7 rows are retired.

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})$
object
enum<string>
Available options:
counterparty
customerId
string

Public TypeID, e.g. txn_01h455vb4pex5vsknk084sn02q; legacy UUID suffixes are accepted until non-v7 rows are retired.

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 reserved for create-time compliance screening (not yet active); deleted marks a soft-deleted record that remains readable by id.

Available options:
active,
rejected,
deleted
rejectionReason
string

Set when status = 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 that appears in party.name. Write the structured fields; read this one.

entityType
enum<string>

Determines which structured name fields apply. Optional on reads only for rows created before v0.13 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.

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>