Update counterparty
Updates counterparty attributes.
PATCH/Run in dashboard
At least one field must be provided. Use null on externalId to clear it.
Requires an API key with the counterparties.manage 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
Update counterparty request body. At least one field must be provided.
-
externalId·string | null· min length 1 · max length 256 · examplecustomer_42Updated opaque external ID. Do not include personal data. Use null to clear.
-
entityType·string· one ofindividual,business· examplebusinessUpdated counterparty entity type.
-
displayName·string· min length 1 · max length 512 · exampleJane Q. DoeUpdated searchable display name. Keep it minimal.
Responses
-
200Counterparty updated-
data·object· requiredCounterparty response payload.
-
counterparty·object· requiredCounterparty record.
-
id·string· required · min length 1 · examplecpty_exampleCounterparty identifier.
-
organizationId·string· required · min length 1 · exampleorg_exampleOrganization identifier.
-
projectId·string | null· required · min length 1 · exampleprj_exampleProject scope when the counterparty is project-scoped.
-
externalId·string | null· required · examplecustomer_42Caller-supplied opaque identifier for cross-system reference. Do not place personal data in this indexed field.
-
entityType·string· required · one ofindividual,business· exampleindividualCounterparty entity type.
-
displayName·string· required · exampleJane DoeHuman-readable, searchable display name. Keep it minimal because this indexed field is not application-encrypted.
-
status·string· required · one ofactive,archived· exampleactiveCounterparty status.
-
createdBy·string | null· required · min length 1 · exampleusr_exampleUser who created the counterparty. Null when created via API key.
-
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.manageaction: 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.
Example request
curl -X PATCH 'https://api.solana.com/v1/counterparties/cpty_example' \
-H "Authorization: Bearer $SDP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"externalId": "customer_42",
"entityType": "business",
"displayName": "Jane Q. Doe"
}'Example responses
{
"data": {
"counterparty": {
"id": "cpty_example",
"organizationId": "org_example",
"projectId": "prj_example",
"externalId": "customer_42",
"entityType": "individual",
"displayName": "Jane Doe",
"status": "active",
"createdBy": "usr_example",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-02T00:00:00.000Z"
}
},
"meta": {
"requestId": "req_example",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}Error responses use the standard error shape.