CounterpartiesArchive/restore a counterparty

Archive/restore a counterparty

archived=true archives it (it stops matching new operations and can't be used for new transfers; history is preserved); false restores it. Gated by the counterparty_archive policy (both directions).

curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/counterparties/example_string/archive" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "archived": true
}'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "vaultId": "example_string",
  "name": "Binance",
  "description": "example_string",
  "kind": "exchange",
  "tagsJson": [
    "example_string"
  ],
  "avatarUri": "example_string",
  "color": "#000",
  "emoji": "🏦",
  "archivedAt": "2026-07-02T11:25:15.134000Z",
  "createdById": "example_string",
  "createdAt": "2026-07-02T11:25:15.134000Z",
  "updatedAt": "2026-07-02T11:25:15.134000Z"
}
POST
/api/v1/vaults/{code}/counterparties/{id}/archive
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Session token. Mobile/services. The web uses a cookie.

Session token. Mobile/services. The web uses a cookie.
API Key (cookie: session_token)
session_tokenstring
Required

API key (sent in cookie)

path
codestring
Required

Unique Vault code (slug)

path
idstring
Required

Counterparty id (cuid)

Content-Typestring
Required

The media type of the request body

Options: application/json
archivedboolean
Required

true archives, false restores from the archive

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Session token. Mobile/services. The web uses a cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Path Parameters

codestring
Required

Unique Vault code (slug)

Example:
demo_vault
idstring
Required

Counterparty id (cuid)

Body

application/json
archivedboolean
Required

true archives, false restores from the archive

Responses

idstring
Required

cuid

vaultIdstring
Required
namestring
Required
descriptionstring
Required
kindstring
Required

Free-form category

tagsJsonstring
Required
avatarUristring
Required

Link to the avatar image

colorstring
Required

HEX color

emojistring
Required

Emoji icon

archivedAtstring
Required

An archived counterparty isn't matched to new operations

createdByIdstring
Required
createdAtstring
Required
updatedAtstring
Required