Import wallets for a firm
Summary
Section titled “Summary”Bulk-links (and, in sync mode, unlinks) on-chain wallets on a monitored
firm. Built for a repeatable programmatic sync — e.g. a nightly job that
POSTs your current wallet inventory — so it is partial-success and
idempotent, not all-or-nothing.
The firmId in the path must be a firm your organization monitors;
otherwise the request returns 404 (never 403, so you cannot probe
which firm ids exist in other orgs).
Per-row validation (partial success)
Section titled “Per-row validation (partial success)”Every row in wallets is validated independently. Rows that pass are
applied; rows that fail are returned in failed with per-field error
details — a single bad row never rejects the whole request. See
WalletImportError for the error codes.
mode | Links new wallets | Unlinks wallets absent from the payload | Updates tags on already-linked wallets |
|---|---|---|---|
add (default) | yes | no | no |
sync | yes | yes | yes |
addis purely additive: it links wallets it doesn’t already have and leaves every existing wallet — membership and tags — untouched.synctreats the payload as the firm’s complete desired wallet list: it links new wallets, unlinks any currently-linked wallet the payload doesn’t mention, and refreshes tags on already-linked wallets. Passsynconly when the payload is authoritative.
Unlinking is protected against bad data (sync only)
Section titled “Unlinking is protected against bad data (sync only)”A wallet is unlinked only when no row claims its address. A row that
fails validation but still has a readable address counts as claiming
that wallet, so a typo in some other column can never delete a real
wallet. Only a wallet that is entirely absent — or named solely by a row
whose address itself is unreadable — is unlinked.
An empty wallets array is a valid sync request that unlinks every
wallet on the firm (there is nothing to protect them). In add mode an
empty array is rejected with 400 as a probable mistake.
Tags are derived from the row’s flags and control_model (see
WalletImportRow) — the payload has no free-form tag field. Each flag
maps to a pair: true → Hot / Client Asset / Omnibus,
false → Cold / Non-Client Asset / Segregated. Set
apply_counterpart_tags to false to tag only true flags.
The predefined import tags are: Hot, Cold, Client Asset, Non-Client
Asset, Omnibus, Segregated, Single-Sig, Multi-Sig, MPC, 3rd Party
Custodian, Contract Controlled.
Any that are missing from your organization’s wallet tags are created
on import. On a sync tag refresh, only these import tags are
reconciled; any other tags applied to the wallet in the CertiK UI are
preserved.
Deduplication & no-ops
Section titled “Deduplication & no-ops”- A wallet named more than once in one payload (duplicate rows, or the same address in different letter-casing) is stored once.
- A request that changes nothing (every wallet already present with the same tags) is a no-op: it writes nothing and does not bump the firm’s “last updated” timestamp.
Effects beyond wallet membership
Section titled “Effects beyond wallet membership”A request that changes membership or tags updates the firm’s Last Updated surface. The next daily rating run will incorporate wallet changes; this endpoint does not trigger an immediate rating recompute.
Limits
Section titled “Limits”- Up to 5000 wallet rows per request (
400beyond that). - Request body up to 10 MB.
Request
Section titled “Request”- HTTP Method:
POST - Endpoint Path:
/organization/firms/{firmId}/wallets
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
firmId | path | string | Yes | Id of a firm your organization monitors. |
JSON body
Section titled “JSON body”| Field | Type | Required | Description |
|---|---|---|---|
mode | string | Optional | add (default) links only and never touches existing wallets. sync treats the payload as the firm’s complete wallet list — it also unlinks wallets the payload omits and refreshes tags on already-linked wallets. |
apply_counterpart_tags | boolean | Optional | When true (default), a false flag derives its counterpart tag (Cold, Non-Client Asset, Segregated). When false, only true flags derive tags. |
wallets | Array[WalletImportRow] | Yes | The wallets to apply. May be empty only in sync mode (to unlink everything). |
wallets[].address | string | Yes | On-chain address, in the format of the row’s chain: | Chain (chain_id) | Format | | ---------------------------------------- | -------------------------------------------------------- | | EVM chains | 0x followed by 40 hex characters. Any casing is accepted (EVM addresses are stored lower-cased). | | Bitcoin (0) | Mainnet Base58 (1… / 3…) or Bech32 (bc1…) | | TRON (728126428) | Base58, T followed by 33 characters | | Solana ("solana", or blockchain solana) | Base58-encoded 32-byte public key | A malformed address on a supported chain fails the row with invalid_address. On any other chain the address is accepted as-is. |
wallets[].blockchain | string | Yes | Chain name — either the slug (ethereum, bsc, polygon, arbitrum, optimism, base, avax, linea, plasma, bitcoin, tron, solana) or its display name (Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Base, Avalanche, Linea, Plasma, Bitcoin, TRON, Solana). Must agree with chain_id; a mismatch fails the row with chain_mismatch. |
wallets[].chain_id | any | Yes | The authoritative chain selector. Supported: 0 Bitcoin · 1 Ethereum · 10 Optimism · 56 BNB Chain · 137 Polygon · 8453 Base · 9745 Plasma · 42161 Arbitrum · 43114 Avalanche · 59144 Linea · 728126428 TRON · "solana" (Solana). “solana”(withchain_id ”solana”ornull`). |
wallets[].is_hot_wallet | boolean | Yes | true derives the “Hot” tag; false derives “Cold” (when apply_counterpart_tags is on). |
wallets[].is_client_asset_wallet | boolean | Yes | true derives the “Client Asset” tag; false derives “Non-Client Asset” (when apply_counterpart_tags is on). |
wallets[].is_omnibus_wallet | boolean | Yes | true derives the “Omnibus” tag; false derives “Segregated” (when apply_counterpart_tags is on). |
wallets[].control_model | string | Yes | Custody model. Matched case-insensitively after trimming; both hyphen and no-hyphen spellings of the -sig models work: | Accepted value(s) | Derived tag | | ----------------------------- | ------------------- | | single-sig, singlesig | Single-Sig | | multi-sig, multisig | Multi-Sig | | mpc | MPC | | third-party custodian | 3rd Party Custodian | | smart-contract-controlled | Contract Controlled | An unrecognized value is accepted (the row does not fail) but derives no tag. |
Response
Section titled “Response”The request was processed. Any rows that failed validation are in failed; every valid row was applied. Counts in summary and the linked/unlinked arrays reflect what was actually persisted.
| Field | Type | Description |
|---|---|---|
summary | object | Counts of what actually happened (matches the arrays below). |
summary.received | integer | Number of rows in the request. |
summary.linked | integer | Wallets newly linked to the firm by this request. |
summary.unlinked | integer | Wallets removed from the firm (only possible in sync mode). |
summary.skipped | integer | Valid rows that produced no new link — the wallet was already linked (its tags may have been refreshed in sync mode), or the row duplicated an earlier one in the same payload. |
summary.failed | integer | Rows that failed validation (see failed[]). |
linked | Array[WalletRef] | The wallets newly linked by this request. |
linked[].address | string | |
linked[].chain | string | |
unlinked | Array[WalletRef] | The wallets removed by this request. |
unlinked[].address | string | |
unlinked[].chain | string | |
failed | Array[WalletImportFailure] | One entry per row that failed validation. |
failed[].index | integer | Zero-based position of the row in the wallets array you sent. |
failed[].address | string | The address the row claimed, or null when the address itself could not be parsed. |
failed[].linked | boolean | Whether this wallet is linked to the firm after the request — answering “did my bad row delete my wallet?”. true: still linked (it was already linked and was kept despite this row failing). false: not linked (the errors prevented linking it). null: the address was unreadable, so there is no wallet to report on. |
failed[].errors | Array[WalletImportError] | Every validation error on this row. |
failed[].errors[].field | string | The row field the error is about. |
failed[].errors[].code | string | - invalid_address — address is empty or not valid for its chain. - unsupported_chain — chain_id is not a supported chain id. - chain_mismatch — blockchain does not match chain_id. - invalid_field — a boolean flag is not a boolean, or control_model is not a string. |
failed[].errors[].message | string | Human-readable explanation. |
400: The request itself is unusable and nothing was written. Causes: invalid JSON;walletsis not an array; more than 5000 rows; an unknownmode;apply_counterpart_tagsis not a boolean; or an emptywalletsarray inaddmode. (A body over 4 MiB is rejected by the server with413before the handler runs.)401: Missing or invalid API key403: The organization lacks access to Firms or this API key does not have wallet import access.404: Resource not found413: The request body exceeds the server limit.
Example Code
Section titled “Example Code”Request
curl -X POST "https://api.compliance.certik.com/organization/firms/example-firm/wallets" \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-API-Secret: YOUR_API_SECRET" \ -H "Content-Type: application/json" \ -d '{ "mode": "add", "wallets": [ { "address": "0xe470a5c333daa8403d9547f5c0ccb5ce300b8dcf", "blockchain": "ethereum", "chain_id": 1, "is_hot_wallet": true, "is_client_asset_wallet": false, "is_omnibus_wallet": false, "control_model": "multi-sig" }, { "address": "0x61193aec68c90f8ad52365ef3973e57f5519e109", "blockchain": "bsc", "chain_id": 56, "is_hot_wallet": false, "is_client_asset_wallet": true, "is_omnibus_wallet": false, "control_model": "mpc" } ]}'Response
{ "summary": { "received": 4, "linked": 1, "unlinked": 1, "skipped": 1, "failed": 1 }, "linked": [ { "address": "0xe470a5c333daa8403d9547f5c0ccb5ce300b8dcf", "chain": "ethereum" } ], "unlinked": [ { "address": "0x61193aec68c90f8ad52365ef3973e57f5519e109", "chain": "bsc" } ], "failed": [ { "index": 2, "address": "0x61193aec68c90f8ad52365ef3973e57f5519e109", "linked": true, "errors": [ { "field": "chain_id", "code": "unsupported_chain", "message": "chain_id 999 is not supported. Supported chain ids: 0, 1, 10, 56, 137, 8453, 9745, 42161, 43114, 59144, 728126428." } ] } ]}