Skip to main content
This page is for the engineer managing customer records from your backend. After reading it you will know how to create a customer before you have their wallet, how to find one again, and which conflicts return 409. The manage sub-module handles customer CRUD operations, search, and wallet linking. All operations are scoped to the instance bound to your API key.

Create a customer

Customers can be created with or without a wallet address. When no wallet is provided, the system generates a referenceKey that you can use to link a wallet later. With a wallet:
Without one. The returned pending.referenceKey looks like ref_a1b2c3d4... and is what you pass to linkWallet once the customer has an address:
Company customers link to individuals through companyId. A companyUrl is normalized to an absolute https URL on the way in:
If the wallet address is already registered on-chain in the IdentityRegistry, the customer status is automatically set to verified.

Search for a customer

The SDK provides typed search methods that map to different lookup strategies. Each returns a single Customer object or throws a TrussetError with code NOT_FOUND. searchByExternalId resolves reliably regardless of ID format or length. searchByName is the exception to the single-result rule: it does a substring match and returns a paginated list on results.customers and results.total.

List customers

list returns customers and total. The search option matches against name, wallet, externalId, referenceKey, and companyUrl in one pass.
number
default:100
Records per page. Range: 1-200.
string
Optional filter. INDIVIDUAL or COMPANY.

Update a customer

Only provided fields are updated. Omitted fields remain unchanged. For customers created without a wallet address, link one using the referenceKey:
The wallet address must not already be assigned to another customer in the same instance. If the address is already verified on-chain, the customer status updates to verified automatically.

Archive a customer

Archiving soft-deletes a customer. Archived customers are excluded from list queries by default.

Manage linked wallets

A customer has one primary wallet and any number of linked wallets. Linked wallets resolve to the same customer in lookups and country checks. A wallet can only belong to one customer per instance. Promoting a linked wallet does not unlink the old one. The previous primary stays linked, labeled “Previously primary”. removeWallet works on linked wallets only, not on the primary.
listWallets returns primary, total, and wallets, where each entry carries address, label, isPrimary, and addedAt. Conflicts return 409 with a specific code: ALREADY_PRIMARY, WALLET_ALREADY_LINKED (same customer), or WALLET_IN_USE (another customer).

Look up countries in bulk

Retrieve country codes for a list of wallet addresses in a single call. Useful for compliance checks across large holder sets.
The result maps address to country code, as in { "0xaaa...": "DE", "0xbbb...": "FR" }. Addresses without a matching customer record are omitted from the result.