Create counterparty account
Creates a payment account for a counterparty.
POST/Run in dashboard
For accountKind "crypto_wallet", details.network must be "solana" and details.address must be a Solana wallet address. A counterparty holds one active account per network and address: an address already on one of its active accounts answers 409 CONFLICT ("This address is already on this counterparty"). An archived account does not count, so re-adding its address creates a new account.
Requires an API key with the counterparties.execute action.
Path parameters
-
counterpartyId·string· required · min length 1 · examplecpty_exampleCounterparty identifier.
Headers
-
x-project-id·string· min length 1 · exampleprj_exampleRequired for dashboard sessions. API keys use their assigned project.
-
Idempotency-Key·stringUse a unique 1–255 printable ASCII key per operation. Reuse it with the same request on retries. An in-flight attempt returns
409; a changed request returns422. Retry and recovery rules.
Request body
application/json · required
Create counterparty account request body.
-
accountKind·string· required · alwayscrypto_wallet· examplecrypto_walletCounterparty account kind.
-
label·string· min length 1 · max length 256 · exampleUSDC walletOptional account label.
-
details·objectFor crypto_wallet accounts, must include network: "solana" and address as a Solana wallet address.
*·any
-
providerAccountData·objectProvider-specific metadata to preserve with the account.
*·any
Responses
-
201Counterparty account created-
data·object· requiredCounterparty account response payload.
-
account·object· requiredCounterparty payment account record.
-
id·string· required · examplecpacct_exampleCounterparty account identifier.
-
organizationId·string· required · min length 1 · exampleorg_exampleOrganization identifier.
-
projectId·string· required · min length 1 · exampleprj_exampleProject identifier.
-
counterpartyId·string· required · min length 1 · examplecpty_exampleCounterparty identifier.
-
accountKind·string· required · alwayscrypto_wallet· examplecrypto_walletCounterparty account kind.
-
label·string | null· required · exampleUSDC walletOptional human-readable account label.
-
details·object· requiredAccount details. For crypto_wallet accounts, include network: "solana" and address as a Solana wallet address.
*·any
-
providerAccountData·object· requiredProvider-specific account metadata preserved by SDP.
*·any
-
status·string· required · one ofactive,archived· exampleactiveCounterparty account status.
-
createdAt·string· required · formatdate-time· example2025-01-01T00:00:00.000ZCreation timestamp.
-
updatedAt·string· required · formatdate-time· example2025-01-02T00:00:00.000ZLast update timestamp.
-
-
-
meta·object· requiredResponse metadata.
-
requestId·string· required · min length 1 · examplereq_exampleRequest identifier for tracing.
-
timestamp·string· required · formatdate-time· example2025-01-01T00:00:00.000ZISO 8601 timestamp.
-
-
-
400Bad Request-
error·object· requiredStandard error payload.
-
code·string· requiredMachine-readable error code.
-
message·string· requiredHuman-readable error message.
-
details·objectOptional error details for debugging.
*·any
-
-
meta·object-
requestId·string· min length 1 · examplereq_exampleRequest identifier for tracing.
-
-
-
401UnauthorizedSame fields as
400. -
403Forbidden. Requires thecounterparties.executeaction: an API key must hold it (a module'smanageorexecutealso covers itsread), and a signed-in member's organization role must include it. Without it the error is INSUFFICIENT_PERMISSIONS anderror.details.actionnames the action. Any other 403 names its own reason.Same fields as
400. -
404Not FoundSame fields as
400. -
409ConflictSame fields as
400. -
422Unprocessable EntitySame fields as
400. -
500Internal Server ErrorSame fields as
400.