Add it in a few lines. Leave it running.
Tokenize at the source with an SDK, or plug in at the log pipeline, the HTTP client and the model endpoint, with no code changes at all.
Pick your language.
import { VaultClient } from "@onshorehq/sdk";
const vault = new VaultClient({
baseUrl: "https://vault.gb.onshorevault.com",
serviceAccountId: process.env.ONSHORE_SA_ID!,
keyId: process.env.ONSHORE_KEY_ID!,
privateKey: process.env.ONSHORE_PRIVATE_KEY!,
});
// Store the ID number. Keep the token.
const [{ token }] = await vault.tokenize("v_live_gb01", [
{ field: "national_id", value: "AB123456C", subject_ref: "cust_1042" },
]);
// A policy decides what comes back.
const [reveal] = await vault.detokenize("v_live_gb01", [token!], "Ticket 88213");
console.log(reveal.decision, reveal.value);Token refresh, batching and retries are handled for you. Detokenize fails closed.
token tok_uk_nino_7Hq2xP9LmA4c reveal masked *******6789
Packages are shared with early access customers and aren’t on public registries yet. The Android and React Native views still need testing on real devices.
See what it finds.
Token refresh
SDKs sign in with an Ed25519 service account key and refresh their own access tokens.
Batching and retries
Large calls split into batches of 500, and retryable failures back off and try again.
Fails closed
If the key service can't be reached, nothing is decrypted, and the error says so.
No secrets in apps
Mobile and web views use single-use client tokens that your server mints.
Signed webhooks
Check an event's signature with a helper, including during a secret rotation.
Clear errors
Stable error codes, and a policy denial names the policy that refused.
Clean any text
POST /v1/detect
{ "text": "Refund to GB82 WEST 1234 5698 7654 32 failed. My NI number is AB 12 34 56 C",
"tokenize": true, "vault": "v_live_gb01" }
200 OK
{ "text": "Refund to tok_iban_Qa81LmZ3Xe0d failed. My NI number is tok_uk_nino_7Hq2xP9LmA4c",
"entities": [
{ "type": "iban", "start": 10, "end": 37, "score": 0.99 },
{ "type": "uk_nino", "start": 62, "end": 75, "score": 0.97 }
] }Errors you can act on
Try it with made-up data.
Tell us your stack, and we'll help you run a first test with the SDK you use.