Skip to main content

Save a Bank Counterparty

Saves a US account a withdrawal can pay. The coin is USD. Which fields the rail needs is in The rails.

reference is required and unique among the workspace's live bank accounts, counterparties and deposit accounts included. A reference already in use answers 409 counterparty_reference_taken. Deleting the counterparty frees the reference.

customer_id is required from every key: a workspace-scoped key names any account of the workspace; an account-scoped key names its own.

Send an Idempotency-Key with every save. There is no grace period: a request without it is refused. Retrying a save that went through with the same key answers the saved record again, with Idempotency-Replayed: true.

The response carries the full account number. There is no webhook.

Replaces POST /api/v2/banking/counterparties. A v2 withdrawal pays a counterparty saved here.

Authorization:

Every request is signed with your API key: a short-lived JWT, signed with your private key, sent in one header on /v3/* and /api/v2/* alike.

Headers:
Authorization: APIKey {SIGNED_JWT}

How to build and sign the JWT: Authentication.

Endpoint

POST

/v3/banking/counterparties

Headers​

HeaderDescription
Idempotency-KeyRequired, for API keys and dashboard sessions. One key per counterparty you mean to save: any printable-ASCII string of 1 to 255 characters (a UUID is recommended), sent again unchanged on every retry of it. A retry answers the first response, with Idempotency-Replayed: true. See Safe retries.

Request Body Sample​

ACH​

{
"customer_id": "cst_01h455vb4pex5vsknk084sn02q",
"reference": "vendor-42",
"name": "Northwind LLC",
"holder_type": "business",
"bank_name": "Chase",
"instrument": "ach",
"account_type": "checking",
"routing_number": "021000021",
"account_number": "000123456789",
"address": {
"line1": "1 Market Street",
"line2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"bank_address": {
"line1": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US"
}
}

International wire​

{
"customer_id": "cst_01h455vb4pex5vsknk084sn02q",
"reference": "intl-vendor-001",
"name": "Global Corp",
"holder_type": "business",
"bank_name": "National Westminster Bank",
"instrument": "wire",
"wire_type": "international",
"routing_number": "NWBKGB2L",
"swift": "NWBKGB2L",
"iban": "GB29 NWBK 6016 1331 9268 19",
"address": {
"line1": "10 Downing Street",
"city": "London",
"state": "London",
"postal_code": "SW1A 2AA",
"country": "GB"
}
}

Spaces in iban are dropped and it is stored upper case, as swift is.

Request Body Schema​

FieldTypeDescription
customer_idstring (cst_…)Required. The account the counterparty belongs to.
referencestringRequired. Your own reference, 1 to 255 characters. Unique among the workspace's live bank accounts.
namestringRequired. Who is paid, 2 to 255 characters. Extra spaces are collapsed.
holder_typestringRequired. individual or business.
bank_namestringRequired. The bank, 2 to 255 characters.
instrumentstringRequired. ach or wire.
wire_typestringRequired for a wire. domestic or international. Leave it out on ACH.
account_typestringRequired for ACH. checking or savings.
routing_numberstringRequired. See The rails. At most 34 characters.
account_numberstringRequired for ACH and a domestic wire, and for an international wire that sends no IBAN. At most 34 characters.
swiftstringRequired for an international wire. 8 or 11 letters and digits. Stored upper case.
ibanstringAn international wire sends this or account_number. 15 to 34 letters and digits once spaces are dropped. Stored upper case.
addressobjectRequired. line1 (1 to 255), line2 (optional, at most 255), city and state (each 1 to 100), postal_code (1 to 20), country (two letters).
bank_addressobjectOptional. The same shape as address. A domestic ACH often has none. Sending any of it means sending a complete address.

Response Sample​

200 OK

{
"id": "bcp_01k8z5q7r9s1t3v5w7x9y1z3a5",
"customer_id": "cst_01h455vb4pex5vsknk084sn02q",
"reference": "vendor-42",
"coin": "USD",
"name": "Northwind LLC",
"holder_type": "business",
"bank_name": "Chase",
"instrument": "ach",
"account_type": "checking",
"routing_number": "021000021",
"account_number": "000123456789",
"status": "active",
"address": {
"line1": "1 Market Street",
"line2": "Suite 400",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"bank_address": {
"line1": "270 Park Avenue",
"city": "New York",
"state": "NY",
"postal_code": "10017",
"country": "US"
},
"created_at": "2026-10-23T12:00:00Z",
"updated_at": "2026-10-23T12:00:00Z"
}

Response Schema​

The counterparty, with the fields of a List Bank Counterparties row, without customer. status is active. coin is USD.

Errors​

StatusmessageWhen
400failed to parse requestThe body is not valid JSON, customer_id is not a cst_… id, or holder_type, instrument, wire_type or account_type is not one of its values.
400customer_requiredNo customer_id.
400invalid_holder_namename is shorter than 2 characters once spaces are collapsed.
400invalid_holder_typeholder_type is missing or not individual or business.
400invalid_bank_namebank_name is shorter than 2 characters.
400invalid_referencereference is empty once trimmed.
400invalid_addressaddress or a bank_address that was sent is missing a line, a city, a state or a postal code, a line is too long, or country is not two letters.
400invalid_instrumentinstrument is not ach or wire.
400invalid_wire_typeA wire was sent without wire_type domestic or international.
400invalid_account_typeAn ACH was sent without account_type checking or savings.
400invalid_routing_numberACH or a domestic wire: not a 9-digit ABA whose check digit holds. An international wire: empty.
400invalid_account_numberACH: not 4 to 17 digits. A domestic wire: empty or longer than 17. An international wire: neither an account number nor an IBAN, or the account number is longer than 34.
400invalid_swiftAn international wire whose SWIFT is not 8 or 11 letters and digits.
400invalid_ibanAn IBAN that is not 15 to 34 letters and digits.
400idempotency_key_requiredNo Idempotency-Key header.
400idempotency_key_invalidThe Idempotency-Key is longer than 255 characters or not printable ASCII.
401unauthorizedMissing or invalid signature.
403forbiddenAn account-scoped key named another account, or customer_id is not an account of the workspace.
409counterparty_reference_takenA live bank account in the workspace already uses this reference.
409idempotency_in_progressThe same Idempotency-Key is still running. Retry after Retry-After seconds with the same key.
422Validation failedA required field is missing, or reference, name, bank_name or a number is longer than allowed; details names it.
422idempotency_key_conflictThe same Idempotency-Key was used for a different request.
503idempotency_unavailableThe retry store could not be reached. Nothing was saved: retry later with the same key.

Coming from v2​

v2 (POST /api/v2/banking/counterparties)v3
no idempotency headerIdempotency-Key required, with no grace period
accountId (uuid)customer_id (cst_…)
counterpartyNamename
type optionalholder_type required
instrumentType, wireType, accountTypeinstrument, wire_type, account_type
swiftCodeswift
address.address1, address2, postalCodeaddress.line1, line2, postal_code
bankAddressbank_address
routing number of 9 digits for every railan international wire's routing number is only required to be present
id (uuid), currencyid (bcp_…), coin (USD, not sent)
createdAt, updatedAtcreated_at, updated_at

Support and Resources​

If you need assistance or have any questions, our support team is here to help. You can contact our support team at support@blockwyre.com.

Stay Updated​

Stay up-to-date with the latest news, updates, and features from BlockWyre by following us on social media:

We are excited to have you on board and look forward to seeing how you leverage BlockWyre's powerful tools to enhance your financial operations. Happy integrating!