onshore
Developers

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.

SDKs

Pick your language.

server.ts
import { VaultClient } from "@onshore/sdk";

const vault = new VaultClient({
  baseUrl: "https://vault.onshore.ng",
  serviceAccountId: process.env.ONSHORE_SA_ID!,
  keyId: process.env.ONSHORE_KEY_ID!,
  privateKey: process.env.ONSHORE_PRIVATE_KEY!,
});

// Store the BVN. Keep the token.
const [{ token }] = await vault.tokenize("v_live_ng01", [
  { field: "bvn", value: "22123456789", subject_ref: "cust_1042" },
]);

// A policy decides what comes back.
const [reveal] = await vault.detokenize("v_live_ng01", [token!], "Ticket 88213");
console.log(reveal.decision, reveal.value);
Node.js

Token refresh, batching and retries are handled for you. Detokenize fails closed.

Package
@onshore/sdk
Output
token  tok_bvn_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.

Try detection

See what it finds.

Input
What leaves Nigeria4 found
Good morning. Transfer of tok_amt_tjuYVdE5eg to tok_nuban_Ma53pkMBSA failed. My BVN na tok_bvn_fMmfx0QnU5, email tok_email_LGguq0mZgp
Amount × 1NUBAN × 1BVN × 1Email × 1Runs only in this page, using a simplified preview of detection. Please use made-up data.
What the SDKs handle

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.

The API

Clean any text

POST /v1/detect
{ "text": "Transfer of N250,000 to 0123456789 failed. My BVN na 22123456789",
  "tokenize": true, "vault": "v_live_ng01" }

200 OK
{ "text": "Transfer of tok_amt_9Lk2 to tok_nuban_Qa81LmZ3Xe0d failed. My BVN na tok_bvn_7Hq2xP9LmA4c",
  "entities": [
    { "type": "amount_ngn", "start": 12, "end": 20, "score": 0.93 },
    { "type": "nuban", "start": 24, "end": 34, "score": 0.91 },
    { "type": "bvn", "start": 53, "end": 64, "score": 0.97 }
  ] }

Errors you can act on

403
policy_denied
A policy denied the action
422
validation_failed
The value fails its format check
429
rate_limited
A reveal or request limit was reached
503
key_service_unavailable
The key service can't be reached, so nothing is decrypted

Try it with made-up data.

Tell us your stack, and we'll help you run a first test with the SDK you use.