# Introduction ## Add Footprint to your app Footprint verifies people and businesses, links their bank accounts, stores their sensitive data in a vault your app never has to hold, and gives your team one place to review what needs a human. ### Quick start Pick where to start. Each card opens a guide you can follow end to end. --- # Integration guide This guide takes an integration from an API key to a decision. You vault the data you already hold about a user, run a playbook with `POST /onboardings`, and handle the result, whether the playbook does KYC (Know Your Customer), KYB (Know Your Business), identity document verification, or document collection. Security, compliance, and risk and fraud prevention are built into every onboarding. The overview covers customization, and the appendix covers the advanced APIs for less common integrations. ## Core concepts ### Vault Every user and business in Footprint has a vault that stores identity, financial, document, and custom data. When a user onboards through a Footprint flow, everything collected is stored in that user's vault. A vault holds structured and unstructured data and keeps a versioned history of every change to every field. Footprint applies base-level validation to structured data, such as identity and PCI fields, and otherwise keeps vaulting flexible. Each value is addressed by a vault field name, which the API calls a data identifier; `id.ssn9`, for example, is the user's full SSN. Vault fields carry granular role-based access controls (RBAC) and can be sent to third-party destinations through the Vault Proxy. The full list is in [Vault fields](/articles/vault/fields). ### The "fp\_id" The `fp_id`, also called the Footprint ID, is the unique identifier of a user in Footprint. It appears in API requests and responses and in the dashboard. A business has an `fp_bid` instead. ### The "external\_id" An `external_id` is an identifier you assign to a user or business. It maps records in your system to Footprint without storing the `fp_id`. We strongly recommend a one-to-one mapping between users in your database and users in Footprint. Providing an external ID when you create each user is one way to guarantee it. ### Playbook A playbook defines an onboarding end to end: the information to collect, the verification checks to run, and the rules that turn those checks into a decision. A `playbook_key` is the playbook's unique, publishable identifier; it appears in API requests and responses and in the dashboard. ### Onboarding An onboarding is one run of a playbook for one user or business. Each time a user or business goes through a playbook, Footprint creates a new onboarding. ## Integration overview A user's journey with Footprint starts with POST /onboardings. It runs one of your playbooks against a user or business and returns the result. How much of the flow runs headlessly depends on how much data you have already collected: * **Fully headless.** If your app already collects everything the playbook needs, vault that data and run the onboarding entirely server-side, with no Footprint UI. The decision comes back synchronously inline or asynchronously through webhooks, depending on your settings. * **Interactive.** If information is still missing, the API returns a `continue_onboarding` token and link. Hand them to your frontend so the user can finish the remaining steps in one of two ways: * **Hosted.** A web page hosted by Footprint runs the rest of the onboarding. Send the `link` to the user by email or SMS, or from a button in your app. * **Embedded.** One of the Footprint SDKs for web, iOS, and Android runs the rest of the flow inside your product, launched with the `token`. The flow opens in the device browser and does not load on versions older than those listed under [Browser support](/articles/sdks/javascript-typescript-introduction#browser-support). ### Customization The interactive flow can be customized to different degrees: * **Hosted.** Uses Footprint's default styling. For element-level styling, use the embedded flow. * **Embedded.** The SDK customizes the look and feel of every element, including fonts, colors, and borders, across over 100 appearance attributes. See [Customization](/articles/integrate/customization). ### Identity documents & document collection Footprint treats document collection and verification as a single component. It covers device handoff (continuing on a mobile device when the flow starts on desktop), automatic capture and liveness, document classification, and selfie capture. The customization options extend to the whole document collection and scanning experience. ## The end-to-end integration These are the most common steps to get Footprint running end to end. ### Step 1: Get your secret API key In the [Footprint dashboard](https://dashboard.onefootprint.com/api-keys), click **Create API key** and store the key somewhere safe. ### Step 2: Create a playbook In the [Footprint dashboard](https://dashboard.onefootprint.com/playbooks), create a playbook. It defines what information to collect, which verification checks run, and the rules that turn those checks into a decision. Note its `playbook_key` for step 4. ### Step 3: Create the user and vault their data Create the user with POST /users (or a business with POST /businesses) and write the data you have already collected: ```bash curl -X POST https://api.onefootprint.com/users \ -u : \ -d '{ "id.first_name": "Jane", "id.last_name": "Doe", "id.dob": "1990-01-01", "id.ssn9": "123-45-6789", "id.address_line1": "1 Main St", "id.city": "San Francisco", "id.state": "CA", "id.zip": "94105", "id.country": "US" }' # -> { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" } ``` The response returns the user's `fp_id`. [Vault fields](/articles/vault/fields) lists everything you can vault, and [Migrating user data](/articles/integrate/migrate-existing-data) covers bringing over data you already hold. If you expect the user to provide most of their information in the interactive flow, vault only what you have, or nothing at all. To keep a one-to-one mapping with your own records, pass your identifier in the `x-external-id` header when you create the user. Later API calls can then reference the user by `external_id` instead of a stored `fp_id`. ### Step 4: Run the playbook Call POST /onboardings with the entity and the playbook key. Set `synchronous_timeout_secs` (maximum 30) to wait for the decision and receive it inline: ```bash curl -X POST https://api.onefootprint.com/onboardings \ -u : \ -d '{ "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "key": "", "synchronous_timeout_secs": 30 }' ``` ```json { "id": "ob_SRFT2a1mN7DAWJ0VPXkiqK", "status": "pass", "requires_manual_review": false, "continue_onboarding": null, "error_message": null } ``` Omit `synchronous_timeout_secs` and the call returns immediately with `status: "pending"` while the run continues in the background; the final decision arrives by webhook (step 6). You generally run a playbook asynchronously only when you have already collected everything it needs. It suits slow steps, such as running an agent, that may not finish within the synchronous timeout. For a business, put the `fp_bid` in the `fp_id` field; there is no separate `fp_bid` field. The `key` also accepts a version tag (`pb_live_xxx:v3`) to run a specific playbook version, though we recommend deploying the version you want from the dashboard rather than pinning it in code. A KYB playbook that also verifies its beneficial owners can't run here: the owners have to complete their own KYC, which this API can't prompt for. Run those playbooks through an onboarding session instead. **Step 4(a). Optional configuration.** The request also takes these optional fields: | Attribute | Description | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `external_id` | Reference the user or business by your own identifier instead of `fp_id`. This is the same `external_id` set when the entity was created. Cannot be provided alongside `fp_id`. | | `onboarding_external_id` | Use to control onboarding idempotency and to associate an onboarding with an event in your application (for example, an account application ID). If an onboarding with this ID already exists on the playbook, its result is reused and returned. If not, a new onboarding is created and the entity re-onboards. | | `synchronous_timeout_secs` | Wait up to this many seconds (maximum 30) for the run to finish and return the decision inline. Omit to run asynchronously. | | `prerequisite_data` | If your playbook requires additional information from your backend, configure a prerequisite node on the playbook and pass that data here. Only accepted when the playbook has a prerequisite node. | By default, an entity onboards onto a playbook once, which protects you from accidental charges for repeat onboardings. Running `POST /onboardings` again without a new `onboarding_external_id` returns a `409` with the error "Already onboarded onto playbook". [Run a playbook](/articles/integrate/onboardings) is the full reference for `POST /onboardings`, including reonboarding patterns, KYB, and passing onboarding data. ### Step 5: Handle the decision Your playbook's rules evaluate the user or business and decide whether to flag it for manual review. Use `status` and `requires_manual_review` in the response to decide whether to onboard the user into your product. | Status | Meaning | | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pass` / `fail` / `none` | An action node in your playbook executed and set the user's status. Conventionally, these are the output of rules that you define. | | `pending` | Either you ran asynchronously, or the playbook took longer than `synchronous_timeout_secs` to execute. Certain steps of a playbook, like agents or verification checks, may take longer. The final decision is delivered via [webhooks](/articles/integrate/webhooks). | | `incomplete` | The onboarding could not finish headlessly because more information is needed from the user. Use `continue_onboarding` to let them finish (see below). | | `error` | The run failed due to logic configured on your playbook. See `error_message`. | | `requires_manual_review` | Meaning | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | False | Your playbook's rules have made a decision automatically. | | True | Your playbook's rules have requested that this user is reviewed manually before onboarding, or the user's previous onboarding status caused the review flag to remain enabled. | If Footprint still needs information from the user (for example, your playbook collects a field you didn't vault, or requires an identity document), the status is `incomplete` and the response carries a `continue_onboarding` object: ```json { "id": "ob_SRFT2a1mN7DAWJ0VPXkiqK", "status": "incomplete", "requires_manual_review": false, "error_message": null, "continue_onboarding": { "token": "obtok_xxx", "link": "https://verify.onefootprint.com/?type=user#obtok_xxx", "expires_at": "2025-05-08T12:00-07:00" } } ``` The token resumes this exact onboarding: the user picks up where the headless run stopped, and the completed run keeps the same `id`. Treat the token as a secret and use it before `expires_at`, 12 hours after the call unless you [set `token_ttl_min`](/articles/integrate/onboardings#request-options-link-expiration). Hand it to your frontend and let the user finish the remaining steps with either launch option below. **Step 5(a). Finish via hosted.** Extract the `link` and deliver it to the user by email or SMS, or from a button in your app. **Step 5(b). Finish via embedded.** Extract the `token` and launch Footprint with one of the SDKs. Install the SDK first: web (JS/TS/React/Vue/Angular) with `npm install @onefootprint/footprint-js`; iOS with [Swift Package Manager](/articles/sdks/swift-introduction#installation-swift-package-manager) or [Cocoa Pods](/articles/sdks/swift-introduction#installation-cocoa-pods); Android as in the [installation instructions](/articles/sdks/android-introduction#installation). Then launch with the token: ```tsx filename="Web (React)" import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const App = () => { const launch = () => { onboarding.initialize({ // replace with `continue_onboarding.token` from the api response onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log("completed", onboardingId); }, }); }; return ; }; ``` ```swift filename="iOS (Swift UI)" import SwiftUI import Footprint struct ContentView: View { var body: some View { Button("Verify Identity") { Onboarding.initialize( // replace with `continue_onboarding.token` from the api response onboardingSessionToken: "obtok_xxx", onComplete: { result in print("Onboarding completed with ID: \(result.onboardingId)") }, onCancel: { print("The user canceled the flow") }, onError: { error in print("Error occurred: \(error.message)") } ) } } } ``` ```kotlin filename="Android (Kotlin)" class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { Column { val coroutineScope = rememberCoroutineScope() Button(onClick = { coroutineScope.launch { try { Footprint.initialize( // replace with `continue_onboarding.token` from the api response authToken = "obtok_xxx", context = this@MainActivity ) FootprintHosted.launchHosted( context = this@MainActivity, onComplete = { result -> println("VerificationResult: the flow has completed. The onboarding ID is ${result.onboardingId}") }, onCancel = { println("VerificationResult: the flow was canceled") }, onError = { error -> println("Footprint error occurred: ${error}") } ) } catch (e: FootprintException) { println("Error initializing Footprint SDK: ${e.message}") } } }) { Text("Verify identity") } } } } } ``` When the user finishes the remaining steps, the SDK calls `onComplete`. The JavaScript SDK from 7.0.0, the Expo and React Native SDKs from 4.0.0, the Android SDK from 2.0.0, the iOS SDK from 3.0.0 and the Flutter SDK from 3.0.0 pass it the `onboardingId`, the same `id` step 4 returned. Fetch the onboarding to get its state immediately (step 5c). The final decision also arrives by webhook (step 6), and you can fetch it again at any time with the onboarding `id` from step 4. #### Step 5c: Read the decision This step applies only to the embedded SDK. If you use the hosted page, skip to step 6. Once the SDK's `onComplete` handler fires, read the result with GET /onboardings/{id}, using the onboarding `id` from step 4: ```bash curl https://api.onefootprint.com/onboardings/ \ -u : ``` The response comes back in the same shape as the one that created the run in step 4: ```json { "id": "ob_SRFT2a1mN7DAWJ0VPXkiqK", "status": "pass", "requires_manual_review": false, "error_message": null, "continue_onboarding": null } ``` It is safe to fetch an onboarding as often as you like. A `pending` run is still executing, so poll it until it reaches a decision or wait for the webhook in step 6. ### Step 6: Listen to webhooks Footprint delivers every onboarding's decision by webhook when it reaches a terminal status. For asynchronous runs, and for synchronous runs that returned `pending`, webhooks are how you receive the final result. **Step 6(a). Subscribe a webhook endpoint.** Register your webhook endpoints in the [Footprint dashboard](https://dashboard.onefootprint.com/webhooks). Footprint then pushes event data to them in real time as events happen. The Svix [guide to consuming webhooks](https://docs.svix.com/receiving/introduction) covers the receiving side. We recommend verifying that every webhook request comes from Footprint; the Svix guide to [verifying webhook signatures](https://docs.svix.com/receiving/verifying-payloads/how) shows how. **Step 6(b). Recommended events.** For the core integration, subscribe to these three event types. * **Onboarding completed.** footprint.onboarding.completed fires when an onboarding reaches a terminal status. A synchronous `POST /onboardings` call usually returns a terminal `pass`, `fail`, or `none` [decision](#the-end-to-end-integration-step-5-handle-the-decision) inline; this event delivers the final decision when you run an onboarding asynchronously or when identity verification vendors take longer to verify a user. * **Manual review.** A member of your team may change a user's status during manual review in the Footprint dashboard, which fires footprint.user.manual\_review. When you receive it, call GET /users/{fp_id} for the user's new manual status. * **Watchlist checks.** If your playbook has continuous monitoring enabled, Footprint regularly checks whether any of your users appear on AML watchlists and sends the results as footprint.watchlist\_check.completed. ## Appendix ### Advanced integration options Everything below is optional and suits less common uses of Footprint. Some of these APIs are gated; contact Footprint if one you need is not enabled on your account. ### Use the API to fetching onboardings, PII, decisions, risk signals, documents, and more In more advanced integrations, you may want to process detailed verification data and results from Footprint instead of only viewing them in the dashboard, for example to embed results in your application. A seller marketplace might pass risk signals to the seller who verifies a buyer for large transactions. **The onboarding object.** Each time a user or business onboards onto a playbook, Footprint generates an onboarding with a unique ID, often referenced as `onboarding_id`. Use it to fetch the risk signals, decisions, documents, and collected data of that specific onboarding. An onboarding ID also lets you track the user as they update their data over time. You receive onboarding IDs in two main places: 1. The `id` field of the POST /onboardings response. 2. The webhook sent when an onboarding is completed. List a user's or business's onboardings with GET /users/{fp_id}/onboardings and GET /businesses/{fp_bid}/onboardings. **Fetch risk signals, collected data, and documents by onboarding ID.** With an `onboarding_id`, call GET /users/{fp_id}/onboardings/{onboarding_id}/risk\_signals and GET /users/{fp_id}/documents?onboarding\_id=ob\_xyz.. to fetch that onboarding's risk signals and captured documents. **Fetch decisions.** For a user or business, fetch every decision, including manual review decisions made with a human in the loop, with the [list all decisions](/api-reference#get-users-fp-id-decisions) API. The response looks like: ```json { "data": [ { "kind": "playbook_run", "playbook_key": "pb_test_xxxxx", "status": "fail", "timestamp": "2022-01-04T12:00-07:00" }, { "kind": "manual", "status": "pass", "timestamp": "2022-01-04T12:00-07:00" } ], "meta": { "next_page": 2 } } ``` **Decrypt PII and documents from the vault at a specific onboarding.** Vault access is governed by granular access controls. Use the [decrypt API](/api-reference#post-users-fp-id-vault-decrypt) to read plaintext user or business data: ```bash curl -X POST https://api.onefootprint.com/users/{fp_id}/vault/decrypt \ -u : \ -d '{ "fields": [ "id.ssn9", "id.last_name", "document.passport.front.image", "document.passport.dob" ], "reason": "compliance", "at_onboarding_id": "ob_id_xyz..." }' ``` Set `at_onboarding_id` to decrypt the user's data as it was at the time of that onboarding. ### Linking users to businesses via API If you run KYB playbooks without verifying beneficial owners together with the business, you can still link users to their businesses, and businesses to their users, so the connection shows in the API and in the Footprint dashboard. After onboarding both the business and the users, call the [link a business owner](/api-reference#post-businesses-fp-bid-owners) API. --- # Sandbox mode Sandbox mode tests your integration without contacting live identity verification vendors or incurring their cost. It simulates creating real records; no live vendor is consulted. Toggle between live and sandbox mode in the dashboard. Each mode has its own API keys, playbooks, and users. To run real KYC (Know Your Customer) and KYB (Know Your Business) verifications, contact Footprint to activate your account. ## Sandbox IDs In live mode, users are generally unique by phone number. In sandbox mode, two users can share a phone number as long as their sandbox IDs differ, so you can create several test users with the same login credentials. To test a returning user logging back into your app, provide an existing user's login credentials and sandbox ID. An existing user's sandbox ID is on their detail page in the dashboard. ## Mock outcomes When you test KYC and KYB in sandbox mode, Footprint doesn't contact live verification vendors. Instead, after onboarding onto the playbook, you choose how the verification step resolves: * **Emulate an outcome.** Pick a mock outcome such as **Success**, **Fail**, **Manual review**, or **Step up**. Footprint applies it directly and short-circuits your playbook's rules, which suits landing a user in a specific state. * **Evaluate rules.** Run your playbook's rules as normal against a set of mocked risk signals you select. Use this to test the rules themselves: the rules engine evaluates the mocked signals and produces the resulting outcome. For example, emulate a manual review to land in that state directly, or evaluate rules with a watchlist hit raised to confirm your rules route the user the way you expect. ## Fixture contact info Receiving one-time passcodes (OTPs) on your own phone or email gets tedious while testing onboarding flows, so Footprint provides fixture phone numbers and emails for logging into sandbox users. | Type | Fixture contact info | Fixture OTP | | ----- | ---------------------------------------------------------------------------------- | ----------- | | Phone | `+1 (555) 555-0100` or `+1 (555) 555-0111` | `000000` | | Email | `sandbox@onefootprint.com` or any `@example.com` address, like `piip@example.com`. | `000000` | Fixture contact info is valid only in sandbox mode; don't use it in live mode. ## Next steps * The [Integration guide](/articles/guide/definitive-integration-guide) walks through the full integration, from API key to decision. --- # Introduction An onboarding is one run of a playbook for one user or business. The playbook says what data to collect, which verification checks to run, and how to decide the outcome. The onboarding is the record of that run: the data that landed in the vault, the checks, the decision, and the status your team sees in the dashboard. ## What it does * **Playbooks.** You build the flow in the Playbook builder from nodes that collect data and documents, run verification checks, branch, apply rules, and act on the result. KYC (Know Your Customer) playbooks onboard people; KYB (Know Your Business) playbooks onboard businesses and their beneficial owners. * **Three ways to run one.** Embed the flow in your app with an SDK, send the user a link to the hosted flow, or call `POST /onboardings` from your backend to run a playbook on data already in the vault. An onboarding session lets your backend start the flow for a specific user, with data filled in ahead. * **What comes back.** The onboarding's status and decision, the risk signals behind it, any custom status your rules set, and a webhook when the onboarding completes. ## Where to go next [Building playbooks](/articles/guides/playbooks-building-playbooks) is the concept to read first, with [Playbook rules](/articles/guides/playbooks-playbook-rules) for the language the Rules node speaks and [Custom statuses](/articles/guides/custom-statuses) for the states your team defines. To run one, start at [Run a playbook](/articles/integrate/onboardings), then [Onboarding sessions](/articles/integrate/onboarding-sessions) when your backend should start the flow, [Bootstrap data](/articles/integrate/bootstrap-data) when you already hold some of the user's data, and [No-code integration](/articles/integrate/no-code) when a link is all you need. --- # Building playbooks A playbook defines how Footprint onboards a user or business: what data to collect, which verification checks to run, and how to decide the final outcome. You build a playbook visually in the [Playbook builder](https://dashboard.onefootprint.com/playbooks) by connecting nodes into a flow. This article walks through creating a playbook and the nodes available to you. For the rules language used by **Rules** nodes, see [Playbook rules](/articles/guides/playbooks-playbook-rules). ## Key concepts A few concepts make the rest of this article easier to follow: * **Directed acyclic graph (DAG).** A playbook is a DAG with a single start node. Control flows from one node to the next and never loops back. Branching nodes split the flow into multiple paths, which merge back together so the flow can continue to a shared decision. * **Collection nodes vs. decisioning nodes.** Collection nodes (identity data, business data, custom data, documents) are user-facing: they pause the flow to gather input from the user. Decisioning nodes (verification checks, rules, branches, external API, expression, agent, and action nodes) run on Footprint's backend and show nothing to the user. * **Vault data (`vault.*`).** Durable, encrypted attributes stored in the user's or business's [vault](/articles/vault/fields), such as `vault.id.first_name`. * **Onboarding data (`data.*`).** Ephemeral values computed during a single onboarding run (by expression, rules, external API, and agent nodes) and made available to later nodes under the `data.*` prefix. Onboarding data is scoped to that onboarding and is not written to the vault unless you explicitly copy it there with a [Data assignment](#data-assignment) node. ## Creating a playbook From the [**Playbooks**](https://dashboard.onefootprint.com/playbooks) page in the dashboard, click **Create** and choose a starting point: * **A template.** A ready-to-use flow, such as KYC (Know Your Customer) or KYB (Know Your Business), pre-wired with data collection, verification checks, and rules. This is the fastest way to start. * **Onboard users.** A blank person (KYC) playbook. * **Onboard businesses.** A blank business (KYB) playbook. Give the playbook a name and click **Create playbook** to open it in the builder. When the flow is ready, publish it to start onboarding against it. ## The playbook graph A playbook is a directed acyclic graph (DAG). It has a single starting node and flows sequentially from top to bottom, ending at **Onboarding complete**. Each node runs in order, passing the user along to the next node, and some nodes execute logic to control branching. To add a node, click the **+** between any two nodes to open the **Add node** dialog. Nodes are grouped into tabs so you can browse by purpose: **Recipes**, **Data**, **Documents**, **Decision**, **Advanced**, and **AI nodes**. Branching nodes fan the flow out into multiple paths; those paths merge back together so the flow can continue to a shared decision. In [sandbox mode](/articles/guides/sandbox-mode), verification checks don't contact real vendors. By default a mock outcome (Pass, Fail, Manual review, etc.) is chosen and branching is short-circuited to match it. Select **Evaluate rules** to run your playbook's rules engine normally against the mocked risk signals you choose. ## Collecting data and documents Most playbooks begin by collecting data and documents from the user. These user-facing nodes pause the onboarding flow to gather input: * **Identity data.** Collect identity data (name, date of birth, SSN, address, etc.) from the user. * **Business data.** Collect business data from the user, for KYB playbooks. * **Custom data.** Configure a page of custom prompts to collect arbitrary data from the user. * **ID document.** Collect and verify a government-issued identity document from the user, such as a driver's license or passport. * **Custom document.** Configure a custom document to be collected from the user. Additional collection nodes are available for investor profiles, card data, and proof-of-address or proof-of-SSN documents. ## Branching Branching nodes split the onboarding into different paths so you can tailor the flow per user. There are two ways to branch: * **Rules.** Express decisioning logic as CEL expressions over risk signals, vaulted data, and onboarding data. Rules are grouped, each group produces an outcome value, groups are evaluated in order, and the first match wins (falling back to a required default value). This is the most flexible option and is covered in detail in [Playbook rules](/articles/guides/playbooks-playbook-rules). * **Branch.** A simpler match on a single piece of collected data. You pick a variable (e.g. `id.country`), then define cases with operators such as `=`, `!=`, `>`, `in`, and `not in`, plus a **default branch** for anything that doesn't match. A common use case is splitting U.S. and international users into different document or verification requirements, or sending higher-risk users down a path with nodes configured to satisfy Enhanced Due Diligence (EDD) requirements. ## Verification checks A **Verification checks** node runs one or more checks against the data collected so far and produces risk signals that downstream **Rules** nodes can act on. Available checks: * **Know your customer (US KYC).** Verifies collected identity data against government databases, credit bureaus, and other official sources. * **Know your business (KYB).** Verifies a business via Middesk or Baselayer, either as a full KYB check or TIN (EIN) verification only. * **Anti-money laundering (AML).** Screens against OFAC, PEP, and adverse media lists, with configurable fuzzy/exact matching and optional ongoing monthly screening. * **Fraud.** Synthetic fraud detection with SentiLink. Some checks require specific data to be collected first (e.g. TIN for KYB, phone + SSN for certain KYC checks), so place verification checks after the relevant data collection nodes. ## External API nodes An **External API** node calls an external service during onboarding to verify or enrich user data. You can configure it two ways: * **Vault proxy.** Call your own API through a [Vault Proxy](/articles/vault/proxy) configuration, so request and response bodies can reference vaulted data. * **Managed integration.** Dispatch to a Footprint-managed vendor integration. You define the request (method, base URL, headers, query params) and map fields from the response back into onboarding data using JSONPath, or capture the entire body. You can require a successful `2xx` status code and supply a mock response for sandbox testing. The captured values become available to later nodes as `data.*` variables. ## Data assignment A **Data assignment** node stores or assigns data into a user's vault at runtime. Each assignment maps a **source** to a **destination** vault field. The source is a templated string, so you can combine literal text with `{{ }}` variables: for example, copying `{{ data.computed_value }}` into `vault.id.ssn9`, or building a note from multiple fields. Use it to persist computed values, normalize data, or backfill vault fields based on what happened earlier in the flow. ## Expression nodes An **Expression** node runs one or more [CEL (Common Expression Language)](https://github.com/google/cel-spec) expressions and stores each result in an onboarding data key for later nodes to use. Each expression has an **Assign to** key and an expression body. For example: ```js filename="Expression" data.risk_score > 20 && vault.id.country != "US" ? "block" : "accept" ``` assigned to `txn_decision` lets a downstream **Rules** or **Branch** node act on `data.txn_decision`. CEL supports comparisons, ternaries, string operations, list membership, and JSON parsing, which is useful for computing intermediate values that don't come directly from a verification check. Press `CTRL + SPACE` in the editor to see available variables. ## Action nodes An **Action** node applies one or more side effects to the user or business; it doesn't collect data. Place action nodes after your rules to carry out the decision. Available actions: * **Set decision.** Set the onboarding outcome to **Pass**, **Fail**, or **None**. * **Manual review.** Flag the onboarding for a reviewer, with a reason (e.g. rule triggered, document needs review). * **Set status.** Apply a [custom status](/articles/guides/custom-statuses) defined in your organization settings. * **Tag.** Add one or more tags to the user's profile (separate multiple tags with `;`). * **Note.** Add a note to the profile, with support for `{{ }}` dynamic fields. A single **Action** node can carry multiple actions, so you can, for example, set a decision and add a tag at the same time. ## Agent nodes Agent nodes run a Percy agent as a step in your playbook, for example to review watchlist hits, screen adverse media, or research a business, and return a structured decision the rest of the flow can use. To add one, open the **Add node** dialog, go to the **AI nodes** tab, and choose **Agent**. Select the new node to open its sidebar, then pick the agent and the agent version it should run. An agent must have a released version to be selectable, and its latest release is chosen by default. Configure the node by providing **Input data**: key/value pairs that feed the agent, using template variables such as `{{ vault.id.first_name }}` to pass in vaulted data. When the agent runs, its structured output is written back to onboarding data so downstream **Rules**, **Branch**, or **Action** nodes can act on the agent's conclusion. Agent nodes pin to a specific released version of an agent, so a playbook's behavior doesn't change when you iterate on the agent. Update the node to a newer version when you're ready to roll out changes. --- # Playbook rules Rules decide the outcome of an onboarding from the risk signals and data collected along the way, so decisioning fits your own risk model. A **Rules** node holds groups of rules written as [CEL (Common Expression Language)](https://github.com/google/cel-spec) expressions and writes an outcome value that the rest of the playbook acts on. When you create a playbook from a template, its **Rules** nodes come preloaded with a default set of rules. You can keep that set or customize it in the rules editor. ## Rule evaluation Rules express your custom logic for risk decisioning or data collection. For example, rules can: * Assign final user statuses based on different risk signals. * Split an onboarding flow based on user attributes (e.g. different onboarding flows for U.S. and international users). * Define Enhanced Due Diligence (EDD) or step-up flows. A **Rules** node sets an outcome value based on the data and risk signals available during onboarding. Rules are organized into groups, where each group has a value and a set of associated rules. Groups are evaluated in the order they are displayed (top to bottom), and a group matches if any of its rules evaluates to `true`. The first matching group's value is used, and the result is written to an onboarding data key (e.g. `data.kyc_outcome`) that the rest of the playbook can act on. If no group matches, the default value is used. A default value is required and is always displayed last. ## Rules as CEL expressions Rules are expressions written in [CEL (Common Expression Language)](https://github.com/google/cel-spec), a type-safe language from Google, that evaluate during onboarding to either `true` or `false`. They are composed of input features, comparison expressions, and boolean operators. Input features have the format `.`. There are three namespaces: * `risk_signal`: risk signals derived from verification checks. * `vault`: data vaulted during onboarding. * `data`: values computed earlier in the onboarding flow (for example, by an upstream rules or expression node). Each namespace holds a number of features, for example `risk_signal.watchlist_hit_ofac`, `vault.id.country`, and `data.charge_risk_score`. The rules editor suggests available features as you type. Press `CTRL + SPACE` to see the variables available in the current scope. ### Risk signal expressions Input features in the `risk_signal` namespace are booleans (`true` or `false`) that say whether a verification check triggered that risk signal. The simplest rule is therefore a single risk signal: ```js filename="Rule" risk_signal.watchlist_hit_ofac ``` This rule evaluates to `true` if the verification checks yielded this risk signal. The `!` operator negates a risk signal, so the following evaluates to `true` if the verification checks did not yield this risk signal: ```js filename="Rule" !risk_signal.watchlist_hit_ofac ``` The complete list of risk signals is in the [Risk Signal Glossary](https://dashboard.onefootprint.com/home?rsg=open). ### Vault data expressions Input features in the `vault` namespace are strings. They map one-to-one to the [vault fields](https://docs.onefootprint.com/articles/vault/fields): `id.zip` is available to rules as `vault.id.zip`, and `business.country` as `vault.business.country`. Since rules are boolean expressions and vault data features are strings, a vault data feature must be compared to a specific value. CEL uses `==` for equality: ```js filename="Rule" vault.id.country == "US" ``` This evaluates to `true` if the country entered during onboarding is `US`. Vault data also supports inequality checks with the `!=` operator: ```js filename="Rule" vault.id.country != "CA" ``` You can also check membership in a list with the `in` operator: ```js filename="Rule" vault.id.country in ["US", "CA", "MX"] ``` ### Compound rule expressions Expressions can be combined with the logical operators `!` (not), `&&` (and), and `||` (or), and grouped with parentheses to express more complex conditions. For example: ```js filename="Rule" risk_signal.device_high_risk && (!risk_signal.attested_device_apple || vault.id.country != "US") ``` The `&&` operator takes precedence over the `||` operator, and the `!` operator has the highest precedence. Take this rule without parentheses: ```js filename="Rule" !risk_signal.attested_device_apple || vault.id.country != "US" && !risk_signal.device_high_risk ``` Formatted with parentheses to clarify the order of operations, the rule above is equivalent to: ```js filename="Rule" (!risk_signal.attested_device_apple) || ( vault.id.country != "US" && (!risk_signal.device_high_risk) ) ``` Because CEL is a full expression language, rules can also use ternaries (`? :`), string functions, and helpers such as `size(...)` when you need them. ## Best practices To keep your rules easy to understand, split top-level `||` expressions into multiple rules within the same group. Take this compound rule: ```js filename="Rule" !risk_signal.document_ocr_name_matches || !risk_signal.document_selfie_matches ``` It can be split into two rules in the same group: ```js filename="Rule" !risk_signal.document_ocr_name_matches ``` ```js filename="Rule" !risk_signal.document_selfie_matches ``` Since a group matches if any one of its rules matches, the two forms express the same logic. ## Next steps [Building playbooks](/articles/guides/playbooks-building-playbooks) shows where **Rules** nodes sit in a playbook and the other nodes they work with. --- # Custom statuses Custom statuses model long-lived, domain-specific state for users and businesses in Footprint. They give you an auditable way to represent concepts such as verification levels, compliance states, or your own classifications, without inferring state from playbook runs or decisions. ## How custom statuses work Custom statuses are enumerations you define, attached to an entity (user or business). Each custom status: * Has a kind (for example, `id_verification_status`). * Holds one value at a time (such as `verified`, `pending`, or `rejected`), or is unset. * Is fully auditable: Footprint keeps an append-only log of all changes. * Is independent of playbooks, decisions, and signals. **State, not events.** Custom statuses represent the current state of an entity. Unlike playbook outcomes or decisions, which are event-based, statuses persist over time. They suit tracking verification levels, eligibility, or compliance posture. **Strongly typed and predefined.** You define statuses in the dashboard before use, and each status has a fixed set of allowed values. This prevents typos and enforces consistency across systems. **Append-only semantics.** Statuses can be set, updated, or cleared. Every change is recorded with a timestamp and actor, and previous values are never overwritten in the audit log. ## Example use cases **Verification layers.** Model verification state that aggregates multiple checks, where the status represents the result of several underlying signals or playbooks: * `identity_verification_status`: `pending`, `verified`, `rejected` * `tax_verification_status`: `pending`, `verified`, `rejected` **Compliance states.** Track regulatory or risk-related classifications: * `kyc_status`: `pending`, `verified`, `rejected` * `aml_status`: `clear`, `flagged`, `reviewed` **Application-specific concepts.** Represent concepts specific to your app: * `account_tier`: `basic`, `premium`, `enterprise` * `risk_level`: `low`, `medium`, `high` ## Creating custom statuses You define custom statuses once, in the [dashboard](https://dashboard.onefootprint.com/settings/statuses), and reuse them across playbooks and manual reviews. A status must exist before a playbook can use it. When creating a status, you define: * The **status kind** (e.g. `id_verification_status`). * The **entity type** it applies to (`user` or `business`). * The set of **allowed values** for the status. ## Setting statuses ### Setting a status in a playbook Playbooks are the primary way to set custom statuses automatically. To set a status from a playbook: 1. Add an **Action** node in the **Playbook builder**. 2. Select **Set status**. 3. Choose the status kind and value. When the node runs during an onboarding, Footprint updates the entity's status. ### Updating a status manually You can also set or clear a custom status from the **Users** or **Businesses** pages in the dashboard, or from the manual review view, which lets you override automated outcomes. ## API access Entity detail endpoints return custom statuses. See the [User](/api-reference#get-users-fp-id) or [Business](/api-reference#get-businesses-fp-bid) API reference. --- # Run a playbook The POST /onboardings API runs one of your playbooks on a user or business. You call it from your backend. The playbook executes as far as it can with the data already in the entity's vault, and the response carries either the decision or a `continue_onboarding` token that lets the user finish the remaining steps in a Footprint flow. The same call covers both integration shapes: * **Fully headless.** Your app already has all the data the playbook needs. Vault it, run the onboarding, and receive the decision with no Footprint UI. * **Finish in a Footprint flow.** You expect to collect information from the user or verify documents. The run returns a `continue_onboarding` token: pass it to one of the Footprint frontend SDKs, or send the user the hosted link, and they complete the rest. [The Integration Guide](/articles/guide/definitive-integration-guide) walks through the full integration step by step. ## Quick start Create the user with POST /users (or a business with POST /businesses) and vault the data you have already collected. Both are server-side APIs authenticated with your [secret API key](https://dashboard.onefootprint.com/api-keys); never send the key to the client. ```bash curl -X POST https://api.onefootprint.com/users \ -u : \ -d '{ "id.first_name": "Jane", "id.last_name": "Doe", "id.dob": "1990-01-01", "id.ssn9": "123-45-6789", "id.address_line1": "1 Main St", "id.city": "San Francisco", "id.state": "CA", "id.zip": "94105", "id.country": "US" }' ``` [Vault fields](/articles/vault/fields) lists every attribute you can vault, and [Migrating user data](/articles/integrate/migrate-existing-data) covers bringing over data you already hold. If you expect the user to provide most of their information in the interactive flow, vault only what you have, or nothing at all. Then run a [playbook](https://dashboard.onefootprint.com/playbooks) on the user. Set `synchronous_timeout_secs` (max 30) to wait for the decision and receive it inline: ```bash curl -X POST https://api.onefootprint.com/onboardings \ -u : \ -d '{ "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "key": "", "synchronous_timeout_secs": 30 }' ``` ```json { "id": "ob_SRFT2a1mN7DAWJ0VPXkiqK", "status": "pass", "requires_manual_review": false, "continue_onboarding": null, "error_message": null, "output": null } ``` Not every run finishes inline with a decision like this one. [Processing the response](#processing-the-response) covers the `pending` and `incomplete` statuses. ## Request options Beyond the entity and the playbook key, the request accepts these options. ### Synchronous vs. asynchronous * **Synchronous.** Set `synchronous_timeout_secs` (max 30). The call waits for the run to finish and returns the decision inline. If the playbook does not finish before the timeout, the response is `pending`, execution continues in the background, and the decision arrives by webhook. * **Asynchronous.** Omit it. The call returns immediately with `status: "pending"`, the run executes in the background, and the decision arrives through the `footprint.onboarding.completed` webhook; see [Webhooks](/articles/integrate/webhooks). Asynchronous runs suit slow steps, such as an agent, that may not finish within the synchronous timeout. Only synchronous runs return `continue_onboarding`. Run synchronously whenever the user may need to finish the flow interactively. For an asynchronous run, [fetch the onboarding](#fetching-an-onboarding-later) once it stops to wait on the user, and pick up the token there. ### Link expiration The `continue_onboarding` token and link expire 12 hours after the call by default. To send a link that stays valid longer, for example in an email the user may open days later, set `token_ttl_min` to the lifetime in minutes, up to 7 days (`10080`): ```bash curl -X POST https://api.onefootprint.com/onboardings \ -u : \ -d '{ "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "key": "", "synchronous_timeout_secs": 30, "token_ttl_min": 10080 }' ``` `token_ttl_min` applies to every link for this onboarding: the one this call returns and each one you get later by [fetching the onboarding](#fetching-an-onboarding-later), including for asynchronous runs. A repeat call that returns an existing onboarding keeps the value it was created with. Each link keeps the expiry it was issued with. ### External ID If the user you created above has an external ID, pass `external_id` instead of `fp_id`. To keep a one-to-one mapping with your own records, set one by sending your identifier in the `x-external-id` header when you create the entity. ### Reonboarding and idempotency By default, an entity onboards onto a playbook once. This protects you from accidental charges for repeat onboardings: a second POST /onboardings for the same entity and playbook returns a `409` error. `onboarding_external_id` gives you control over this behavior and associates an onboarding with an event in your application. If the entity already has an onboarding with the provided `onboarding_external_id`, that onboarding's result is returned without re-running anything. If not, a new onboarding is created and the entity reonboards. For example, to have your users reonboard every time they fill out a new account application in your product, provide the application's identifier: ```bash curl -X POST https://api.onefootprint.com/onboardings \ -u : \ -d '{ "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "key": "", "onboarding_external_id": "bc13ca5b-210f-49af-9aba-e98db366484a", "synchronous_timeout_secs": 30 }' ``` To let users reonboard onto the same playbook once a month, derive `onboarding_external_id` from the current month, such as `onboarding-2026-07`. We recommend choosing a value that implies some limit on how frequently an entity can reonboard, since you are responsible for the charges each reonboard incurs. External IDs may only include alphanumeric characters, `_`, `-`, or `.` and must be between 10 and 256 characters. ### Passing onboarding data If the playbook needs context from your backend, such as details of the transaction that triggered the onboarding, add a prerequisite node to the playbook and pass the data as `prerequisite_data`: ```bash curl -X POST https://api.onefootprint.com/onboardings \ -u : \ -d '{ "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "key": "", "prerequisite_data": { "transaction_amount": 1000 }, "synchronous_timeout_secs": 30 }' ``` The data is available in template contexts and branch nodes under the `data.` prefix, for example `data.transaction_amount`. `prerequisite_data` is only accepted when the playbook has a prerequisite node. ### Passing documents as onboarding data You can also hand a playbook a document: upload it to the user's vault under a document vault field (a data identifier in the API), then pass that field's name to the playbook as onboarding data. The playbook needs a prerequisite node that accepts a document onboarding data type, and during the onboarding the document field name is stored under the `data.` prefix. For example, to verify an identity document you have already collected and skip the document collection step in your playbook, first upload each side of the document under a document vault field, for the same `fp_id` you pass to `POST /onboardings`: ```bash curl -X POST https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/vault/document.drivers_license.front.image/upload \ -u : \ -H "Content-Type: image/jpeg" \ --data-binary @drivers-license-front.jpg curl -X POST https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/vault/document.drivers_license.back.image/upload \ -u : \ -H "Content-Type: image/jpeg" \ --data-binary @drivers-license-back.jpg ``` The upload API is POST /users/{fp_id}/vault/{identifier}/upload. When you run the playbook, pass the field names you uploaded to as `prerequisite_data`: ```bash curl -X POST https://api.onefootprint.com/onboardings \ -u : \ -d '{ "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "key": "", "prerequisite_data": { "id_front": "document.custom.id_front", "id_back": "document.custom.id_back" }, "synchronous_timeout_secs": 30 }' ``` ## Processing the response Every run returns the same fields: | Field | Description | | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | The onboarding's unique identifier. Use it to [fetch this run later](#fetching-an-onboarding-later), and to fetch its details, risk signals, and documents. | | `status` | The outcome of the run; see [Statuses](#processing-the-response-statuses). | | `requires_manual_review` | Whether the entity has an open manual review after the run. | | `error_message` | Present only when the run failed due to logic configured on your playbook. | | `continue_onboarding` | Present only when the run is `incomplete`: a `token`, a `link`, and `expires_at`. | | `output` | The values declared by your playbook's output node, once the run reaches it; see [Playbook output](#processing-the-response-playbook-output). | ### Finish in a Footprint flow When the playbook needs something only the user can provide, such as a collected field that is not vaulted or an identity document, the run stops with `status: "incomplete"` and a `continue_onboarding` object: ```json { "id": "ob_SRFT2a1mN7DAWJ0VPXkiqK", "status": "incomplete", "requires_manual_review": false, "error_message": null, "output": null, "continue_onboarding": { "token": "obtok_xxx", "link": "https://verify.onefootprint.com/?type=user#obtok_xxx", "expires_at": "2026-07-17T12:00-07:00" } } ``` The token resumes this exact onboarding: the user picks up where the headless run stopped, and the completed run keeps the same `id`. Treat the token as a secret, and use it before `expires_at`, 12 hours after the call unless you [set `token_ttl_min`](#request-options-link-expiration). Hand it to the user in one of two ways: * **Hosted.** Send the `link` to the user by email, SMS, or a button in your app. * **Embedded.** Pass the `token` to the SDK as `onboardingSessionToken`: ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; onboarding.initialize({ onboardingSessionToken: "obtok_xxx", // continue_onboarding.token onComplete: () => { // the user has finished the remaining steps }, }); ``` When the user finishes, the SDK's `onComplete` handler fires. Read the result with GET /onboardings/{id}, using the `id` from the response that created the run. The JavaScript SDK from 7.0.0, the Expo and React Native SDKs from 4.0.0, the Android SDK from 2.0.0, the iOS SDK from 3.0.0 and the Flutter SDK from 3.0.0 also pass that ID to `onComplete` as `onboardingId`. The [Integration Guide](/articles/guide/definitive-integration-guide#the-end-to-end-integration-step-5-handle-the-decision) has iOS and Android examples. ### Statuses The `status` field carries the outcome of the run, one of: | Status | Meaning | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pass` / `fail` / `none` | The playbook ran to completion. Conventionally these are the output of the rules you define; `none` means no rules executed. | | `incomplete` | Footprint needs something only the user can provide. Use `continue_onboarding` to let them finish. | | `pending` | The run is still executing: the onboarding was started asynchronously, or a step took longer than your synchronous timeout. Footprint sends a webhook when the onboarding completes, and you can poll with GET /onboardings/{id}. | | `error` | The run failed due to logic configured on your playbook, with details in `error_message`. | ### Playbook output A playbook can declare what it produces. Add an **Output** node as the last node of the playbook and give it a set of keys, each assigned an expression over the available onboarding data: vaulted attributes, onboarding data computed by earlier nodes, outputs of external API nodes, and the results of your verification checks. When the run reaches that node, the values it evaluated come back in `output`, keyed by the names you configured: ```json { "id": "ob_SRFT2a1mN7DAWJ0VPXkiqK", "status": "pass", "requires_manual_review": false, "error_message": null, "continue_onboarding": null, "output": { "risk_tier": "low", "is_over_21": true, "normalized_state": "CA", "id_front": "/9j/4AAQSkZJRgABAQAAAQABAAD..." } } ``` A key whose expression resolves to a document, such as one you passed in `prerequisite_data` or a report from an Agent node, returns the file's contents, base64-encoded, like `id_front` above. Onboarding data keeps only a reference to the document, so the playbook trace in the dashboard shows that reference rather than the contents. `output` is `null` when the playbook has no output node or the onboarding has not completed yet, so `pending` and `incomplete` runs return `null`. [Fetch the onboarding](#fetching-an-onboarding-later) once it finishes to read the output. Because the output node runs last, its expressions can read everything computed earlier in the flow. That makes it the place to give your backend more context on what happened during the onboarding than the status alone carries. ### Webhooks Runs that do not finish inline, asynchronous runs, and onboardings that returned `pending` deliver their decision through the `footprint.onboarding.completed` webhook. [Webhooks](/articles/integrate/webhooks) covers setting up your endpoint. ## Fetching an onboarding later Not every run resolves inline: asynchronous runs return immediately, synchronous runs can time out, and a run can stop to wait on the user. In every case, GET /onboardings/{id} returns the current state of the run, in the same shape as the response that created it. ```bash curl https://api.onefootprint.com/onboardings/ob_SRFT2a1mN7DAWJ0VPXkiqK \ -u : ``` Fetching an onboarding never re-runs it, so it is safe to poll. Use it to: * **Resolve a `pending` run.** Read the final `status` and `output` once the run finishes. * **Get a link for an asynchronous run.** An asynchronous run never returns `continue_onboarding`, because the playbook has not executed yet. Once the run reaches `incomplete`, fetch it to pick up the token and link. * **Reissue an expired link.** Fetch the onboarding again for a fresh link. It lasts as long as the `token_ttl_min` you set when creating the onboarding, or 12 hours by default. * **Read the output.** [Playbook output](#processing-the-response-playbook-output) is returned here too, once the run reaches the output node. Every fetch of an `incomplete` onboarding mints a new `continue_onboarding` token and link. Tokens issued by earlier fetches keep working until they expire, so fetching again does not invalidate a link you already sent to a user. Continuing an onboarding resumes the run the user already started, and it keeps the same `id`. To run the playbook again from scratch, call POST /onboardings with a new `onboarding_external_id`. See [Reonboarding and idempotency](#request-options-reonboarding-and-idempotency). --- # Onboarding sessions An onboarding session starts an onboarding from your backend. You create a session token with your secret API key, passing what the session needs, such as an existing user's `fp_id`, bootstrap data, or external IDs, and hand the token to the Footprint SDK. It is an alternative to passing every argument to the SDK directly, and because your secret API key creates it, it can do things the SDK alone cannot: * Control when a user may reonboard onto a playbook. * Set the `external_id` of the user (or business) the onboarding session creates. * Bootstrap data from your backend into the onboarding. ## Create a session token From your backend, call POST /onboarding/session with your secret API key. The simplest request carries only the playbook key: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{"kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI"}' ``` The response carries the token, a hosted link, and the token's expiry: ```json { "token": "obtok_xxx", "link": "https://verify.onefootprint.com/?type=user#obtok_xxx", "expires_at": "2025-01-04T12:00-08:00" } ``` Pass the token to the Footprint SDK as `onboardingSessionToken`: ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const handleClick = () => { onboarding.initialize({ onboardingSessionToken: "obtok_xxx", // token from above onComplete: ({ onboardingId }) => { // TODO }, }); }; ``` ## Example use cases ### Guarantee resolution to a specific user Aim for one Footprint user, one `fp_id`, per user in your application. When you launch the Footprint flow from a logged-in context, pass your own database identifier for the user as `user_external_id`. The onboarding session resolves to the existing Footprint user with that `external_id`, or creates a new Footprint user with it. ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "user_external_id": "8c992273-987d-4830-84f7-01324ab66899" }' ``` External IDs may only include alphanumeric characters, `_`, `-`, or `.` and must be between 10 and 256 characters. If you already know the user's `fp_id`, pass it directly: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" }' ``` ### Guarantee resolution to a specific business For a KYB (Know Your Business) onboarding, pass a `business_external_id` alongside the user's, to log into the existing business with that `external_id` or create a new business with it. The located user must be recorded as an owner of the located business; otherwise the onboarding session returns an error. ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "user_external_id": "8c992273-987d-4830-84f7-01324ab66899", "business_external_id": "2f55b318-5dec-4634-880f-38c4968d3b71" }' ``` The same character and length rules apply to `business_external_id`. If you already know the business's `fp_bid`, pass it directly: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "fp_bid": "fp_bid_fr7JHcV3hIzC7KbqTAsD3n" }' ``` ### Bootstrap data If your backend already holds data for the user, pass it as `bootstrap_data` and the flow prefills it for the user the session creates: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "bootstrap_data": { "id.first_name": "Jane", "id.last_name": "Doe" } }' ``` [Bootstrap data](/articles/integrate/bootstrap-data) lists the fields you can bootstrap and the format each one takes. ### Onboarding idempotency By default, when a user starts an onboarding session for a playbook they have already onboarded onto, Footprint reuses the result of their last onboarding, so repeat onboardings do not incur accidental charges. `onboarding_external_id` gives you control over this: if the user already has an onboarding with that `onboarding_external_id`, its result is reused. If not, Footprint creates a new onboarding and the user reonboards. For example, to let users reonboard onto the same playbook every time they fill out a new account application in your product, pass the application's identifier as `onboarding_external_id`: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "user_external_id": "8c992273-987d-4830-84f7-01324ab66899", "onboarding_external_id": "bc13ca5b-210f-49af-9aba-e98db366484a" }' ``` To let users reonboard onto the same playbook once a month, derive `onboarding_external_id` from the current month: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI", "user_external_id": "8c992273-987d-4830-84f7-01324ab66899", "onboarding_external_id": "onboarding-2025-01" }' ``` We recommend a value that implies some limit on how often a user can reonboard onto one playbook, since you are responsible for the charge each reonboard incurs. `onboarding_external_id` follows the same character and length rules as other external IDs. Because it is scoped to an individual user, you must also pass either `fp_id` or `user_external_id` when you create the session. ### Collect outstanding data When you have requested information from a user in the Footprint dashboard, an onboarding session for that user lets them provide whatever is still outstanding. The dashboard can send the user a link itself. When you want more control over how you prompt the user, subscribe to the footprint.user.info\_requested webhook event and send your own notification when information is requested from the dashboard. A common flow checks whether the user has an outstanding request with the GET /users/{fp_id} API: ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr \ -u sk_test_xxxxx: ``` ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "requires_manual_review": false, "status": "pass", "requires_additional_info": { "timestamp": "2023-12-12T21:28:38.771377Z", "note": "Hi Christian, we can't wait for you to get started with your Acme Bank credit card! To finish verifying your identity, can you please submit a photo of your SSN card? Once received, we can approve your application and mail out your credit card." } } ``` A non-null `requires_additional_info` means there is an outstanding request for this user. It also carries the human-readable note you wrote in the dashboard for the user, which you can render in your own app. Create an `inherit` onboarding session to collect the requested information: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "inherit", "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" }' ``` ### Update login methods An onboarding session can also let a user update any or all of their login methods (phone and email) through the Footprint Auth SDK. The user first logs in with an existing login method on their account, then can add a passkey or update their phone or email. To limit which auth methods the user can update, pass the allowed methods in `limit_auth_methods` when you create the token. For example, to let the user update only their phone number: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -u sk_test_xxxxx: \ -d '{ "kind": "update_login_methods", "fp_id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "limit_auth_methods": ["phone"] }' ``` Then pass the token to the SDK as `authToken`: This flow needs `@onefootprint/footprint-js` 3.9.0 to 4.x. Version 5.0.0 removed the `update_login_methods` component, and the example below uses the 4.x API. ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import footprint from "@onefootprint/footprint-js"; const handleClick = () => { const component = footprint.init({ kind: "update_login_methods", authToken: "obtok_xxx", onComplete: (validationToken) => { // TODO }, }); component.render(); }; ``` --- # User-specific sessions When a user has already identified themselves to your app, open the Footprint SDK with an auth token specific to that user. You collect new and updated information from an existing user over time, and the user cannot create a second Footprint account when they already have one linked to your app. Use it to: * Onboard the user onto a playbook. * Ask the user for a new driver's license when theirs expires. * Collect information you requested from the Footprint dashboard. * Let the user update their login methods with Footprint. ## Before you start You call the API with your secret API key; see [Server-side API authentication](/api-reference#authentication). ## Step 1: Get or create a Footprint user on your backend Store a mapping from your own user records to the user's Footprint identifier, the `fp_id`. When the user logs in to your app, look up the `fp_id` of the user you want to open the flow for. If the user has no `fp_id` yet, create one in Footprint and vault the information you have already collected; [Migrating user data](/articles/integrate/migrate-existing-data) shows how. The flow does not ask the user again for data already in their vault, though they can edit it. ## Step 2: Generate an auth token for the user on your backend From your backend, with your secret API key, generate an auth token for the user with the POST /onboarding/session API: ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/token \ -X POST \ -d '{"kind": "onboard", "key": "pb_live_qBV2iO3nQI5moqo5GJlFhI"}' \ -u sk_test_xxxxx: ``` The response carries the token and its expiry: ```json { "token": "utok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0", "expires_at": "2023-10-24T20:44:13.639341Z" } ``` ### Token kinds Choose the token kind that matches the SDK component you use and the flow you launch the user into. | Token kind | Description | SDK component | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | `onboard` | Onboard the user onto a specific playbook, specified by the `key` (from the [Playbooks tab](https://dashboard.onefootprint.com/playbooks)). | Verify | | `inherit` | Inherit any operation previously requested via the dashboard, including onboarding onto a playbook and document collection. More info below. | Verify | | `user` | Create a token for the user. A playbook key may be provided directly to the Footprint Verify SDK to trigger onboarding. | Verify | | `update_auth_methods` | Allows the user to update any/all of their login methods (phone and email) using the Footprint Auth component. | Auth | Some token kinds take additional options, described below. ### The inherit token kind From the Footprint dashboard, you can request additional information from a user who has already onboarded, such as an SSN card or a driver's license. By default, Footprint sends the user a link to complete the form. To keep the user in your app instead, embed the Footprint Verify component with an `inherit` token and it completes any outstanding data requests. Before you generate the token, check whether the user has an outstanding request with the GET /users/{fp_id} API: ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr \ -u sk_test_xxxxx: ``` A user with an open request looks like this: ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr", "requires_manual_review": false, "status": "pass", "requires_additional_info": { "timestamp": "2023-12-12T21:28:38.771377Z", "note": "Hi Christian, we can't wait for you to get started with your Acme Bank credit card! To finish verifying your identity, can you please submit a photo of your SSN card? Once received, we can approve your application and mail out your credit card." } } ``` A non-null `requires_additional_info` means there is an outstanding request for this user, and you can create an `inherit` token. It also carries the human-readable note you wrote in the dashboard for the user, which you can render in your own app. ### The update\_auth\_methods token kind An `update_auth_methods` token lets the user update their login methods through the Footprint Auth component. The user first logs in with an existing login method on their account, then can update their phone, their email, or both. To limit which auth methods the user can update, pass the allowed methods in `limit_auth_methods` when you create the token. For example, to let the user update only their phone number: ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/token \ -X POST \ -d '{"kind": "update_auth_methods", "limit_auth_methods": ["phone"]}' \ -u sk_test_xxxxx: ``` ## Step 3: Pass auth token into the Footprint SDK Pass the auth token to the Footprint SDK. The SDK asks the user to authenticate, then launches the flow the token kind or playbook specifies. The token kinds table says which component to invoke; the page for your SDK covers the platform specifics. ### Onboarding For a KYC (Know Your Customer) onboarding, pass the auth token as `onboardingSessionToken`: ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const handleClick = () => { onboarding.initialize({ onboardingSessionToken: "utok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0", // Auth token from Step 2 onComplete: ({ onboardingId }) => { // TODO: Send to your backend to fetch the result with GET /onboardings/{id} }, }); }; ``` ### Update auth methods For the update auth methods flow, pass the token as `authToken`: This flow needs `@onefootprint/footprint-js` 3.9.0 to 4.x. Version 5.0.0 removed the `update_login_methods` component, and the example below uses the 4.x API. ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import footprint from "@onefootprint/footprint-js"; const handleClick = () => { const component = footprint.init({ kind: "update_login_methods", authToken: "utok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0", onComplete: (validationToken) => { // TODO: Post to Footprint server to fetch user ID or verification status }, }); component.render(); }; ``` --- # Bootstrap data Bootstrap data is data about the user that you already hold and share with Footprint when you create an onboarding session, to shorten the onboarding. The flow prefills it: the user skips the sections you completed and can still edit or correct any value. Footprint validates bootstrap data with the same validations it applies to user-entered data. A value that fails validation is ignored, and the flow asks the user for it again. Only fields the playbook collects can be bootstrapped. ## Pass bootstrap data Pass bootstrap data when you create an onboarding session token through the API, so the data is transmitted securely and validated before the user starts the flow. This request creates an onboarding session with bootstrap data: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -H 'X-Footprint-Secret-Key: ' \ -d \ '{ "bootstrap_data": { "id.email": "jane.doe@acme.com", "id.phone_number": "+1 (555) 555-0100", "id.first_name": "Jane", "id.last_name": "Doe", "id.dob": "2000-01-01", "id.address_line1": "1 Main St", "id.city": "San Francisco", "id.state": "CA", "id.zip": "11111", "id.country": "US", "id.ssn9": "123-45-6789" }, "kind": "onboard", "key": "", "user_external_id": "12345678901" }' ``` [The Integration Guide](/articles/guide/definitive-integration-guide#the-end-to-end-integration-step-4-run-the-playbook) covers starting the onboarding and getting an onboarding token. ## User fields These identity fields can be bootstrapped. Footprint ignores any bootstrap field that fails validation or that the playbook does not collect. | Variable | Description | Format | | ------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `id.phone_number` | Primary phone number | [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number | | `id.email` | Primary email address | [Email address](https://datatracker.ietf.org/doc/html/rfc3696) | | `id.first_name` | First name | Any valid UTF-8 string \<1KB | | `id.middle_name` | Middle name | Any valid UTF-8 string \<1KB | | `id.last_name` | Last name | Any valid UTF-8 string \<1KB | | `id.ssn9` | Full SSN | 9-digit string (hyphens will be ignored and stripped out) | | `id.ssn4` | Last four of the SSN | 4-digit string | | `id.dob` | Date of birth | Formatted as `YYYY-MM-DD` | | `id.address_line1` | First line of the user's street address | Any valid UTF-8 string \<1KB | | `id.address_line2` | Second line of the user's street address | Any valid UTF-8 string \<1KB | | `id.city` | City of the user's street address | Any valid UTF-8 string \<1KB | | `id.state` | State of the user's street address | For US addresses, 2-character [USPS](https://pe.usps.com/text/pub28/28apb.htm) format. Otherwise, any valid UTF-8 string \<1KB | | `id.zip` | Postal code for the user's street address | Postal code `^([A-Za-z0-9\- ]*)$` | | `id.country` | Country for the user's street address | Any valid [ISO3166-alpha-2 Country Code](https://datahub.io/core/country-codes) | | `id.us_legal_status` | The user's legal status in the US | `citizen`, `permanent_resident`, or `visa` | | `id.nationality` | The user's nationality | Any valid [ISO3166-alpha-2 Country Code](https://datahub.io/core/country-codes) | | `id.citizenships` | A list of countries for which the user holds citizenship | A list of valid [ISO3166-alpha-2 Country Codes](https://datahub.io/core/country-codes) | | `id.visa_kind` | The type of US visa held by the user | One of `e1`, `e2`, `e3`, `f1`, `g4`, `h1b`, `l1`, `o1`, `tn1`, or `other` | | `id.visa_expiration_date` | The expiration date of the user's visa | Formatted as `YYYY-MM-DD` | ## Bootstrapping KYB data For a KYB (Know Your Business) onboarding, bootstrap user information and business information together by including both kinds of field in `bootstrap_data`: ```bash curl -X POST https://api.onefootprint.com/onboarding/session \ -H 'X-Footprint-Secret-Key: ' \ -d \ '{ "bootstrap_data": { "id.first_name": "Jane", "id.last_name": "Doe", "id.dob": "2001-12-30", "id.ssn9": "123456789", "business.name": "Acme Bank", "business.dba": "Acme", "business.tin": "12-3456789", "business.website": "www.google.com", "business.phone_number": "+12025550179", "business.address_line1": "123 Main St", "business.address_line2": "Apt 123", "business.city": "Boston", "business.state": "MA", "business.zip": "02117", "business.country": "US", "business.corporation_type": "c_corporation" }, "kind": "onboard", "key": "", "user_external_id": "12345678901" }' ``` ### Business fields Alongside the identity fields, a KYB playbook accepts these bootstrap fields. Footprint ignores any bootstrap field that fails validation or that the playbook does not collect. | Variable | Description | Format | | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `business.name` | Name of the business | Any valid UTF-8 string \<1KB | | `business.dba` | Doing-business-as alias | Any valid UTF-8 string \<1KB | | `business.website` | Website of the business | A valid absolute URL. | | `business.phone_number` | Phone number | [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number | | `business.tin` | Taxpayer identification number | 9-digit string (hyphens will be ignored and stripped out) | | `business.address_line1` | First line of the business's street address | Any valid UTF-8 string \<1KB | | `business.address_line2` | Second line of the business's street address | Any valid UTF-8 string \<1KB | | `business.city` | City of the business's street address | Any valid UTF-8 string \<1KB | | `business.state` | State of the business's street address | For US addresses, 2-character [USPS](https://pe.usps.com/text/pub28/28apb.htm) format. Otherwise, any valid UTF-8 string \<1KB | | `business.zip` | Postal code for the business's street address | Postal code `^([A-Za-z0-9\- ]*)$` | | `business.country` | Country for the business's street address | Any valid [ISO3166-alpha-2 Country Code](https://datahub.io/core/country-codes) | | `business.corporation_type` | The type of corporation | One of `c_corporation`, `s_corporation`, `b_corporation`, `llc`, `llp`, `partnership`, `sole_proprietorship`, `non_profit`, `unknown`, `trust`, `agent` | | `business.primary_owner_stake` | The ownership stake of the primary beneficial owner. The remaining info for the primary owner is specified in the `id.*` attributes | Integer between 0-100 | | `business.secondary_owners` | A list of the other beneficial owners of the business. | An array of objects with `first_name` (string), `last_name` (string), `email` ([email address](https://datatracker.ietf.org/doc/html/rfc3696) string), `phone_number` ([E.164](https://www.twilio.com/docs/glossary/what-e164) string), and `ownership_stake` (integer between 0-100) fields | ### Beneficial owners In a KYB playbook, the user who fills out the business information is always considered the first beneficial owner of the business. To prefill the first beneficial owner's attributes, use the `id.*` fields; to bootstrap their ownership stake, pass `business.primary_owner_stake`. Provide the remaining beneficial owners as a list in `business.secondary_owners`. For example, to bootstrap a business with two beneficial owners: ```json { "bootstrap_data": { "id.first_name": "Primary", "id.last_name": "Owner", "business.primary_owner_stake": 50, "business.secondary_owners": [ { "first_name": "Secondary", "last_name": "Owner", "ownership_stake": 40 } ] } } ``` --- # No-code integration The no-code integration gives you a permanent link that your users open to onboard and create a Footprint vault, with no SDK in your app. For users onboarding from your website, the SDKs give a better experience; the link is the alternative when you want to share it with users directly. ## Create a playbook and copy its link 1. Go to the **Playbooks** tab in the [dashboard](https://dashboard.onefootprint.com/playbooks) and create a playbook. * Start from a template or from **Onboard users** or **Onboard businesses**, then add or remove the nodes that collect the data you need. [Building playbooks](/articles/guides/playbooks-building-playbooks) walks through the builder. * Publish the playbook. 2. Copy the permanent onboarding link. * Open the dropdown menu on the playbook you created. * Click **Get shareable link** to copy the link to your clipboard. This link never expires, and you can share it with your users. ## Set up webhooks (optional) Webhooks send updates about this playbook to your backend. For example, you can receive a Slack notification every time a user successfully onboards with it. [Webhooks](/articles/integrate/webhooks) explains how to configure them. --- # Introduction A Footprint vault is a key-value store for a user's or a business's sensitive data. Footprint defines a fixed set of keys for structured data, such as the SSN (`id.ssn9`), the address (`id.address_line1`, `id.address_line2`, and so on), and the card number (`card.*.number`). Each of these vault fields is validated against the type of data it holds, so a value you read or write is in the format that field expects. For any other kind of unstructured data, use `custom.*` fields. [Vault fields](/articles/vault/fields) lists every structured key and its validator. ## Identity Identity data collected in an embedded user or business onboarding (KYC or KYB) is verified by Footprint's decisioning platform and then vaulted. Each identity attribute is validated, vaulted, and tokenized, and some attribute types are also fingerprinted so they can be matched. You can also create a standalone identity vault through the API or the Vault Proxy, which is useful when migrating sensitive user data. The APIs are the same however the data arrived. Identity fields use the `id.` prefix. ## Payment cards Many financial applications collect or store payment card data for the users they onboard, with or without KYC. Footprint vaults cardholder data such as the card number, the expiration date, and the security code (CVV) in a PCI-compliant way. The card APIs are the same as the rest of the vaulting APIs and use the `card.*` namespace. Unlike identity data, a user can have several cards, so each card gets an alias such as `card.primary.*`. Like identity data, card data is validated before it is vaulted. ## Custom key-value Custom fields hold data you define, and Footprint does not validate them. In API requests the key is `custom.`. Use custom fields to vault any other sensitive data about a user or a business through the same vaulting API. ## Update a user vault `PATCH /users//vault` writes the fields in the request body to the user's vault. ```bash curl https://api.onefootprint.com/users/fp_id_GSxJr68GAf5jUT3pdL9ndjf7TLkA3GCX/vault \ -X PATCH \ -u sk_test_xxxxx: \ -d '{ "custom.ach_account": "111122224444", "card.primary.expiration": "10/2025", "card.primary.cvc": "424" }' ``` This endpoint has a JSON body limit of 32KB. ## Store large objects in a user vault For larger custom objects (up to 25MB), use `POST /users//vault//upload`. ```bash curl https://api.onefootprint.com/users/fp_id_GSxJr68GAf5jUT3pdL9ndjf7TLkA3GCX/vault/custom.card_transaction_history/upload \ -X POST \ -u sk_test_xxxxx: \ --data-binary @transactions.csv ``` Footprint encrypts the raw request body and stores it in the user's vault. Retrieve it with the decrypt call below. On decryption, the raw contents of a large object come back `base64` encoded. ## List available data in a user's vault Check which fields exist in the user's vault. Pass `fields` to check only some of them. ```bash curl https://api.onefootprint.com/users/fp_id_GSxJr68GAf5jUT3pdL9ndjf7TLkA3GCX/vault?fields=id.ssn9,custom.ach_account,card.primary.number \ -u sk_test_xxxxx: ``` ```json { "id.ssn9": true, "custom.ach_account": true, "card.primary.number": true } ``` ## Decrypt data from a user's vault Decryption is per field, and you can scope an API key to groups of fields, such as the full address or the last four digits of the SSN. ```bash curl https://api.onefootprint.com/users/fp_id_GSxJr68GAf5jUT3pdL9ndjf7TLkA3GCX/vault/decrypt \ -X POST \ -u sk_test_xxxxx: \ -d '{ "fields": ["id.last_name", "id.dob", "id.ssn9", "custom.ach_account"], "reason": "direct deposit verification" }' ``` ```json { "id.last_name": "Doe", "id.dob": "1988-12-25", "id.ssn9": "121211212", "custom.ach_account": "111122224444" } ``` ## Search across users' vaults Search across all of your users' vaults by the fields that are fingerprinted. The search is private and needs no decryption on your side. ```bash curl https://api.onefootprint.com/users/search -X POST -d '{"search": "Doe"}' \ -u sk_test_xxxxx: ``` ```json { "data": [ { "id": "fp_id_XyEJ6CF7UNl6K2ymIq8YQS" } ], "meta": { "next": null, "count": 1 } } ``` ## Next steps The full list of fields and their formats is in [Vault fields](/articles/vault/fields). For a user who did not onboard through Footprint, see [Creating new vaults](/articles/vault/creating-new-vaults); to vault data straight from a mobile or web app without it passing through your backend, see [Client-side vaulting](/articles/integrate/client-vaulting). --- # Vault fields Footprint validates structured vault fields, such as identity and card data, against a base-level format on write; custom fields accept any JSON value. This page lists every field by namespace, with the format each value must match. Not every field is populated in every vault. ## Identity fields | Field | Description | Format | | ------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | | `id.phone_number` | Primary phone number | [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number | | `id.email` | Primary email address | [Email address](https://datatracker.ietf.org/doc/html/rfc3696) | | `id.first_name` | First name | Any valid UTF-8 string \<1KB | | `id.middle_name` | Middle name | Any valid UTF-8 string \<1KB | | `id.last_name` | Last name | Any valid UTF-8 string \<1KB | | `id.ssn9` | Full SSN | 9-digit string; hyphens are stripped | | `id.ssn4` | Last 4 digits of the SSN | 4-digit string | | `id.itin` | Individual taxpayer identification number | 9-digit string beginning with `9`; hyphens are stripped | | `id.dob` | Date of birth | `%Y-%m-%d` | | `id.address_line1` | First line of the user's street address | Any valid UTF-8 string \<1KB | | `id.address_line2` | Second line of the user's street address | Any valid UTF-8 string \<1KB | | `id.city` | City of the user's street address | Any valid UTF-8 string \<1KB | | `id.state` | State of the user's street address | 2-character [USPS](https://pe.usps.com/text/pub28/28apb.htm) code for US addresses; otherwise any valid UTF-8 string \<1KB | | `id.zip` | Postal code of the user's street address | Postal code `^([A-Za-z0-9\- ]*)$` | | `id.country` | Country of the user's street address | Any valid [ISO 3166 alpha-2 country code](https://datahub.io/core/country-codes) | | `id.us_legal_status` | The user's legal status in the US | `citizen`, `permanent_resident`, or `visa` | | `id.nationality` | The user's nationality | Any valid [ISO 3166 alpha-2 country code](https://datahub.io/core/country-codes) | | `id.citizenships` | Countries where the user holds citizenship | A list of valid [ISO 3166 alpha-2 country codes](https://datahub.io/core/country-codes) | | `id.visa_kind` | Type of US visa the user holds | One of `j1`, `b1`, `b2`, `e1`, `e2`, `e3`, `f1`, `g4`, `h1b`, `l1`, `o1`, `tn1`, or `other` | | `id.visa_expiration_date` | Expiration date of the user's visa | `%Y-%m-%d` | ## Business fields | Field | Description | Format | | --------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `business.name` | Name of the business | Any valid UTF-8 string \<1KB | | `business.dba` | Doing-business-as alias | Any valid UTF-8 string \<1KB | | `business.website` | Website of the business | A valid absolute URL | | `business.phone_number` | Phone number | [E.164](https://www.twilio.com/docs/glossary/what-e164) phone number | | `business.tin` | Taxpayer identification number | 9-digit string; hyphens are stripped | | `business.address_line1` | First line of the business's street address | Any valid UTF-8 string \<1KB | | `business.address_line2` | Second line of the business's street address | Any valid UTF-8 string \<1KB | | `business.city` | City of the business's street address | Any valid UTF-8 string \<1KB | | `business.state` | State of the business's street address | 2-character [USPS](https://pe.usps.com/text/pub28/28apb.htm) code for US addresses; otherwise any valid UTF-8 string \<1KB | | `business.zip` | Postal code of the business's street address | Postal code `^([A-Za-z0-9\- ]*)$` | | `business.country` | Country of the business's street address | Any valid [ISO 3166 alpha-2 country code](https://datahub.io/core/country-codes) | | `business.corporation_type` | Type of corporation | One of `c_corporation`, `s_corporation`, `b_corporation`, `llc`, `llp`, `partnership`, `sole_proprietorship`, `non_profit`, `unknown`, `trust`, `agent` | | `business.formation_state` | US state of formation | Any valid 2-character US state code | | `business.formation_date` | Date of formation | `YYYY-MM-DD` | ## Investor profile fields | Field | Description | Format | | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `investor_profile.employment_status` | The user's employment status | One of `employed`, `unemployed`, `student`, `retired` | | `investor_profile.employer` | Name of the user's employer, if any | Any valid UTF-8 string \<1KB | | `investor_profile.occupation` | The user's occupation, if any | Any valid UTF-8 string \<1KB | | `investor_profile.annual_income` | The user's annual income | One of `le25k`, `gt25k_le50k`, `gt50k_le100k`, `gt100k_le200k`, `gt200k_le300k`, `gt300k_le500k`, or `gt500k_le1200k` | | `investor_profile.net_worth` | The user's net worth | One of `le50k`, `gt50k_le100k`, `gt100k_le200k`, `gt200k_le500k`, `gt500k_le1m`, `gt1m_le5m`, or `gt5m` | | `investor_profile.funding_sources` | The user's funding sources | One of `employment_income`, `investments`, `inheritance`, `business_income`, `savings`, or `family` | | `investor_profile.investment_goals` | The user's investment goals | List with at least one of `growth`, `income`, `preserve_capital`, `speculation`, `diversification`, or `other` | | `investor_profile.risk_tolerance` | The user's stated risk tolerance | One of `conservative`, `moderate`, `aggressive` | | `investor_profile.declarations` | Declarations the user makes about themselves | An array of `affiliated_with_us_broker`, `senior_executive`, or `senior_political_figure`; empty if none apply | | `investor_profile.brokerage_firm_employer` | Name of the brokerage, when declarations include `affiliated_with_us_broker` | Any valid UTF-8 string \<1KB | | `document.finra_compliance_letter` | Uploaded FINRA compliance document, when declarations include `affiliated_with_us_broker` | PDF document | | `investor_profile.senior_executive_symbols` | Symbols of the companies where the user is a senior executive, when declarations include `senior_executive` | An array of symbols, each 3-5 ASCII alphabetic characters | | `investor_profile.family_member_names` | Names of the user's immediate family members, when declarations include `senior_political_figure` | An array of names, each a UTF-8 string \<1KB | | `investor_profile.political_organization` | Name of the political organization, when declarations include `senior_political_figure` | Any valid UTF-8 string \<1KB | ## Document extracted fields When a user uploads an identity document during onboarding, Footprint attempts to extract these fields from it. Replace `*` with the document type: `id_card`, `drivers_license`, `passport`, `permit`, `visa`, or `residence_document`. For example, `document.drivers_license.document_number` is the number on a driver's license. | Field | Description | Format | | ---------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------- | | `document.*.full_name` | Extracted name | Any UTF-8 string \<200B | | `document.*.dob` | Extracted date of birth | `%Y-%m-%d` | | `document.*.gender` | Extracted gender | Any UTF-8 string \<200B | | `document.*.full_address` | Extracted full address | Any UTF-8 string \<200B | | `document.*.document_number` | Extracted document number | Any UTF-8 string \<200B | | `document.*.issued_at` | Date the document was issued | `%Y-%m-%d` | | `document.*.expires_at` | Date the document expires | `%Y-%m-%d` | | `document.*.issuing_state` | Name of the state that issued the document | Any UTF-8 string \<200B | | `document.*.issuing_country` | Country that issued the document | Any valid [ISO 3166 alpha-2 country code](https://datahub.io/core/country-codes) | | `document.*.nationality` | Nationality extracted from the document | Any UTF-8 string \<200B | ## Document images When a document is uploaded during onboarding or vaulted through the API, its images are available under these fields. Replace `*` with the document type: `id_card`, `drivers_license`, `passport`, `permit`, `visa`, or `residence_document`. | Field | Description | Format | | ------------------------ | -------------------------------------------------------------- | -------------------- | | `document.*.front.image` | Front image of the document | Base64 encoded image | | `document.*.back.image` | Back image of the document; not every document type has a back | Base64 encoded image | ## Card fields Your app assigns each card an alias, which replaces `*` and must match `^([A-Za-z0-9\-_]+)$`. | Field | Description | Format | | -------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `card.*.name` | Name of the cardholder | Any UTF-8 string \<200B | | `card.*.number` | Full card number | Valid credit or debit card number (length and Luhn check). Supports Visa, Mastercard, Amex, MIR, Diners Club, Discover, UnionPay, JCB, Visa Electron, Maestro, Forbrugsforeningen, Dankort. | | `card.*.cvc` | Verification code of the card | Valid 3- or 4-digit numeric code | | `card.*.expiration` | Date the card expires | `MM/YYYY`. Accepts as input any of `MM/YYYY`, `MM-YYYY`, `MM/YY`, `MM-YY`, `M/YY`, or `M-YY`, canonicalized to `MM/YYYY` before vaulting, with `MM/YY` read as `MM/20YY`. | | `card.*.billing_address.zip` | Billing ZIP code of the card | Postal code `^([A-Za-z0-9\- ]*)$` | | `card.*.billing_address.country` | Billing country of the card | Any valid [ISO 3166 alpha-2 country code](https://datahub.io/core/country-codes) | | `card.*.number_last4` | Last 4 digits of the card number; populated by Footprint | 4-digit string; read-only | | `card.*.issuer` | Issuer of the card; populated by Footprint | One of `visa`, `master_card`, `amex`, `discover`, `mir`, `diners_club`, `union_pay`, `jcb`, `visa_electron`, `maestro`, `forbrugsforeningen`, `dankort`, or `unknown` | ## Bank account fields Your app assigns each bank account an alias, which replaces `*` and must match `^([A-Za-z0-9\-_]+)$`. | Field | Description | Format | | --------------------------- | -------------------------------------------------------------------- | ----------------------- | | `bank.*.name` | Name of the bank account | Any UTF-8 string \<200B | | `bank.*.account_type` | Type of the bank account, usually `checking` or `savings` | Any UTF-8 string \<200B | | `bank.*.account_last4` | Last 4 characters or digits of the account | Any UTF-8 string \<200B | | `bank.*.ach_routing_number` | ACH routing number, as a string | Any UTF-8 string \<200B | | `bank.*.ach_account_number` | ACH account number, as a string | Any UTF-8 string \<200B | | `bank.*.ach_account_id` | Identifier of the ACH account | Any UTF-8 string \<200B | | `bank.*.institution_id` | Identifier of the financial institution | Any UTF-8 string \<200B | | `bank.*.institution_name` | Name of the financial institution | Any UTF-8 string \<200B | | `bank.*.iban` | IBAN account number | Any UTF-8 string \<200B | | `bank.*.bic` | BIC bank code | Any UTF-8 string \<200B | | `bank.*.owners` | JSON object describing the owners of the account | Any JSON object | | `bank.*.link_id` | Link ID, when the account was connected through Bank Account Linking | Any UTF-8 string \<200B | | `bank.*.closed` | Whether the account is closed | `true` or `false` | ## Custom fields Your app names each custom field; the name replaces `*` and must match `^([A-Za-z0-9\-_\.]+)$`. | Field | Description | Format | | ---------- | ---------------------------- | ----------------------------------------------- | | `custom.*` | Any data you choose to store | Any JSON value: string, number, list, or object | --- # Creating new vaults A standalone vault is a user vault you create through the API for a user who did not go through a KYC or IDV onboarding with a Footprint SDK. Reach for it when you backfill existing users into Footprint and need to vault their PII directly. Create the vault with `POST /users`. ```bash curl https://api.onefootprint.com/users \ -X POST \ -u sk_test_xxxxx: ``` ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" } ``` Save the returned `id` and associate it with the user in your database. ## Initial data To seed the vault at creation, pass the fields in the request body. ```bash curl https://api.onefootprint.com/users \ -X POST \ -d '{ "id.first_name": "Jane", "id.last_name": "Joe", "id.dob": "1988-12-30", "id.ssn9": "12-121-1212", "custom.ach_account": "111122224444" }' \ -u sk_test_xxxxx: ``` ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" } ``` ## Idempotency ID To retry `POST /users` without creating a second user, send an `x-idempotency-id` header. A repeat request with the same `x-idempotency-id` value is a no-op and returns the same `fp_id`. When you create a vault for a user record you already hold, we recommend using that record's unique ID as the `x-idempotency-id`, so only one Footprint vault is ever created per user. A request that carries `x-idempotency-id` cannot include initial data in the body. ```bash curl https://api.onefootprint.com/users \ -X POST \ -H 'x-idempotency-id: my_user_id_1234' -u sk_test_xxxxx: ``` ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" } ``` The `fp_id` is safe to store in plaintext. ## Update a standalone user vault Use the `id` from the create call to add or update fields at any time with `PATCH /users//vault`. ```bash curl https://api.onefootprint.com/users/fp_id_GSxJr68GAf5jUT3pdL9ndjf7TLkA3GCX/vault \ -X PATCH \ -u sk_test_xxxxx: \ -d '{ "id.email": "jane@acmebank.com", "custom.ach_account": "111122224444" }' ``` Listing, decrypting, and updating work the same for a standalone vault as for any other user vault; the [vault introduction](/articles/vault/apis) shows each call. --- # Client-side vaulting Client-side vaulting writes sensitive user data to a user's vault directly from a mobile or web app. Your backend creates a short-lived client token, and the client uses it to vault, and optionally decrypt, the fields the token names. The same flow works for businesses, as [Businesses](#businesses) shows. ## Before you start You need a server-side API key; see [API authentication](/api-reference#authentication). ## Step 1: Use an existing vault or create a new one (server-side) Each user in your system gets a single Footprint vault. If the user has no `fp_id` yet, create one from your backend with `POST /users`. ```bash curl https://api.onefootprint.com/users \ -X POST \ -u sk_test_xxxxx: ``` The response returns the new user's `fp_id`. ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" } ``` Store the `fp_id` on your user record; every call that reads or vaults data uses it. To bring over data you already hold, see [Migrating user data](/articles/integrate/migrate-existing-data). ## Step 2: Create a client token (server-side) A client token is a short-lived credential that lets client code vault data. Create it from your backend. A vault holds structured data, such as identity and cardholder fields, and custom key-value data. Footprint validates structured fields on write, so the data is in a known format when you use it in your applications or for reporting and compliance. Custom fields hold any other sensitive user data. Cards are named, for example `card.primary` or `card.secondary`, so a vault holds any number of cards under names you choose. [Payment cards](/articles/vault/apis#payment-cards) explains how identity, card, and custom data are namespaced. Request a token for the exact fields the client vaults, with the `vault` scope. ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/client_token \ -X POST \ -u sk_test_xxxxx: \ -d '{ "fields": [ "card.primary.number", "card.primary.cvc", "card.primary.expiration", "card.primary.name" ], "scope": "vault", "ttl": 180 }' ``` List exactly the fields the client is going to vault. The response returns the token and when it expires. ```json { "expires_at": "2023-05-24T14:15:22Z", "token": "ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0" } ``` Send the token to your client; the client vaults data with it in the next step. ## Step 3: Use the client token to store data in the vault (client-side) From the client, send the fields to `PATCH /users/vault` with the token in the `x-fp-authorization` header. ```bash curl https://api.onefootprint.com/users/vault \ -X PATCH \ -H 'x-fp-authorization: ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0' \ -d '{ "card.primary.number": "4242424242424242", "card.primary.cvc": "424", "card.primary.expiration": "10/29", "card.primary.name": "Whitfield Diffie" }' ``` The token can vault only the fields listed when it was created in step 2. A successful request returns status 200 and an empty object. ## Step 4 (optional): Use a client token to decrypt data The client-side vaulting APIs decrypt data in two ways: structured decryption and downloads. ### Structured decrypt example Structured decryption returns several small fields at once, such as `id.ssn9` or `card.*.number`, and works like its backend counterpart. On your backend, create a client token with the fields to decrypt and the `decrypt` scope. The token is safe to pass to your frontend: it expires quickly and is limited to those fields. ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/client_token \ -X POST \ -u sk_test_xxxxx: \ -d '{ "fields": [ "id.ssn9", "card.primary.number" ], "scope": "decrypt", "ttl": 180, "decrypt_reason": "test structured" }' ``` The response returns the token. ```json { "expires_at": "2023-07-31T14:15:22Z", "token": "ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0" } ``` On the client, call the decrypt endpoint with that token. It decrypts any field named when the token was created. ```bash curl https://api.onefootprint.com/users/vault/decrypt \ -X POST \ -H 'x-fp-authorization: ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0' \ -d '{ "fields": ["id.ssn9", "card.primary.number"] }' ``` The response returns the decrypted values. ```json { "id.ssn9": "123-45-6789", "card.primary.number": "4242424242424242" } ``` ### Download decrypt Download decryption suits larger objects such as files, and in particular the case where the user downloads the file directly instead of your app decrypting it. On your backend, create a client token with a single field and the `decrypt_download` scope. ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/client_token \ -X POST \ -u sk_test_xxxxx: \ -d '{ "fields": [ "custom.paystub_w2" ], "scope": "decrypt_download", "ttl": 180, "decrypt_reason": "download w2 test" }' ``` The response returns the token. ```json { "expires_at": "2023-07-31T14:15:22Z", "token": "ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0" } ``` The client then decrypts and downloads the object with a GET request that carries the token in the path. The response body is the contents of the object named in `fields`, so your frontend can save it straight to the user's device. ```bash curl https://api.onefootprint.com/users/vault/decrypt/ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0 ``` ## Businesses Client-side vaulting works the same way for a business vault, with the business routes and [business fields](/articles/vault/fields#business-fields). If the business has no `fp_bid` yet, create its vault from your backend with `POST /businesses`. ```bash curl https://api.onefootprint.com/businesses \ -X POST \ -u sk_test_xxxxx: ``` The response returns the new business's `fp_bid`. ```json { "id": "fp_bid_YuZKhCJb7LAqDYFjfyRulpNfaTnCOCzZ" } ``` From your backend, create a client token for the business fields the client vaults, with the `vault` scope. ```bash curl https://api.onefootprint.com/businesses/fp_bid_YuZKhCJb7LAqDYFjfyRulpNfaTnCOCzZ/client_token \ -X POST \ -u sk_test_xxxxx: \ -d '{ "fields": [ "business.name", "business.tin" ], "scope": "vault", "ttl": 180 }' ``` From the client, send the fields to `PATCH /businesses/vault` with the token in the `x-fp-authorization` header. The values go straight to Footprint without passing through your servers. ```bash curl https://api.onefootprint.com/businesses/vault \ -X PATCH \ -H 'x-fp-authorization: ctok_vJK5Ze2N5fQ1GtE5V770BH8CZtQwXHF1hxowB9Nowh0' \ -d '{ "business.name": "Acme Bank", "business.tin": "12-3456789" }' ``` A successful request returns status 200 and an empty object. ## Next steps Once the data is in the vault, the [Vault introduction](/articles/vault/apis) shows how your backend lists, decrypts, and searches it. Every field a client token can name, with its format, is in [Vault fields](/articles/vault/fields). --- # Migrating user data This guide moves sensitive user data from your own data stores into Footprint's Nitro Enclave-backed vaults. Migrated users use the same vaulting APIs as users who onboard through Footprint's embedded KYC flows: create, decrypt, search, and proxy all work the same way. Progressive onboarding, watchlist checks, and embedded components also work on migrated user data. ## Before you start You need a server-side API key; see [API authentication](/api-reference#authentication). ## 1. Create a user vault If the user has no `fp_id` yet, create a vault with POST /users. Pass the data you already hold for the user as a key-value map, and the vault is created with it. ```bash curl https://api.onefootprint.com/users \ -X POST \ -u sk_test_xxxxx: \ -d '{ "id.first_name": "Jane", "id.middle_name": "Samantha", "id.last_name": "Doe", "id.dob": "1988-12-30", "id.ssn9": "123-45-6789", "id.address_line1": "1 Penguin Pond", "id.city": "Polar Plunge", "id.state": "NY", "id.zip": "10014", "id.country": "US", "id.phone_number": "+15555550100", "card.primary.number": "4242424242424242", "card.primary.cvc": "424", "card.primary.expiration": "12/24", "custom.account_number": "42421212312", "custom.routing_number": "12121212121" }' ``` The response returns the user's `fp_id`. ```json { "id": "fp_id_K0q6Eh6Rr3WOOfFBLPiHsr" } ``` The `fp_id` is the only identifier you need to store for this vault; every piece of vault data is referenced by it. We recommend storing the `fp_id` alongside the user's existing record in your database. Each user in your database should map to a single `fp_id` in Footprint. A successful response means the data passed validation, the vault exists, and the data is stored. Otherwise the error names the field that failed validation, and no vault is created. A vault holds identity data, debit and credit card data, identity documents such as driver's licenses and passports, custom key-value records, and more. Footprint validates structured data as it is vaulted. The POST /users reference covers the field names and the request in detail. ## 2. Check data integrity (optional) On a large migration you may want proof that what landed in the vault matches your database byte for byte. The `integrity` endpoint computes signed `HMAC-SHA256` hashes of the vaulted values so you can compare them against your own. It is being phased out in favor of the `transforms` option on decrypt, which covers the same need; prefer that in a new integration. Send a hex-encoded `signing_key` and the fields to check in `fields`. For each `key` in `fields`, the response contains `hmac-sha256(signing_key, vault[key])`. ```bash curl https://api.onefootprint.com/users/fp_id_K0q6Eh6Rr3WOOfFBLPiHsr/vault/integrity \ -X POST \ -u sk_test_xxxxx: \ -d '{ "fields": ["id.first_name", "id.last_name", "id.ssn9", "card.my_alias.number"], "signing_key": "a1f928d87278290bf9dece075d0e46330a01d21b346073f4f193739078dca458" }' ``` The response returns one signature per field. ```json { "id.first_name": "6e9b8af84ffc8829f03911f73c997d27c62a4c2078d90320ebcb7dbbce0e39a5", "id.last_name": "55c6c9c45dc54391fdd2f98d719095479ca3022f8583d1a6442d4c66889f8bb9", "id.ssn9": "18568e3cd81f27a50e56750317d3446a3080f3aba4a726af3b848b51eb37071f", "card.my_alias.number": "4f8a7abfbf11912991b364fd429f2a59cea4c859619692e712b628752cb83ecf" } ``` ## Next steps * [API reference](/api-reference#post-users) for `POST /users`. * [Vault introduction](/articles/vault/apis) covers reading, decrypting, and searching vault data. * [Vault Proxy](/articles/vault/proxy) lets you use vaulted data without your backend touching it. ## Manual migration assistance For help with a migration, email `support@onefootprint.com` with the details of your request. Encrypt any sensitive data with the PGP key below before sending it. ### Footprint PGP instructions Use [GPG](https://gnupg.org) to [import](http://www.gnupg.org/gph/en/manual.html#AEN84) the public key below, then encrypt each file. ```bash gpg --encrypt --recipient 1ED420961981B558 ``` In this command: * `1ED420961981B558` is Footprint's key ID. * `` is the plaintext file you are encrypting. * `.gpg` is the encrypted output to send to Footprint. ### Footprint PGP public key ```text -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBGZWM3EBEADt8TjjHZ6VyDXqzq7P7cdxjaHKcyOKltM+fl+JKmaeexO3H6Gz PK8hNnQ1Z+kmMc5th7JpN+Zcbq9IHDsx5POwe8dSOznGFU70TiUFY2WnNBMYVpNN v1noa3UUMVlgo/xkriCOvwXfcSfmz4nNyp0vaSvtma7vuTF3vUKLfFZUoJjnGBTm kMD9uMcqFjt2FowyOKH0zvn0xNhAfb9pq/kXoHwsf8wt8brDMVxG2BQYasJPcfl4 z60irxQnIxc9vi5wolRx2fjzn1Y/xhXCv6/eLz9mUchxLiE010siAXTclAJUolAD YRf1qYHwMi2xW+VHDg4Myz4QsbN8tuNa6LzTbpIPgRxusPYYPBatP3dt3vPGnnKM Y8pZVV1xdsujunoEgQJGq1DZH+tDu+BwH96jqkTDX2PMvY1BWWLGmZuyiDu/9aTB gIlXlyp6Z1q0PZV96+p2B6DRCPeZuIY9bUaE2AiROF7TrtTYXow8GIy4D6oCTN90 g7to+HUdUgntMgXG81vqdX4agAGlf+19JdPUie1qYrbZB6RDIV94+bxQyoE1ebMR fgedeDr8A0ESymjIo4335ZYeGxwaQmWyZ/CcFKmuH0d7isq89B+XuAD3mE1IUuDv kAfpAmAzmh1xJ/hmege6QN2QogDXNYQyvBbTykpeB3BQdgr9pseXmeaIWQARAQAB tC1Gb290cHJpbnQgUEdQIEtleSA8c2VjdXJpdHlAb25lZm9vdHByaW50LmNvbT6J AlQEEwEIAD4WIQQvZgtWJBipI816pvQe1CCWGYG1WAUCZlYzcQIbAwUJEtfgaQUL CQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRAe1CCWGYG1WFyaEAC66BFrzxt0PqnB f3eXGCT3BMAYBauIwwlbqGTY1XUU+E68BfBuScqMCTFc9daHJR02GiS0Xth4bmq+ I5ldpUdiVatAoJl9pZZzSsfCmFkqcv71xc1TSinWGmPzfuXcVibaa6v5ypqEpgKC q8Uh314Gotwk/yt+3+4SfiUNCcOE+1vbVmZfgnEyzyB2EeBX62WusBW1jzQ2JXyG wneZ7CiAQcliJAP5goNK38/W9pcdEYXTL8IkYXxboJY1hOZj3sTTqp3/crB2vOJO C1bra83a0mLoWmaS0/X503WyC44pYp7V48vRkCyM0P69lFS7RTjK3hhcVB6V/nnz M78cRMgn7kCqHgvsTCvpk4UDcM4b6XUKYs2Pph2Ouz3/b+EPeAtVWVuGp1F55Iti u8WAVFr8/hprq8FVl6d0aWxTtIa2mr0ht7jq6Vv/yzpLEcqsBBr9nwvn623iSQaQ BYx35D/6yUbGjj62kVbkQ61ydhXFqQ32k4uyaS5DaZ5vDmK01FckvsLrIXHlOGfZ VMmbsFnzflDI1v5jckKXpbGYOUbCHksmtdoGUtxK0c457FxpaYaw8hi/+FPz6HOC IH4XqlrbPpNckBCajAJN+fc+DVVHJVyzzZN75gtR57V0LtqQ6dAUxmfbrZnYmlx3 PyafmzLPJMOxYh+cx4nXuTuIKGYu3LkCDQRmVjNxARAAoAAO/dnqICjpm7QX999c 56H2g0tvRfrmXaZso1ctr5DmAYz9Tx4kzcEJGd2jPVvv4UPDsThjjsK3KJqS5nFi Q/xsyHHj8A5VcYfqytkkC0kV9iX7RoW3yzRCY+751ic2XjEZ46tmWdncLjCVHv1q SPkpcUcru8sda5D9lwGm0w1bxbrfLFF+7LALHAA3Rz37hnO2+I29fTBN19jkYDc5 fm2/vA93yUrOAqS+KH4YC7of+aPDK7mFw+o1YuWciYAMtN3C37fbs2xO3tY7h8DH 5LRCbGDSuFCauW7LXVZULayaH5O9kBwU5lq+jCLJlpuy/9ZjHeHQGqqSCE//rL/1 rkwJ72xB/V+TP7t+NCko4LSWSDDjiScC7UhqebOOtPr5+G/VUMGWflq2gP6KAVh/ uQkk//jp05adSMBu+s4vp5ArGJuIUtnIlD1Z7YZ+x+orxbSQx/ddqqo4jYXQAg1Y SGtq0ercoExh7Gnchj1SHUtu7Y7o4KN8ikrUvYtgq56eW43w0JPsV3E0jFZEgjti NtG/HQRxQjwMgUbK3bvnaEon+lcY5bAwE09cuZ06KRriBGrO/fRb4vbzl/X0iZeR reXgHQ/Fr8NitFJkoMSxel23XsEF37KZNoRhOAyJkHUWu/RkOfZ7isdO63+v1v6N JM3aBTDKq/xsFElanawZmyEAEQEAAYkCPAQYAQgAJhYhBC9mC1YkGKkjzXqm9B7U IJYZgbVYBQJmVjNxAhsMBQkS1+BpAAoJEB7UIJYZgbVYpMsP/R6dHdiEn/OCVfpx KlCIFMaD/gry1YiVo4p4NJzUY1N9gujIvsTarHFfELpP2JBsBt6XZglstqThv+RW 7HcKApDk7z99WqYqI3kq2n+3S99C8tHv5KObY3ayjZRX+mJJbh3urlqBLApszP0Q X2Bd0e2OKHq1EkAZ2t7SXyPk3mPh5qTCXXb7oHp0sWS08CJdAz0ivD6rD65CG+QW Fsd/Hs5DuyQooXUzbhCtksF90zowyJzMNWoWE6RiwMWHR505+iJrU/C2LMEumoJb F4BXmBIlR/rnApiUxpuYsW1w+LNVuWgX++sn7UWLYMuhif28OLh6jqIdz6jsw2lr DyfQdCSQKadngZNAjvmP8R3azWaLA6Vs14EUJleo9bH2e5tHPNxTm/L3lNukZgw3 wgZMC5Z/XMzasz2Fbu3D2MGKynZL12kOQsyiHlnPXWmdXjWjNNXhTECyfkmNkWaA NZ4sENur27l1VRZerMpblFnTtasQI2dTkpt2FXdXLUhZDK7OusQExk4E8xATLiwv J6xz6VfoSZrAuJ/qLMXac+XoZdrbhqBMSYk8k/FOGnCCrCnvI39k+VPn9KoTTBdZ +dfKUURDufG8FuZs6hCb6WTzbuuNbZPtzLYootf8g8CUUU0KZFg+dw7QQsq78FVT OwC3wKkvTn6QpiPA9DDuE3PSp2ZZ =EpSl -----END PGP PUBLIC KEY BLOCK----- ``` --- # Vault Proxy Vault Proxy forwards a request from your backend to a third-party service, such as a payment gateway, and fills in vaulted data on the way, so sensitive data such as PII and PCI data never touches your application code or infrastructure in plaintext. Keeping that data off your network also helps you meet compliance requirements such as PCI. Call the proxy from your backend with your secret API key; the [API authentication guide](/api-reference#authentication) covers how. Vault Proxy supports: | Feature | Overview | | -------------------------- | ---------------------------------------------------------------------------------------------------------------- | | Any HTTPS URL and method | Works with any HTTPS resource | | Flexible detokenization | Detokenizes any type of request body, whatever the content type | | Fixed IP range | Requests from Vault Proxy always come from a fixed set of IP addresses that you can allowlist at the destination | | Custom headers | Attaches custom headers | | Authentication secrets | Attaches custom authentication secrets | | Client certificates (mTLS) | Attaches a certificate and key for mTLS client certificate authentication | | Server certificate pinning | Validates the destination against one or more root CAs and leaf certificates you specify | | Ingress vaulting | Vaults data that comes back in the response, with JSONPath rules (XPath and regex are planned) | ## Configuration You configure the proxy in one of two ways: save a configuration in the dashboard or through the admin API, or pass every setting as headers on each request ("just-in-time"). Both support the same capabilities. A saved configuration also holds the destination's authentication credentials, so you do not manage them in your requests. ### Just-in-time To proxy to any destination without a saved configuration, send this header: | Header | Usage | Description | | ----------------------- | ------------------------- | --------------------------------------------- | | `x-fp-proxy-target-url` | Required for just-in-time | The HTTPS URL Footprint routes the request to | ### By configuration To use a configuration you saved in the dashboard or through the API, put its `id` in the request path: ```bash curl https://api.onefootprint.com/vault_proxy/proxy_id_AY5ec7I5QDUFWG8BAQG78k \ ...other parameters... ``` ## Basics ### Making a proxy request A Vault Proxy request is an authenticated HTTP `POST` to `/vault_proxy/jit` or `/vault_proxy/{proxy_config_id}`. For example, this request fills in one user's vaulted data and forwards the body to a payment API: ```bash curl https://api.onefootprint.com/vault_proxy/jit \ -u sk_test_xxxxx: \ -X POST \ -H 'x-fp-proxy-target-url: https://payments.acmebank.com' \ -H 'x-fp-proxy-fwd-custom-header: custom value' \ -H 'x-fp-proxy-fwd-content-type: application/json' \ --data '{ "full_name": "{{ fp_id_tctecBEvGc98V7Vx4MhZU.id.first_name }} {{ fp_id_tctecBEvGc98V7Vx4MhZU.id.last_name }}", "last4_ssn": "{{ fp_id_tctecBEvGc98V7Vx4MhZU.id.ssn4 }}", "cc": "{{ fp_id_tctecBEvGc98V7Vx4MhZU.custom.credit_card }}", "cc_exp": "{{ fp_id_tctecBEvGc98V7Vx4MhZU.custom.credit_card_exp }}", "cc_cvc": "{{ fp_id_tctecBEvGc98V7Vx4MhZU.custom.credit_card_cvc }}" }' ``` Footprint detokenizes each field in the body inside the vault enclave, then sends the updated plaintext body to the target (here `https://payments.acmebank.com`) with the headers `'Custom-Header: custom value'` and `'Content-type: application/json'`. Footprint then returns the target's response to you: its status code, headers, and body. A 5xx from the target comes back as a `502`, and the `x-footprint-proxy-upstream-status-code` header always holds the target's original status code. On a 2xx, any [ingress rules](#ingress-vaulting) first vault the values they match and replace them with tokens in the body. Control headers change how the upstream request behaves: | Header | Required? | Function | | -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------ | | `x-fp-proxy-fwd-
` | Optional | Sends a header named `
` with the corresponding value | | `x-fp-proxy-method` | Optional | Selects the HTTP method (defaults to `POST`) | | `x-fp-proxy-access-reason` | Optional | The decryption reason recorded in the access and security logs during detokenization. Defaults to no reason. | The request fails if the API key lacks permission to detokenize any of the supplied fields, or if any supplied field does not exist in the vault. The body does not need to be JSON. Footprint substitutes tokens in place in any UTF-8 body; the [token body template format](#basics-token-body-template-format) describes how to write them. ### Token body template format Vault Proxy replaces every token in the request body with the decrypted plaintext value. A token starts with `{{` and ends with `}}`, and you can write it in one of two forms. **Fully-qualified tokens.** Write `{{ . }}`, where `` is the user's `fp_id` and `` is any identity (KYC) field, prefixed `id.`, or any custom field you defined, prefixed `custom.`. | Fully-qualified format | | ------------------------------------------------------ | | `{{ fp_id_tctecBEvGc98V7Vx4MhZU.id.last_name }}` | | `{{ fp_id_tctecBEvGc98V7Vx4MhZU.id.ssn9 }}` | | `{{ fp_id_tctecBEvGc98V7Vx4MhZU.id.dob }}` | | `{{ fp_id_tctecBEvGc98V7Vx4MhZU.custom.credit_card }}` | **Inferred-user tokens.** When every token refers to one user's vault, name that user in a header instead: | Header | Value | | --------- | ------------------------------------------- | | `x-fp-id` | The `fp_id` of the user the tokens refer to | Each token then omits the `` part and becomes `{{ }}`. | Inferred-user format | | -------------------------- | | `{{ id.last_name }}` | | `{{ id.ssn9 }}` | | `{{ id.dob }}` | | `{{ custom.credit_card }}` | ### Filter functions Filter functions transform a value on its way into or out of the vault, as in template languages such as Jinja and Handlebars. Append zero or more filters to a token, separated by `|`. | Filter function | Description | | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `to_lowercase` | Converts the target UTF-8 string to lowercase | | `to_uppercase` | Converts the target UTF-8 string to uppercase | | `to_ascii` | Converts the target UTF-8 string to ASCII characters only | | `prefix(n)` | Returns the first `n` characters of the target UTF-8 string, where `n` is a positive integer | | `suffix(n)` | Returns the last `n` characters of the target UTF-8 string, where `n` is a positive integer | | `replace(from,to)` | Replaces every match of the string `from` with the string `to` in the target UTF-8 string | | `date_format(from_format,to_format)` | Parses the target string in date format `from_format` and converts it to date format `to_format`. Supports [`strftime` format strings](https://strftime.org). Errors if the target string cannot be coded in the supplied formats | | `hmac_sha256(key)` | HMAC-SHA256, where the `key` argument is parsed as a hex-encoded string and the output is hex-encoded | | `encrypt(algorithm, public_key)` | Asymmetrically encrypts the value to a public key. `algorithm` is `rsa_pkcs1v15` or `ecies_p256_x963_sha256_aes_gcm`, and `public_key` is a hex-encoded DER-formatted public key. RSA public keys must be in PKCS#8 format | Enclose string arguments to filter functions in `"` or `'` quotes. For example: * `{{ id.last_name | to_ascii | to_uppercase }}` converts `Doè` to `DOE`. * `{{ id.dob | date_format("%Y-%m-%d", "%A in %B of %y") }}` converts `1988-12-30` to `Friday in December of 88`. * `{{ custom.ach_account| replace("-", "") }}` converts `12-1212-1212` to `1212121212`. ## Ingress vaulting Ingress vaulting rules pick fields out of the destination's response and vault them, so the proxy tokenizes incoming data as well as detokenizing outgoing data. You can define all of your ingress rules in the dashboard or through the admin API and invoke the configuration by its `id` at `api.onefootprint.com/vault_proxy/{proxy_id}`. A saved configuration does not say which user's vault to write to, so a request that uses its ingress rules must carry this header: | Header | Format | Value | | --------- | --------- | ---------------------------------------- | | `x-fp-id` | `` | The user whose vault receives the values | For example, send the header `'x-fp-id: fp_id_tctecBEvGc98V7Vx4MhZU'` when the configuration's rule is `custom.credit_card_number=$.data.card.number`. ### Just-in-time ingress vaulting Without a saved configuration, pass each rule as an `x-fp-proxy-ingress-rule` header in the form `.custom.=`, where the path syntax depends on the response content type. When one or more `x-fp-proxy-ingress-rule` headers are present, you must also send a single `x-fp-proxy-ingress-content-type` header. The left side of a rule uses the same token format as the body, without the `{{` and `}}` delimiters. ### JSONPath Ingress supports JSON responses only, with [JSONPath](https://github.com/json-path/JsonPath) to select the value. This rule vaults a card number from the response: ```bash -H 'x-fp-proxy-ingress-rule: fp_id_tctecBEvGc98V7Vx4MhZU.custom.credit_card_number=$.data.card.number' ``` Given the response below, it extracts `4242424242424` and vaults it as `custom.credit_card_number` in the vault of `fp_id_tctecBEvGc98V7Vx4MhZU`: ```json { "data": { "card": { "number": "4242424242424", "expiration": { "month": "04", "year": "25" } }, "processor": "amex" } } ``` | More examples | | --------------------------------------------------------------------------------- | | `fp_id_tctecBEvGc98V7Vx4MhZU.card.primary.number=$.data.card.number` | | `fp_id_tctecBEvGc98V7Vx4MhZU.card.primary.exp_month=$.data.card.expiration_month` | | `fp_id_tctecBEvGc98V7Vx4MhZU.card.primary.exp_year=$.data.card.expiration_year` | | `fp_id_tctecBEvGc98V7Vx4MhZU.card.primary.cvc=$.data.card.security_code` | To reformat a value before it is vaulted, append [filter functions](#basics-filter-functions) to the right of the JSONPath selector: ``` . = | | | ... ``` For example, given this response body: ```json { "card": { "number": "4242-4242-4242-4242" } } ``` this rule strips the dashes before vaulting: ``` fp_id_tctecBEvGc98V7Vx4MhZU.card.primary.number = $.card.number | replace("-", "") ``` The result is `fp_id_tctecBEvGc98V7Vx4MhZU.card.primary.number` with the value `4242424242424242`. ## Reflection The `reflect` endpoint runs the token substitution and returns the result to you instead of forwarding it to a destination: the "first hop" of the proxy on its own. Use it to decrypt data into a complex object or to test your Vault Proxy configurations. For example, this request returns a sentence with two vault fields filled in: ```bash curl https://api.onefootprint.com/vault_proxy/reflect \ -u sk_test_xxxxx: \ -H 'x-fp-id: fp_id_JHSfbHz7VdxfoPXuaOlZqb' \ --data \ 'The name on my credit card is {{ card.primary.name | to_ascii | to_uppercase }}. I was born on a {{ id.dob | date_format("%Y-%m-%d", "%A in %B of %y") }}.' The name on my credit card is JANE DOE. I was born on a Friday in December of 88. ``` Send a `POST` to `/vault_proxy/reflect` with the body written in proxy token syntax, filter functions included. Add an `x-fp-id` header to use inferred-user tokens and omit the `fp_id` from each token. ## Advanced proxy settings Vault Proxy also supports mTLS (client certificates), certificate pinning (custom server certificates), and vaulting selected parts of the response. The sections below configure them with just-in-time headers. We recommend saving them in the dashboard instead: it is simpler and more secure, because you do not manage authentication secrets for the destination service yourself. ### Client certificate authentication (mTLS) To connect to the destination with mutual TLS (mTLS), supply a client certificate and key. Only a single certificate and key pair is accepted. Encode both as [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail), then [percent-encode](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) them. ### Service certificate pinning and root CAs Pinning is optional. To enable it, supply one or more server certificates or root CAs to validate the destination's server certificate against. When you supply several, the connection succeeds if any one of them validates the incoming certificate chain. Encode each as [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail), then [percent-encode](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) it. ## Header and configuration reference Every header the proxy accepts, for configuring and invoking it just-in-time. Values stored in a saved configuration do not need to be sent on each request. | Header | Usage | Description | | --------------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `x-fp-proxy-target-url` | Required for just-in-time | The HTTPS URL Footprint routes the request to | | `x-fp-proxy-method` | Optional | Selects the HTTP method (defaults to `POST`). Overrides the configuration's value if present | | `x-fp-proxy-fwd-
` | Optional. Multiple allowed | Sends a header named `
` with the corresponding value | | `x-fp-path-and-query` | Optional | Adds a path and/or query parameters to the proxy target URL | | `x-fp-id` | Optional | The user the tokens refer to. Required when tokens in the body omit the `fp_id_` prefix | | `x-fp-proxy-access-reason` | Optional | The decryption reason recorded in the access and security logs during detokenization. Defaults to no reason | | `x-fp-proxy-client-cert` | Optional. Percent-encoded PEM | The client certificate to use | | `x-fp-proxy-client-key` | Optional. Percent-encoded PEM | The client certificate private key to use | | `x-fp-proxy-pin-cert` | Optional. Percent-encoded PEM. Multiple allowed | A root CA certificate or self-signed certificate to validate the server's certificate against | | `x-fp-proxy-ingress-content-type` | Optional | The content type of the response to process ingress rules on. Only `json` is supported today; `regex` and `xml` are planned | | `x-fp-proxy-ingress-rule` | Optional. `=`. Multiple allowed | An ingress rule: the namespaced token to vault and the path of its value in the response | ## Playground Footprint's `ditto` server echoes the headers and body of any request sent to `https://ditto.footprint.dev`, so you can test a proxy configuration against it. ### Basic usage A direct request shows what `ditto` echoes: ```bash $ curl -i -X POST https://ditto.footprint.dev -H 'Test-Header: FootprintRocks' --data '{"hello": "world" }' test-header: FootprintRocks content-type: application/x-www-form-urlencoded {"hello": "world" } ``` Set `https://ditto.footprint.dev` as the proxy target to check that decryption and token templating produce the body you expect. ### Testing with client certificates To test mTLS with a client certificate, send the request to `https://ditto.footprint.dev:8443` (port 8443). The server certificate is self-signed, so either trust it or pin it in the configuration. With a client certificate, the echo includes its serial: ```bash $ curl --cert client.crt --key client.key -i -k -X POST https://ditto.footprint.dev:8443 -H 'Test-Header: FootprintRocks' --data '{"hello": "world" }' x-ditto-client-cert-serial: 12431179266346922388 test-header: FootprintRocks content-type: application/x-www-form-urlencoded {"hello": "world" } ``` When a client certificate is used, `ditto` returns its serial in the `x-ditto-client-cert-serial` header. --- # Introduction and security model Vault Disaster Recovery (DR) is an enterprise feature that gives you control over your data vaulted with Footprint in an emergency, without loosening the security around it or raising your day-to-day risk. With it enabled, Footprint continuously writes encrypted backups of vaulted data to cloud storage you own, such as Amazon S3. In normal operation your risk stays low, because access to the vaulted data remains protected and audited by Footprint. In a catastrophe, when you need to "break glass" and reach your data without Footprint's services, Footprint or an escrow discloses a payload that decrypts the backups. ## How it works Vault Disaster Recovery uses the [age](https://age-encryption.org/) encryption format, which supports multiple pluggable recipients and seekable streaming encryption, and a key structure that lets you test recovery on individual records without weakening the long-term confidentiality of the data. No system or person can decrypt Vault Disaster Recovery backups on its own: * Footprint cannot decrypt, or even read, the vaulted data written to your cloud storage. * You can decrypt individual Vault DR records to test recovery, through an audited and access-controlled API like the standard vault decryption API. * You cannot decrypt Vault DR records outside Footprint until Footprint or an escrow discloses a "recovery payload." Three kinds of cryptographic keys make this possible. ### 1. Org keys You generate one or more org-scoped key pairs during onboarding. They live on YubiKeys and use P-256 elliptic curve cryptography. Footprint encrypts other private keys to (or "wraps" them with) the org public keys, so it can store those private keys and transfer them to you without keeping unused long-term access to them. You hold the org private keys and use them, together with Footprint or an escrow, to recover data from the cloud storage bucket. ### 2. Record keys Each record in the cloud storage bucket is encrypted with its own record key pair. Footprint encrypts the record private key to the org public key, stores the wrapped record key internally, and discards the record private key at once. It then encrypts the vaulted data to the record public key and writes the result to cloud storage. To test decryption of one record, you request its encrypted record key through a Footprint API; the request is audited and controlled like a standard vault decryption. Only you can unwrap the record key, with the org private key, and that record key decrypts only that single record. ### 3. Recovery key pair With age's multi-recipient hybrid encryption, Footprint also encrypts each file in the cloud storage bucket to a recovery public key. Footprint generates the X25519 recovery key pair during onboarding, encrypts the recovery private key to the org public key, and discards the recovery private key at once. You choose who holds the wrapped recovery private key, known as the "recovery payload": 1. Footprint stores it, and works with you to trigger disaster recovery, or 2. A third-party escrow stores it, so you can trigger disaster recovery without Footprint. You never store the recovery payload yourself, so no single person or system can hold both the recovery private key and the data encrypted to it. ## Security model Each of the three decryption flows needs a different set of components: Online Decrypt API Test Recovery Full Recovery Footprint API is online Required Required Footprint API key with decryption scopes Required Required Read access to backup S3 bucket Required Required Org private key Required Required Wrapped record keys(fetched via audited testing API) Required Recovery payload(held by Footprint or an escrow) Required The Test Recovery flow does not relax the protection of [Footprint's enclave](https://onefootprint.com/blog/inside-the-enclave-part-1): it is audited in the same ways as the standard online vault decryption APIs and requires the same level of API key access. Before a Full Recovery, neither Footprint nor you holds the components needed to decrypt data offline through the Full Recovery flow. Spreading the components for Full Recovery across several parties limits what an adversary gains from any one of them. It also raises the cost and complexity of an attack, since more than one organization has to be compromised to decrypt data offline. ## Next steps * [Onboarding](/articles/guides/vault-disaster-recovery-onboarding) enrolls your organization: the CLI, the S3 bucket, the IAM role, and org keys on YubiKeys. * [Operations](/articles/guides/vault-disaster-recovery-operations) checks backup status and runs a test or full recovery. --- # Onboarding By the end, Footprint continuously backs up your vaulted data, encrypted, to an S3 bucket you own, and the org keys that unlock a recovery live on YubiKeys you control. ## Before you start * An AWS account and permission to configure AWS resources. * The Admin role in the Footprint dashboard. * A YubiKey that supports the PIV card interface over USB, such as a [YubiKey 5C](https://www.yubico.com/product/yubikey-5-series/yubikey-5c/). Amazon often has the [YubiKey 5C NFC](https://www.amazon.com/Yubico-Two-factor-authentication-security-certified/dp/B08DHL1YDL) available for fast delivery. ## 1. Install Vault Disaster Recovery tools The `footprint-dr` CLI handles enrollment and decryption. On a Mac, install it with Homebrew: ```bash brew install onefootprint/tap/footprint-dr ``` For other platforms, download a release from [footprint-dr-releases](https://github.com/onefootprint/footprint-dr-releases/releases). ## 2. Create an API key and log in with the CLI Open the [API keys page](https://dashboard.onefootprint.com/api-keys) in the Footprint dashboard and use the toggle in the top right corner to select **Sandbox** or **Production**, whichever data set you are enrolling. Create an API key with an admin scope. Run `footprint-dr login [--sandbox/--live]` and paste the API key at the prompt: ```text filename="Example Output" $ footprint-dr login --live Enter Footprint Live API key: ``` ## 3. Create a bucket for encrypted data storage Footprint stores the encrypted data in a dedicated S3 bucket you own. Create one like the Terraform example below, in the `us-east-1` region for the best performance: ```terraform resource "aws_s3_bucket" "fp_vault_data" { bucket = "acme-inc-footprint-vault-data" } resource "aws_s3_bucket_public_access_block" "fp_vault_data_public_access_block" { bucket = aws_s3_bucket.fp_vault_data.id block_public_acls = true block_public_policy = true ignore_public_acls = true restrict_public_buckets = true } ``` We recommend a dedicated AWS account with tight access controls for this bucket. The fewer principals that can read it, the less an unintentional leak of an org private key exposes. We recommend CloudTrail audit logs for data events on the bucket as well. This Terraform creates the trail and its log bucket: ```terraform resource "aws_s3_bucket" "fp_vault_data_cloudtrail" { bucket = "acme-inc-footprint-vault-data-cloudtrail" } resource "aws_s3_bucket_public_access_block" "fp_vault_data_cloudtrail_pab" { bucket = aws_s3_bucket.fp_vault_data_cloudtrail.id block_public_acls = true block_public_policy = true ignore_public_acls = true restrict_public_buckets = true } locals { fp_vault_data_cloudtrail_name = "footprint-vault-data-cloudtrail" } data "aws_iam_policy_document" "fp_vault_data_cloudtrail" { statement { sid = "AWSCloudTrailAclCheck" effect = "Allow" principals { type = "Service" identifiers = ["cloudtrail.amazonaws.com"] } actions = ["s3:GetBucketAcl"] resources = [aws_s3_bucket.fp_vault_data_cloudtrail.arn] condition { test = "StringEquals" variable = "aws:SourceArn" values = ["arn:${data.aws_partition.current.partition}:cloudtrail:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:trail/${local.fp_vault_data_cloudtrail_name}"] } } statement { sid = "AWSCloudTrailWrite" effect = "Allow" principals { type = "Service" identifiers = ["cloudtrail.amazonaws.com"] } actions = ["s3:PutObject"] resources = ["${aws_s3_bucket.fp_vault_data_cloudtrail.arn}/AWSLogs/${data.aws_caller_identity.current.account_id}/*"] condition { test = "StringEquals" variable = "s3:x-amz-acl" values = ["bucket-owner-full-control"] } condition { test = "StringEquals" variable = "aws:SourceArn" values = ["arn:${data.aws_partition.current.partition}:cloudtrail:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:trail/${local.fp_vault_data_cloudtrail_name}"] } } } resource "aws_s3_bucket_policy" "fp_vault_data_cloudtrail" { bucket = aws_s3_bucket.fp_vault_data_cloudtrail.id policy = data.aws_iam_policy_document.fp_vault_data_cloudtrail.json } resource "aws_cloudtrail" "fp_vault_data_cloudtrail" { name = local.fp_vault_data_cloudtrail_name s3_bucket_name = aws_s3_bucket.fp_vault_data_cloudtrail.id include_global_service_events = false depends_on = [aws_s3_bucket_policy.fp_vault_data_cloudtrail] event_selector { read_write_type = "All" include_management_events = true data_resource { type = "AWS::S3::Object" values = ["${aws_s3_bucket.fp_vault_data.arn}/"] } } } ``` ## 4. Fetch your external ID The [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) secures the cross-account IAM access. Fetch it with `footprint-dr get-external-id [--sandbox/--live]`: ```text filename="Example Output" $ footprint-dr get-external-id --live 42ee4f928973996f8f855aebaebf70cd ``` ## 5. Create an IAM role for bucket management Footprint needs read and write access to the bucket to manage the encrypted data. Create an IAM role that delegates that access, like the one below, substituting your external ID: ```terraform locals { external_id = "42ee4f928973996f8f855aebaebf70cd" } resource "aws_iam_role" "fp_vault_data_management" { name = "fp-vault-data-management" assume_role_policy = data.aws_iam_policy_document.fp_vault_data_management_assume_role_policy.json } data "aws_iam_policy_document" "fp_vault_data_management_assume_role_policy" { statement { actions = ["sts:AssumeRole"] principals { type = "AWS" identifiers = ["725896863556"] } condition { test = "StringEquals" variable = "sts:ExternalId" values = [local.external_id] } } } data "aws_iam_policy_document" "fp_vault_data_management_policy" { statement { sid = "AllowPutObject" actions = [ "s3:PutObject", ] resources = [ "${aws_s3_bucket.fp_vault_data.arn}/*", ] } statement { sid = "AllowListBucket" actions = [ "s3:ListBucket", ] resources = [ aws_s3_bucket.fp_vault_data.arn, ] } statement { sid = "AllowGetBucketLocation" actions = [ "s3:GetBucketLocation", ] resources = [ aws_s3_bucket.fp_vault_data.arn, ] } } resource "aws_iam_policy" "fp_vault_data_management" { name = "fp-vault-data-management" policy = data.aws_iam_policy_document.fp_vault_data_management_policy.json } resource "aws_iam_role_policy_attachment" "fp_vault_data_management_assume_role" { role = aws_iam_role.fp_vault_data_management.name policy_arn = aws_iam_policy.fp_vault_data_management.arn } ``` ## 6. Generate your disaster recovery org key pair Org identities (private keys) live on one or more [YubiKeys](https://www.yubico.com/products/yubikey-5-overview/). A hardware security token all but removes the risk of accidentally leaking a private key, a sensitive component of the recovery flow. Depending on your data durability requirements, you can register redundant YubiKeys to guard against lost or damaged hardware. Enrollment uses the [age YubiKey plugin](https://github.com/str4d/age-plugin-yubikey). Install [age](https://github.com/FiloSottile/age) and [age-plugin-yubikey](https://github.com/str4d/age-plugin-yubikey) on a workstation with a USB port for the YubiKey: ```bash # On a Mac: brew install age age-plugin-yubikey ykman ``` Plug in the YubiKey and change its management key. Press Enter to use the default management key, and enter the default YubiKey PIN `123456` at the prompt: ```bash ykman piv access change-management-key -a TDES --protect ``` Generate an age identity for your org with a command like the one below. Adjust the name and the mode (sandbox or live) for your own reference. The command prompts you to change your PIN and PUK; choose a PIN and keep it in your password manager, because your YubiKey needs it to decrypt your Vault Disaster Recovery backups: ```bash age-plugin-yubikey \ --generate \ --name "Footprint Vault DR org age identity: Acme Inc. Live" \ --pin-policy once \ --touch-policy cached \ --slot 1 ``` Pick a different slot if slot 1 is in use, though we recommend dedicated YubiKeys for live Vault Disaster Recovery. We recommend the PIN policy `once` and the touch policy `cached`, which make the test recovery flow less tedious. You do not need to save the output, but note the recipient (it starts with `age1yubikey`); you paste it in the next step. To print it again: ```bash age-plugin-yubikey --list ``` Repeat the key generation once for each YubiKey you want to register, collecting your org's `age1yubikey` age recipients. ## 7. Complete enrollment Run `footprint-dr enroll [--sandbox/--live]` and follow the prompts: ```text filename="Example Output" $ footprint-dr enroll --live Enrolling Acme Inc. (Live) in Vault Disaster Recovery. Enter org public key (age recipient): age1yubikey1qgceu0h4fzsv46jg32gnfz0hf5lnaaqm8wn8skxf33qm0t4v4rz427fh79x Add another org public key? [y/n] y Enter org public key (age recipient): age1yubikey1q2eggw2hftplqfr27s9h8nwuez39m45ms6qv78m9m6kfhmsyf6gacj2km7u Add another org public key? [y/n] n Enter AWS Account ID: 123456789012 Enter AWS role name: acme-inc-footprint-disaster-recovery Enter S3 bucket name: acme-inc-footprint-encrypted-data Verifying configuration... OK Enrollment complete. Store the following information to locate your encrypted data: S3 Bucket Name: acme-inc-footprint-disaster-recovery Bucket Namespace: a39evoii5rgqhdz4jansho3tten4z0oz ``` Unplug the YubiKey, label it, and store it somewhere physically secure, such as an office safe. You need it to decrypt disaster recovery data. Record the printed `S3 Bucket Name` and `Bucket Namespace` so you can locate your disaster recovery data later. ## Next steps From here, [Operations](/articles/guides/vault-disaster-recovery-operations) is the day-to-day: checking backup status, inspecting what is backed up, and testing recovery. If you want to revisit what the keys you generated protect and who can decrypt what, that is the [Introduction and security model](/articles/guides/vault-disaster-recovery-introduction-and-security-model). --- # Operations Once enrolled, you run every Vault Disaster Recovery operation from the `footprint-dr` CLI: checking backup status, listing what is backed up, testing recovery on a few records, and a full offline recovery. ## Checking backup status Run `footprint-dr status [--sandbox/--live]` to check the current status of your Vault Disaster Recovery backups: ```text filename="Example Output" $ footprint-dr status --live Logged in to Acme Inc. (Live) Enrolled in Vault Disaster Recovery since: 2024-04-17 23:22:42.272984 UTC Organization Public Keys: age1yubikey1qgceu0h4fzsv46jg32gnfz0hf5lnaaqm8wn8skxf33qm0t4v4rz427fh79x age1yubikey1q2eggw2hftplqfr27s9h8nwuez39m45ms6qv78m9m6kfhmsyf6gacj2km7u Storage Configuration: AWS Account ID: 123456789012 AWS Role Name: acme-inc-footprint-disaster-recovery S3 Bucket Name: acme-inc-footprint-encrypted-data Bucket Namespace: a39evoii5rgqhdz4jansho3tten4z0oz Latest Backup Record Timestamp: 2024-04-29T22:27:21Z Backup Lag: 7 seconds ``` After the initial backup completes, expect a lag of at most several minutes. ## Inspecting unencrypted metadata Using one of the [standard AWS CLI login methods](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html), log in to an AWS role that has `s3:ListBucket` and `s3:GetObject` access on the backup bucket. To list the vaults in your backup bucket, run `footprint-dr list-vaults [--sandbox/--live]`: ```text filename="Example Output" $ footprint-dr list-vaults --live fp_id_4acxG4NxFTlGaE6b2WyDIc fp_id_WFVkUyTeuWNy0GlrOPdPBO fp_id_rwSYNkPIrDFogXYjCJ1KrQ ... ``` To list all records, run `footprint-dr list-records [--sandbox/--live]`: ```text filename="Example Output" $ footprint-dr list-records --live {"fp_id": "fp_id_rwSYNkPIrDFogXYjCJ1KrQ", "version": 2, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} {"fp_id": "fp_id_4acxG4NxFTlGaE6b2WyDIc", "version": 1, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} {"fp_id": "fp_id_WFVkUyTeuWNy0GlrOPdPBO", "version": 4, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} ... ``` For manual pagination on either command, use the `--fp-id-gt` and `--limit` flags. Pass `--sandbox` to either command to inspect the sandbox data set. By default these commands ask the Footprint API for the bucket and namespace where the encrypted data is stored. To remove that dependency on the Footprint API, pass the `--bucket` and `--namespace` flags with the values from enrollment or from `footprint-dr status`. ## Testing recovery flow Using one of the [standard AWS CLI login methods](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html), log in to an AWS role that has `s3:ListBucket` and `s3:GetObject` access on the backup bucket. Prepare a [line-separated JSON file](https://jsonlines.org/) `records.jsonl` that lists the records to decrypt for the test. For example: ```jsonl {"fp_id": "fp_id_rwSYNkPIrDFogXYjCJ1KrQ", "version": 2, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} {"fp_id": "fp_id_4acxG4NxFTlGaE6b2WyDIc", "version": 1, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} {"fp_id": "fp_id_WFVkUyTeuWNy0GlrOPdPBO", "version": 4, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} ``` Decrypt only enough records to show that the backup recovery mechanism works; the output of `footprint-dr list-records --live --sample --limit 50` is usually enough. Log in to the `footprint-dr` CLI with an API key that has the appropriate `Decrypt Data` scope. Plug in your YubiKey and create an age identity file on disk that points to the YubiKey slot you used during enrollment. If you don't remember the slot number, run `age-plugin-yubikey --list`. ```bash age-plugin-yubikey --identity --slot 1 > org-identity.txt ``` Run `footprint-dr decrypt` to test recovery of the records in the file: ```bash footprint-dr decrypt \ --live \ --records records.jsonl \ --org-identity org-identity.txt \ --output-dir /tmp/decrypt-output ``` Tap your YubiKey when prompted. The command fetches the encrypted records from S3 and the wrapped record keys from Footprint's testing API, unwraps each record key with your YubiKey, and decrypts the records with those record keys. ## Full recovery flow In the catastrophic event that a full recovery is needed, Footprint or the pre-arranged escrow transfers the recovery payload to you, a file such as `acme-inc-wrapped-recovery-key.age`. Take care to prevent it from leaking. Prepare a [line-separated JSON file](https://jsonlines.org/) `records.jsonl` that lists the records to decrypt. For example: ```jsonl {"fp_id": "fp_id_rwSYNkPIrDFogXYjCJ1KrQ", "version": 2, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} {"fp_id": "fp_id_4acxG4NxFTlGaE6b2WyDIc", "version": 1, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} {"fp_id": "fp_id_WFVkUyTeuWNy0GlrOPdPBO", "version": 4, "fields": ["id.first_name", "id.last_name", "id.phone_number"]} ``` Using one of the [standard AWS CLI login methods](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html), log in to an AWS role that has `s3:ListBucket` and `s3:GetObject` access on the backup bucket. Plug in your YubiKey and create an age identity file on disk that points to the YubiKey slot you used during enrollment. If you don't remember the slot number, run `age-plugin-yubikey --list`. Run `footprint-dr decrypt` with the `--wrapped-recovery-key` flag. For example, to decrypt all records with no dependency on the Footprint API: ```bash footprint-dr decrypt \ --live \ --all \ --wrapped-recovery-key acme-inc-wrapped-recovery-key.age \ --org-identity org-identity.txt \ --bucket acme-inc-footprint-encrypted-data \ --namespace a39evoii5rgqhdz4jansho3tten4z0oz \ --output-dir /tmp/pii ``` Tap your YubiKey when prompted. The command unwraps the recovery private key with your YubiKey, fetches the encrypted records from S3, and decrypts the records with the recovery private key. If you have many records, you can batch or parallelize the decryption instead of passing `--all`: run several invocations with the `--records` flag, each with a batch of records from `footprint-dr list-records`. To tune download and decryption speed, adjust the `--concurrency-limit` flag on `footprint-dr decrypt`. The default is `2 * number of CPUs`. Adjust it according to the measured download speed in the output; too high a limit can hurt performance or produce open file limit errors. --- # Introduction The Review Platform is where your team works the reviews your playbooks create. It puts every review in a queue, orders the queue by how urgent each review is, and hands out the next review when a reviewer asks for one. ## What it does * **Queues by review kind.** A playbook raises a review of a given kind. The kind sets the review's SLA and base priority, and the queue bound to that kind decides which reviewers work it. * **Pull-based assignment.** A reviewer clicks **Pull next review** and gets the review at the top of the queue's order. A reviewer can also assign an unassigned review to themselves from the queue's list. * **Priority from SLA, base priority, and age.** Each queue sorts by due date, by base priority, by creation time, or by a hybrid that raises a review's priority as its deadline approaches. * **Queue counts.** For every queue, how many reviews it holds, how many are assigned and in progress, and how many are overdue or due within 1, 6, or 12 hours. ## Where to go next If you are setting the platform up, start with [Getting started](/articles/guides/manual-review-platform-getting-started) and keep [Core concepts](/articles/guides/manual-review-platform-core-concepts) open next to it for review kinds, queues, and prioritization. [Reviewers and teams](/articles/guides/manual-review-platform-review-agents-teams) is about who can pull from which queue, and [Reviewer workflow](/articles/guides/manual-review-platform-reviewer-workflow) about how a reviewer gets and finishes a review. For the counts that tell you when to move reviewers, see [Operations management](/articles/guides/manual-review-platform-operations-management); for how playbooks create reviews in the first place, [Integration with playbooks](/articles/guides/manual-review-platform-integration-workflows). --- # Core concepts Three things decide how work moves through the Review Platform. A review kind says what a review is and how urgent it is, a queue says who works it, and the queue's prioritization strategy says in what order. Playbooks fill the queues; reviewers empty them. ## Review kinds A review kind is a template for one type of review your team performs: what is being evaluated and how urgently it must be completed. Each review kind has: * **Name.** Identifies the review in queues and in the playbook builder. * **Base priority.** A value from 1 to 10 that sets the review's importance relative to other review kinds. * **SLA.** Hours from creation until the review's due date. * **SLA ramp factor.** How fast the review's priority rises as it approaches its due date, in queues sorted by hybrid priority. With separate review kinds, a time-sensitive fraud investigation carries more urgency than a routine document check. ## Queues A queue holds the reviews for one team or workflow. Review kinds define *what* needs reviewing; queues decide *who* reviews it and in what order. For each queue you: * **Set the order.** Choose one of the four prioritization strategies below. * **Bind review kinds.** Choose which review kinds land in the queue. A kind bound to several queues has its new reviews spread across them; a kind bound to none lands in the **Default** queue. * **Bind reviewers.** Choose who can pull from the queue. Any reviewer can still open the queue's list and assign an unassigned review to themselves. A typical structure: * **General queue.** Standard document verifications and low-risk reviews, worked by your L1 team. * **Escalations queue.** The review kinds your playbooks raise when a case needs a second look. * **Specialist compliance queue.** High-risk, complex review kinds for your most experienced reviewers. Specialists then spend their time on the cases that need their expertise, and routine reviews move through the general team. ## Prioritization strategies Each queue orders its reviews with one of four strategies, named here as the queue settings show them. ### Due at Earliest due date first. You never miss a deadline, but the order ignores how important one review kind is relative to another. Best for teams where all review kinds have similar importance and meeting deadlines is the main concern. ### Priority Highest base priority first, regardless of when a review was created or when it is due. Best for teams that handle both routine and critical reviews, where certain kinds (such as fraud investigations) always take precedence. ### Created at Newest first, so the most recent review is always at the top of the queue. Best for teams that work the queue continuously and care most about the newest arrivals. ### Hybrid (recommended) Calculates each review's priority from base priority, proximity to the SLA deadline, and creation time together. It is the recommended strategy because it reflects how urgency behaves in a real operation. The Review Platform recalculates each review's effective priority as it ages: ``` Priority = Base priority × (1 + Progress ^ SLA ramp factor) ``` * **Base priority.** The review kind's starting priority (1-10). * **Progress.** The share of the SLA already elapsed, from 0 to 1. * **SLA ramp factor.** How fast the escalation happens. At 1, priority rises in proportion to how close the deadline is. Above 1, it rises slowly at first and rapidly near the deadline, which gives newer reviews time before older ones become urgent. Below 1, it rises fast early and gradually later, so older reviews gain priority quickly. A review can at most double its base priority. Two reviews sitting in the same queue, both with a ramp factor of 1, show why that matters: | | Review A: fraud investigation | Review B: standard verification | | ------------------- | ----------------------------- | ------------------------------- | | Base priority | 5 | 3 | | SLA | 8 hours | 4 hours | | Created | 1 hour ago | 3 hours 48 minutes ago | | Calculated priority | **5.6** | **5.9** | Neither simple strategy gets this right: * **Priority** puts Review A first, and Review B breaches its SLA in 12 minutes. * **Due at** puts Review B first, but would keep doing so even if Review A were far more urgent. * **Created at** ignores both signals. Hybrid weighs them together. Review B has the lower base priority, but it is almost out of time, so it surfaces first. ## Reviewers and teams Reviewers are members of your organization you add in **Manage reviewers**. For each reviewer you choose which queues they can pull from and set an expected number of daily reviews. Teams group reviewers under a name and a description. The team view on **Queues and teams** lists each member with their assigned and started reviews and the ones completed in the last 24 hours. Percy agents do not work queues. An agent runs as a step inside a playbook, and the playbook's rules decide whether a review is raised at all. ## Next steps With the vocabulary in place, [Getting started](/articles/guides/manual-review-platform-getting-started) sets up your first review kinds and queues. What you configure per reviewer is in [Reviewers and teams](/articles/guides/manual-review-platform-review-agents-teams). --- # Reviewer workflow Reviewers pull work from their queues. **Pull next review** hands out the review at the top of the queue's order, and a reviewer can also assign any unassigned review to themselves from the queue's list. ## Pull-based assignment When reviewers pull rather than pick, the queue's sort decides who works what. Two things follow: * **The order holds.** The review at the top of the queue, by due date, priority, age, or the hybrid of the three, is the one handed out next. * **Work in progress is real.** A review is assigned only when someone asked for it, so the assigned count reflects reviews people are working rather than a distribution made in advance. ## How a reviewer gets work 1. **Request the next review.** In **Assigned to me**, the reviewer clicks **Pull next review** on one of their queues. 2. **Assignment.** The Review Platform assigns the first unassigned review in that queue's order. 3. **Complete or unassign.** The reviewer finishes the review, or chooses **Unassign** to release it back to the queue. ## Self-assignment Any reviewer can open a queue's list and choose **Assign to me** on an unassigned review, for example to pick up a follow-up on a user they already know. Self-assignment bypasses the queue's order, so treat **Pull next review** as the default and self-assignment as the exception. --- # Reviewers and teams Reviewers are the members of your organization who work reviews. Teams group them so you can see their counts together. ## Reviewers Add a reviewer in **Manage reviewers** by picking an existing member of your organization. For each reviewer you set: * **Queue access.** The queues the reviewer can pull from, chosen in each queue's settings. * **Expected daily reviews.** A target you set per reviewer. It is a target, not a limit: nothing stops a reviewer at the number. * **Team membership.** The team the reviewer belongs to, for the team view. ## Teams A team has a name, a description, and members. The team view on **Queues and teams** lists each member with their assigned and started reviews and the ones completed in the last 24 hours, so you can compare workload across a team such as fraud, documents, or compliance. --- # Getting started Setting up the Review Platform takes six steps, in this order. By the end, your playbooks raise reviews that land in the right queue and reviewers pull them in priority order. ## Before you start * A playbook with a point where a person should look at the case. * The members of your organization who work reviews, already invited to the dashboard. ## 1. Configure review kinds Open **Review kinds** under **Reviews** and define the types of reviews your team performs, each with its SLA in hours, a base priority from 1 to 10, and an SLA ramp factor. Decide: * What types of reviews do you perform? * Which reviews are time-critical, and which are routine? * How fast should priority rise as a review ages? ## 2. Set up queues Open **Queues and teams** and create queues that match your team structure. Bind review kinds and reviewers to each queue, and pick its sort. Decide: * Do specialized teams handle certain review kinds? * Should high-risk reviews be routed separately from routine verifications? * Which prioritization strategy fits each queue? ## 3. Add reviewers Open **Manage reviewers**, add members of your organization as reviewers, and set each one's expected daily reviews. Decide: * Which reviewers have the expertise for specialized reviews? * Should a reviewer have access to more than one queue? * What is a reasonable daily target for each reviewer? ## 4. Create teams (optional) In **Queues and teams**, group reviewers into teams with a name and a description. Decide: * How is your organization structured? * Which groups do you want to compare side by side? ## 5. Configure playbook logic In the playbook builder, add an **Action** node with the **Manual review** action where a person should look at the case, and pick the review kind. [Integration with playbooks](/articles/guides/manual-review-platform-integration-workflows) explains what happens once the playbook raises a review. ## 6. Start reviewing Reviewers open **Assigned to me** and pull their first review. Watch the queue counts on **Reviews** and adjust the configuration as you learn what works for your operation. ## Verify it works Run the playbook in sandbox on a test user who takes the manual-review path. The review appears in the queue bound to its kind with a due date set from the SLA, and **Pull next review** hands it to a reviewer bound to that queue. ## Best practices * **Start with conservative SLAs.** Tightening an SLA once you know your team's capacity is easier than constantly breaching an aggressive one. * **Use hybrid prioritization.** Unless you have a specific reason for a simpler sort, hybrid prioritization gives the most flexible behavior. * **Watch the queue counts.** Check the overdue and due-soon counts through the day, especially at high volume, to see when staffing needs to change. * **Keep targets realistic.** Expected daily reviews is a target, not a hard requirement. Allow for variation in review complexity and for difficult cases. --- # Integration with playbooks Reviews come from your playbooks. An [Action node](/articles/guides/playbooks-building-playbooks#action-nodes) with the **Manual review** action raises one, with the review kind you choose in the node, and the Review Platform handles everything after that: 1. **Reads the review kind** set in the Action node. 2. **Picks the queue.** The queue bound to that review kind; when several queues are bound, one of them; when none is, the **Default** queue. 3. **Sets the due date** from the review kind's SLA. 4. **Sets the base priority** from the review kind. 5. **Raises the priority** as the review ages toward its due date, in queues sorted by hybrid priority. Routing and prioritization are therefore consistent for every review, with no manual step. --- # Operations management The **Reviews** page lists every queue with its counts, so you see where the backlog is and how close it is to its deadlines. ## Queue counts Each queue shows three counts, total, assigned, and in progress, and splits each by how close its reviews are to their SLA: overdue, due within 1 hour, within 6 hours, and within 12 hours. * **Overdue and due soon.** Reviews that breach if nobody picks them up. Move reviewers to that queue before the count grows. * **Assigned versus in progress.** Reviews someone pulled but has not started. A gap between the two is work sitting with a reviewer rather than in the queue. * **Total versus assigned.** Reviews waiting for anyone to pull them. A large unassigned count at high volume is the signal to add reviewers. The counts are read when you open or reload the page. ## Reading the page The page answers the questions you have during the day: how many reviews are about to breach, whether to move someone from the general queue to escalations, and whether today's staffing covers today's volume. For each reviewer's assigned, started, and completed-in-24-hours counts, use the team view on **Queues and teams**. --- # Introduction Platform holds what every Footprint product shares once it is running in your stack: the events Footprint sends your backend, the browser security policies your app must allow for a Footprint flow to load, and the connection your AI tools use to work in Footprint. ## What it does * **Webhooks.** A POST to an endpoint you register in the dashboard when something happens in Footprint: an onboarding completes, a reviewer changes a user's status, a watchlist check finishes. * **Content Security Policy.** The Permissions-Policy and Content-Security-Policy values your app needs so Footprint's domains and features can run inside it. * **MCP server.** A connection from AI tools such as Claude, Cursor and Codex to your Footprint organization, working with each person's own permissions. ## Where to go next [Webhooks](/articles/integrate/webhooks) lists the events and how to verify a signature. [Content Security Policy](/articles/integrate/content-security-policy) has the header values to copy. [MCP server](/articles/platform/mcp) shows how to connect your AI tool. --- # Webhooks Webhooks tell your backend when something happens in Footprint: an onboarding completes, a reviewer changes a user's status, a watchlist check finishes. A webhook is a POST request to an endpoint you configure. Footprint sends each event over HTTPS as a JSON payload, and your endpoint returns an HTTP 2xx to confirm it processed the event. Register your endpoints in the [Footprint dashboard](https://dashboard.onefootprint.com/webhooks). From then on, Footprint pushes event data to them as events happen. ## Getting started Svix's [guide to consuming webhooks](https://docs.svix.com/receiving/introduction) covers the receiving side. We recommend verifying that every webhook request was sent by Footprint. Svix's guide to [verifying webhook signatures](https://docs.svix.com/receiving/verifying-payloads/how) shows how. ## Recommended integration If you use a Footprint frontend SDK to collect and verify user information, the events you most likely need are the ones about a user's status. ### Onboarding completed We recommend subscribing to the footprint.onboarding.completed event, which fires when a user's onboarding reaches a terminal status. In most cases, the [status you receive synchronously](/articles/guide/definitive-integration-guide#the-end-to-end-integration-step-5-handle-the-decision) at the end of the onboarding flow is already terminal: `pass`, `fail`, or `none`. When an identity verification vendor takes longer to verify a user, the frontend SDK returns `pending` instead, and the final decision arrives through the `footprint.onboarding.completed` event. ### Manual review A member of your team can change a user's status while reviewing that user in the Footprint dashboard. The change fires the footprint.user.manual\_review event. When you receive it, we recommend calling GET /users/{fp_id} for the user's new manual status. ### Watchlist checks If your playbook has continuous monitoring enabled, Footprint regularly checks whether any of your users appear on AML watchlists, and sends updates on those checks through the footprint.watchlist\_check.completed event. ## IP allowlist If your endpoint sits behind a firewall, allow these addresses so Footprint's webhook requests reach it. Every webhook request originates from one of them: ```text 44.228.126.217 50.112.21.217 52.24.126.164 54.148.139.208 2600:1f24:64:8000::/56 ``` --- # Content Security Policy Permissions Policy and Content Security Policy (CSP) add a layer of security to your app. If you set either one, it must allow Footprint's features and domains. This page lists the values to add. ## Required security headers How you set these headers depends on your framework, but the policies need to include these values: ```json { key: 'Permissions-Policy', value: 'camera=(self "https://*.onefootprint.com/*"), publickey-credentials-get=(self "https://*.onefootprint.com/*"), otp-credentials=(self "https://*.onefootprint.com/*"), clipboard-write=(self "https://*.onefootprint.com/*")' }, { key: 'Content-Security-Policy', value: 'child-src onefootprint.com; connect-src *.onefootprint.com https://fp.risk.onefootprint.com; frame-src *.onefootprint.com; script-src https://fp.risk.onefootprint.com;' } ``` ### Permissions-Policy * Footprint identity verification flows use the browser's public key credentials to register and verify passkeys. * Flows that collect identity documents and selfies also use the camera. * Some features write to the clipboard, such as copying the test ID in sandbox. MDN documents the [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy) header in full. ### Content-Security-Policy Footprint's integrations run in an iframe for compliance and security reasons, so Footprint's domains must be allowed in `child-src`, `connect-src`, and `frame-src`. [Device intelligence](/articles/sdks/javascript-typescript-introduction#device-intelligence) runs Fingerprint's agent in your page. The agent loads its script from `https://fp.risk.onefootprint.com`, so add that host to `script-src`. If your policy blocks it, onboarding still completes, but without device-intelligence signals. MDN documents [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) in full. --- # MCP server Footprint's MCP server connects the AI tools your team already uses to your Footprint organization. Once connected, you can ask Claude, Claude Code, Cursor or Codex to look up a user, explain why an onboarding failed, count risk signals, or draft a playbook change, and it works with your own Footprint permissions. The server URL is: ```text https://api.onefootprint.com/mcp ``` ## Before you start * **Your role needs to have the MCP permission.** The **Admin** role always has it. For any other role, an admin turns on **MCP** for that role under **Settings** > **Members and roles** > **Roles**. MCP only lets the role connect: each action still needs the role's usual permission, such as decrypting a field or editing playbooks. * **Your organization has live mode.** Other organizations can ask [support@onefootprint.com](mailto:support@onefootprint.com) for access. * **An AI tool that supports remote MCP servers with sign-in**, such as one of the four below. ## Connect your AI tool Add the server URL to your tool, then sign in to Footprint when it asks. Each tool keeps its own connection, so connect each one you use. ### Claude Claude Desktop uses the same connectors as claude.ai. Anthropic's guide: [Custom connectors using remote MCP](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp). On Team and Enterprise plans, members may not be able to add custom connectors, depending on the plan and admin settings. If **Add custom connector** is greyed out, ask your Claude organization owner to add Footprint under **Organization settings** > **Connectors**, then select **Connect** on it under **Customize** > **Connectors**. 1. Open **Customize** > **Connectors**, select **Add**, then **Add custom connector**. 2. Name it `Footprint`, paste the server URL, and follow the prompts to add it. 3. Select **Connect** next to the connector and sign in to Footprint. ### Claude Code Add the server from your terminal: ```bash claude mcp add --transport http --scope user footprint https://api.onefootprint.com/mcp ``` `--scope user` makes it available in every project; leave it out to add it to the current project only. Then run `/mcp` inside Claude Code, select **footprint**, and sign in to Footprint in your browser. Anthropic's guide: [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp). ### Cursor Add the server to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in a project: ```json { "mcpServers": { "footprint": { "url": "https://api.onefootprint.com/mcp" } } } ``` Then find **footprint** under **Customize** in Cursor's sidebar and select its sign-in prompt to sign in to Footprint. Cursor's guide: [Model Context Protocol](https://cursor.com/docs/context/mcp). ### Codex Add the server and sign in from your terminal: ```bash codex mcp add footprint --url https://api.onefootprint.com/mcp codex mcp login footprint ``` In the Codex app, open **Settings** > **MCP servers** instead (in the IDE extension, the gear menu > **MCP servers**), select **Add server**, choose **Streamable HTTP**, enter the server URL, save and restart, then select **Authenticate**. OpenAI's guide: [MCP in Codex](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). ## Sign in and choose an organization When your AI tool asks you to sign in, it opens Footprint in your browser: 1. Sign in to Footprint as you do for the dashboard. 2. On **Add a connector**, check the account you're signed in as, then select **Choose organization**. 3. Pick the organization this tool should work in, and approve access. The list shows each organization where your role has the MCP permission. If none is listed, ask an admin to add MCP to your role, or sign in with the method your organization requires, such as SSO. A connection to a live organization can use both live and sandbox data, so say which one in your request. To work in a different organization, connect again and pick that one. If you pick a sandbox-only organization, sign-in can succeed while Footprint refuses every request, and your AI tool may only say it couldn't connect. Connect again and pick a live organization, or ask [support@onefootprint.com](mailto:support@onefootprint.com) for access. Your AI tool renews the connection on its own, so you normally stay signed in until you disconnect. If a sandbox-only organization later goes live, its connections stop working: remove Footprint from your AI tool and connect again. ## What you can do Your AI tool can work across these areas of Footprint: * Users, businesses and their onboardings * Reviews * Playbooks * Agents and their investigations * Risk signals Everything runs with your role's permissions, so the AI tool can only do what you can do in the dashboard. ## Permissions and audit Footprint checks your current role and membership on every request. If an admin changes your role or removes you from the organization, the change applies to your AI tool right away. Footprint records actions taken through MCP under your name, the same way it records them from the dashboard. Decrypting vault fields needs a reason, which is recorded with it. The MCP server acts with your permissions. Data in Footprint, such as names, documents and notes, comes from your users, and data from other tools can come from anywhere. Either can contain instructions written to steer an AI tool. Review each change, decrypt or playbook run before you approve it, and don't auto-approve Footprint's write tools. Take extra care when the same AI tool can also send data elsewhere, such as by email or to the web. A role with fewer permissions limits what a connection can do. ## Disconnect To disconnect an AI tool, remove Footprint from it: * **Claude:** in **Customize** > **Connectors**, select **Remove** from the Footprint connector's menu. On Team and Enterprise plans, an owner can also remove it under **Organization settings** > **Connectors**. * **Claude Code:** run `claude mcp logout footprint`, then `claude mcp remove footprint`. * **Cursor:** remove the server under **Customize**, or delete the `footprint` entry from `mcp.json`. * **Codex:** run `codex mcp logout footprint`, then `codex mcp remove footprint`. Removing Footprint from a tool disconnects that tool, but doesn't revoke its sign-in on Footprint's side. If you think a device or its credentials are compromised, ask an admin to remove the MCP permission from your role. That stops every connected tool on its next request. ## Feedback To report what works, what breaks, or what you'd like it to do, email [support@onefootprint.com](mailto:support@onefootprint.com), or tell your Footprint contact in your shared Slack channel. --- # Introduction Footprint SDKs bring your onboarding flow into your web or mobile app. Your playbook defines the data to collect, documents to request, and checks to run, including identity and business verification when needed. ## Choose an SDK Each introduction covers installation, platform requirements, and optional device intelligence. | Your app | SDK | | -------------------------------- | ---------------------------------------------------------------------------- | | Web, with or without a framework | [JavaScript / TypeScript](/articles/sdks/javascript-typescript-introduction) | | Expo | [Expo](/articles/sdks/expo-introduction) | | React Native | [React Native](/articles/sdks/rn-introduction) | | Flutter | [Flutter](/articles/sdks/flutter-introduction) | | iOS with Swift | [Swift](/articles/sdks/swift-introduction) | | Android with Kotlin or Java | [Android](/articles/sdks/android-introduction) | ## How integration works 1. Configure a playbook and create an onboarding on your backend. 2. Pass the onboarding session token to the SDK to open the flow in your app. 3. Handle completion in your app and read the onboarding result on your backend. The [integration guide](/articles/guide/definitive-integration-guide) walks through these steps, from creating a playbook to handling its decision. ## Customize your flow Use [Customization](/articles/integrate/customization) to set the appearance and language. Each SDK's onboarding guide covers how to display the flow and handle its callbacks. --- # Customization The `appearance` option restyles the Footprint flow to match your product's design. Every SDK accepts it: JavaScript, Expo, React Native, Flutter, Swift, and Kotlin. A complete example lives in [onefootprint/examples](https://github.com/onefootprint/examples/tree/master/idv/frontend-vite-vanilla). ## Variables Variables are the first place to theme the flow. Each one maps to a CSS variable, so you can inspect the result with your browser's DOM explorer. Set a value in any unit you prefer: pixels, rem, hex, rgb, and so on. The tables below list every variable. This call squares the corners and recolors the primary button: ```typescript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, appearance: { variables: { borderRadius: "0px", buttonPrimaryBg: "#315E4C", buttonPrimaryHoverBg: "#46866c", buttonPrimaryColor: "#FFF", }, }, }); ``` ### Status colours | Variable | Description | | -------------- | --------------------------- | | `colorError` | Sets the error text color | | `colorSuccess` | Sets the success text color | | `colorWarning` | Sets the warning text color | ## Global variables A higher-level token sets the default for a group of lower-level tokens. The table lists each higher-level token and the tokens it sets by default. | Higher-level token | Lower-level tokens influenced | | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `borderRadius` | `buttonBorderRadius`, `containerBorderRadius`, `inputBorderRadius`, `dropdownBorderRadius`, `radioSelectBorderRadius`, `checkboxBorderRadius` | | `colorError` | `borderColorError`, `hintErrorColor`, `linkButtonDestructiveColor` | | `colorAccent` | `linkColor`, `linkButtonColor`, `linkButtonHoverColor`, `linkButtonActiveColor`, `radioSelectSelectedColor`, `radioSelectSelectedBorderColor`, `radioSelectComponentsIconSelectedBg`, `checkboxCheckedBg` | | `borderColorError` | `inputErrorBorderColor` | Set a higher-level token to propagate one choice across its group. Set a lower-level token individually to override that default for a single component. ### Container Wraps the entire Footprint component. | Variable | Description | | ----------------------- | ---------------------------------------- | | `containerBg` | Sets the container body background color | | `containerElevation` | Determines the container's shadow | | `containerBorder` | Defines the container's border | | `containerBorderRadius` | Defines the container's border radius | | `containerMaxWidth` | Defines the container's max width | For inline integrations, `containerMaxWidth` (for example `containerMaxWidth: '480px'`) constrains and centers the content while the outer container fills the available space. The modal variant has a predetermined width. ### Link Links behave like standard anchor tags; the `Terms of Service` link is a common example. To style more properties or states, use [rules](#rules). Links take their color from `colorAccent`, which also drives link buttons and radio selection. | Variable | Description | | ------------- | --------------------------------------- | | `colorAccent` | Defines the link color and link buttons | ### Label The label is the native HTML element paired with an input field. | Variable | Description | | ------------ | ------------------------- | | `labelColor` | Sets the label color | | `labelFont` | Determines the label font | ### Input Input covers every input field in the flow, including the PIN, phone, and address inputs. | Variable | Description | | ---------------------------- | -------------------------------------------------------------------------- | | `inputBorderRadius` | Determines the input border radius | | `inputBorderWidth` | Sets the input border width | | `inputFont` | Sets the input font | | `inputHeight` | Sets the input height | | `inputPlaceholderColor` | Defines the input placeholder color | | `inputColor` | Sets the input color | | `inputBg` | Defines the input background color | | `inputBorderColor` | Sets the input border color | | `inputHoverBg` | Determines the input background color when hovered | | `inputHoverBorderColor` | Sets the input border color when hovered | | `inputFocusBg` | Determines the input background color when focused | | `inputFocusBorderColor` | Sets the input border color when focused | | `inputFocusElevation` | Sets the input box shadow when focused | | `inputErrorBg` | Determines the input background color when an error is present | | `inputErrorBorderColor` | Sets the input border color when an error is present | | `inputErrorHoverBg` | Determines the input background color when an error is present and hovered | | `inputErrorHoverBorderColor` | Sets the input border color when an error is present and hovered | | `inputErrorFocusBg` | Determines the input background color when an error is present and focused | | `inputErrorFocusBorderColor` | Sets the input border color when an error is present and focused | | `inputErrorFocusElevation` | Sets the input box shadow when an error is present and focused | | `inputElevation` | Determines the input box shadow | | `inputHoverElevation` | Sets the input box shadow when hovered | | `inputErrorElevation` | Sets the input box shadow when an error is present | | `inputErrorHoverElevation` | Sets the input box shadow when an error is present and hovered | ### Hint Hints are the text below an input field. They show an error or extra information. | Variable | Description | | ---------------- | ---------------------------------------------------------------- | | `hintColor` | Sets the hint color | | `hintErrorColor` | Determines the hint color when the input field is in error state | | `hintFont` | Defines the hint font | ### LinkButton A link button is the standard button without a background. | Variable | Description | | ---------------------------------- | ------------------------------------------------------------------------------ | | `linkButtonColor` | Sets the button color | | `linkButtonHoverColor` | Defines the button color when hovered | | `linkButtonActiveColor` | Sets the button color when pressed | | `linkButtonDestructiveColor` | Determines the button color when it signifies a destructive action | | `linkButtonDestructiveHoverColor` | Sets the button color when it signifies a destructive action and is hovered | | `linkButtonDestructiveActiveColor` | Determines the button color when it signifies a destructive action and pressed | ### Button Variables for the primary and secondary buttons. | Variable | Description | | ------------------------------------ | ------------------------------------------------------------- | | `buttonBorderRadius` | Defines the button border radius | | `buttonBorderWidth` | Sets the button border width | | `buttonPrimaryBg` | Sets the primary button's background color | | `buttonPrimaryColor` | Defines the primary button's color | | `buttonPrimaryBorderColor` | Determines the primary button's border color | | `buttonPrimaryHoverBg` | Sets the primary button's background color when hovered | | `buttonPrimaryHoverColor` | Defines the primary button's color when hovered | | `buttonPrimaryHoverBorderColor` | Determines the primary button's border color when hovered | | `buttonPrimaryActiveBg` | Sets the primary button's background color when activated | | `buttonPrimaryActiveColor` | Defines the primary button's color when activated | | `buttonPrimaryActiveBorderColor` | Determines the primary button's border color when activated | | `buttonPrimaryDisabledBg` | Sets the primary button's background color when disabled | | `buttonPrimaryDisabledColor` | Defines the primary button's color when disabled | | `buttonPrimaryDisabledBorderColor` | Determines the primary button's border color when disabled | | `buttonPrimaryLoadingBg` | Sets the primary button's background color when loading | | `buttonPrimaryLoadingColor` | Defines the primary button's color when loading | | `buttonsPrimaryLoadingBorderColor` | Sets the primary button's border color when loading | | `buttonSecondaryBg` | Sets the secondary button's background color | | `buttonSecondaryColor` | Defines the secondary button's color | | `buttonSecondaryBorderColor` | Determines the secondary button's border color | | `buttonSecondaryHoverBg` | Sets the secondary button's background color when hovered | | `buttonSecondaryHoverColor` | Defines the secondary button's color when hovered | | `buttonSecondaryHoverBorderColor` | Determines the secondary button's border color when hovered | | `buttonSecondaryActiveBg` | Sets the secondary button's background color when activated | | `buttonSecondaryActiveColor` | Defines the secondary button's color when activated | | `buttonSecondaryActiveBorderColor` | Determines the secondary button's border color when activated | | `buttonSecondaryDisabledBg` | Sets the secondary button's background color when disabled | | `buttonSecondaryDisabledColor` | Defines the secondary button's color when disabled | | `buttonSecondaryDisabledBorderColor` | Determines the secondary button's border color when disabled | | `buttonSecondaryLoadingBg` | Sets the secondary button's background color when loading | | `buttonSecondaryLoadingColor` | Defines the secondary button's color when loading | ### Dropdown Dropdowns pair with input fields: the phone input uses one for the list of countries, and the address input uses one for the list of results. | Variable | Description | | ------------------------ | ------------------------------------------ | | `dropdownBg` | The dropdown background color | | `dropdownHoverBg` | The dropdown background color when hovered | | `dropdownBorderColor` | The dropdown border color when activated | | `dropdownBorderWidth` | The dropdown border width | | `dropdownBorderRadius` | The dropdown border radius | | `dropdownElevation` | The dropdown box shadow | | `dropdownColorPrimary` | The dropdown primary color | | `dropdownColorSecondary` | The dropdown secondary color | | `dropdownFooterBg` | The dropdown footer background | ### Radio select Radio select appears in two places. When an onboarding starts with a sandbox key, it selects the outcome; that choice is only visible in sandbox and hidden from users. During identity document verification, it lets the user pick which type of identity document to verify with. | Variable | Description | | --------------------------------------------- | ------------------------------------------------------ | | `radioSelectBg` | The background of the radio select component | | `radioSelectColor` | The text color when not selected | | `radioSelectHoverColor` | The hover text color when not selected | | `radioSelectSelectedColor` | The text color when selected | | `radioSelectSelectedHoverColor` | The hover text color when selected | | `radioSelectBorderRadius` | The border radius of the radio select component | | `radioSelectBorderWidth` | The border width of the radio select component | | `radioSelectBorderColor` | The border color of the radio select component | | `radioSelectHoverBg` | The hover background of the radio select component | | `radioSelectHoverBorderColor` | The hover border color of the radio select component | | `radioSelectSelectedBg` | The background of the selected radio item | | `radioSelectSelectedBorderColor` | The border color of the selected radio item | | `radioSelectComponentsIconBg` | The background of the icon in the radio item | | `radioSelectComponentsIconHoverBg` | The hover background of the icon in the radio item | | `radioSelectComponentsIconSelectedBg` | The background of the selected icon in the radio item | | `radioSelectComponentsIconColor` | The color of the icon in the radio item | | `radioSelectComponentsIconHoverColor` | The hover color of the icon in the radio item | | `radioSelectComponentsIconSelectedColor` | The color of the selected icon in the radio item | | `radioSelectComponentsIconSelectedHoverColor` | The hover color of the selected icon in the radio item | ### Checkbox Checkboxes appear wherever the flow asks for consent or a multi-choice selection. | Variable | Description | | ------------------------------- | ------------------------------------------------------- | | `checkboxBg` | Defines the checkbox background color | | `checkboxBorderColor` | Sets the checkbox border color | | `checkboxBorderRadius` | Determines the checkbox border radius | | `checkboxBorderWidth` | Sets the checkbox border width | | `checkboxCheckedBg` | Defines the checkbox background color when checked | | `checkboxCheckedBorderColor` | Sets the checkbox border color when checked | | `checkboxCheckedCheckmarkColor` | Sets the checkmark color when checked | | `checkboxHoverBg` | Defines the checkbox background color when hovered | | `checkboxHoverBorderColor` | Sets the checkbox border color when hovered | | `checkboxDisabledBg` | Defines the checkbox background color when disabled | | `checkboxDisabledBorderColor` | Sets the checkbox border color when disabled | | `checkboxErrorBorderColor` | Sets the checkbox border color when an error is present | ## Custom fonts Footprint loads custom fonts from [Google Fonts](https://fonts.google.com/). Pass a `fontSrc` URL in the `appearance` option, and the SDK loads the font and applies it across the component. We strongly recommend also setting `fontFamily` in `variables` so the font applies consistently. The SDK tries to extract the font family from the Google Fonts URL, but setting `fontFamily` yourself gives you control over the value and the fallback chain. This call loads Poppins and applies it to the flow: ```typescript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; onboarding.initialize({ onboardingSessionToken: "obtok_...", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, appearance: { fontSrc: "https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap", variables: { fontFamily: "'Poppins', sans-serif", }, }, }); ``` We recommend a Google Fonts URL for `fontSrc`. Other font sources may produce unexpected results. | Property | Location | Description | | ------------ | --------------------------------- | ---------------------------------------------------- | | `fontSrc` | `appearance.fontSrc` | A Google Fonts URL that loads the font stylesheet | | `fontFamily` | `appearance.variables.fontFamily` | The CSS `font-family` value applied to the component | ## Rules Use `rules` for styles the variables do not cover. A rule applies arbitrary CSS to one of the elements listed below. This call animates buttons on hover, adds a focus ring to inputs, and underlines hovered links: ```typescript import '@onefootprint/footprint-js/dist/footprint-js.css'; import { onboarding } from '@onefootprint/footprint-js'; onboarding.initialize({ onboardingSessionToken: 'obtok_xxx', onComplete: ({ onboardingId }) => { console.log(onboardingId); }, appearance: { rules: { button: { transition: 'all .2s linear', }, 'button:hover': { transform: 'translateY(-1px)', }, 'input:focus': { boxShadow: '0 0 0 4px rgba(74, 36, 219, 0.12)', }, 'link:hover': { textDecoration: 'underline', }, } }, }); ``` ### Available rules | Selector | Description | | -------------------- | ------------------------ | | `button` | The button | | `button:hover` | The button, hovered | | `button:focus` | The button, focused | | `button:active` | The button, active | | `input` | The input | | `input:hover` | The input, hovered | | `input:focus` | The input, focused | | `input:active` | The input, active | | `pinInput` | The OTP pin input | | `pinInput:hover` | The pin input, hovered | | `pinInput:focus` | The pin input, focused | | `pinInput:active` | The pin input, active | | `checkbox` | The checkbox | | `checkbox:hover` | The checkbox, hovered | | `checkbox:checked` | The checkbox, checked | | `checkbox:disabled` | The checkbox, disabled | | `label` | The input label | | `hint` | The hint below an input | | `link` | The link | | `link:hover` | The link, hovered | | `link:focus` | The link, focused | | `linkButton` | The link button | | `linkButton:hover` | The link button, hovered | | `linkButton:focus` | The link button, focused | | `linkButton:active` | The link button, active | | `pageHeader` | The page header | | `pageHeaderTitle` | The page header title | | `pageHeaderSubtitle` | The page header subtitle | ## Localization configuration The `l10n` option sets the language of the flow's copy and the locale Footprint formats dates and numbers for. In footprint-js, React Native and Expo, both fields are optional, and whatever you leave out comes from the user's browser. ### Setting the language and locale To show the flow in Spanish, set `language`: ```typescript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const l10n = { language: "es", }; onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, l10n, }); ``` To format for a market, set `locale`. Without `language`, the copy follows the locale's language, so this flow shows Portuguese copy with Brazilian dates and numbers: ```typescript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const l10n = { locale: "pt-BR", }; onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, l10n, }); ``` Set both when the copy and the market differ, such as Spanish copy for users in the United States: `{ language: "es", locale: "en-US" }`. Footprint fills in each setting from the first source that has it: | Setting | Order | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | Copy language | `language`, then the locale's language, then the first language the user's browser asks for that Footprint supports, then English | | Dates and numbers | `locale`, then the user's browser locale, then `en-US` | | Preselected phone country | The playbook's residence country when it accepts only one, then the locale's country, then the United States | | Preselected card country | The locale's country, then the United States | The user can still switch the copy language from the flow's footer. Three locales also change their language's wording: `pt-PT` reads as Portugal writes Portuguese, `es-ES` as Spain writes Spanish, and `fr-CA` as Quebec writes French. ### Available l10n properties | Property | Values | Description | | ---------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | `language` | `en`, `es`, `pt`, `ja`, `de`, `fr`, `it`, `ko`, `nb`, `sv`, `fi`, `pl`, `zh-Hant`, `vi`, `ro`, `cs`, `sk`, `ms` | Optional. The language of the flow's copy. | | `locale` | [Supported locales](#localization-configuration-supported-locales) | Optional. Date and number formats and the preselected countries. | ### Supported locales | Locale | Copy language | Date fields | Numbers | Country | | ------- | --------------------- | ----------- | ----------- | -------------- | | `en-US` | English | MM/DD/YYYY | 123,456.78 | United States | | `cs-CZ` | Czech | DD/MM/YYYY | 123 456,78 | Czech Republic | | `de-AT` | German | DD/MM/YYYY | 123 456,78 | Austria | | `de-CH` | German | DD/MM/YYYY | 123’456.78 | Switzerland | | `de-DE` | German | DD/MM/YYYY | 123.456,78 | Germany | | `en-AU` | English | DD/MM/YYYY | 123,456.78 | Australia | | `en-CA` | English | YYYY-MM-DD | 123,456.78 | Canada | | `en-GB` | English | DD/MM/YYYY | 123,456.78 | United Kingdom | | `en-IE` | English | DD/MM/YYYY | 123,456.78 | Ireland | | `en-IN` | English | DD/MM/YYYY | 1,23,456.78 | India | | `en-MT` | English | DD/MM/YYYY | 123,456.78 | Malta | | `en-MY` | English | DD/MM/YYYY | 123,456.78 | Malaysia | | `en-NZ` | English | DD/MM/YYYY | 123,456.78 | New Zealand | | `en-PH` | English | MM/DD/YYYY | 123,456.78 | Philippines | | `en-SG` | English | DD/MM/YYYY | 123,456.78 | Singapore | | `en-ZA` | English | YYYY-MM-DD | 123 456,78 | South Africa | | `es-AR` | Spanish | DD/MM/YYYY | 123.456,78 | Argentina | | `es-CL` | Spanish | DD/MM/YYYY | 123.456,78 | Chile | | `es-CO` | Spanish | DD/MM/YYYY | 123.456,78 | Colombia | | `es-ES` | Spanish | DD/MM/YYYY | 123.456,78 | Spain | | `es-MX` | Spanish | DD/MM/YYYY | 123,456.78 | Mexico | | `es-PE` | Spanish | DD/MM/YYYY | 123,456.78 | Peru | | `fi-FI` | Finnish | DD/MM/YYYY | 123 456,78 | Finland | | `fr-BE` | French | DD/MM/YYYY | 123 456,78 | Belgium | | `fr-CA` | French | YYYY-MM-DD | 123 456,78 | Canada | | `fr-CH` | French | DD/MM/YYYY | 123’456,78 | Switzerland | | `fr-FR` | French | DD/MM/YYYY | 123 456,78 | France | | `it-CH` | Italian | DD/MM/YYYY | 123’456.78 | Switzerland | | `it-IT` | Italian | DD/MM/YYYY | 123.456,78 | Italy | | `ja-JP` | Japanese | YYYY-MM-DD | 123,456.78 | Japan | | `ko-KR` | Korean | YYYY-MM-DD | 123,456.78 | South Korea | | `ms-MY` | Malay | DD/MM/YYYY | 123,456.78 | Malaysia | | `nb-NO` | Norwegian | DD/MM/YYYY | 123 456,78 | Norway | | `pl-PL` | Polish | DD/MM/YYYY | 123 456,78 | Poland | | `pt-BR` | Portuguese | DD/MM/YYYY | 123.456,78 | Brazil | | `pt-PT` | Portuguese (Portugal) | DD/MM/YYYY | 123 456,78 | Portugal | | `ro-RO` | Romanian | DD/MM/YYYY | 123.456,78 | Romania | | `sk-SK` | Slovak | DD/MM/YYYY | 123 456,78 | Slovakia | | `sv-SE` | Swedish | YYYY-MM-DD | 123 456,78 | Sweden | | `vi-VN` | Vietnamese | DD/MM/YYYY | 123.456,78 | Vietnam | | `zh-HK` | Traditional Chinese | DD/MM/YYYY | 123,456.78 | Hong Kong | | `zh-TW` | Traditional Chinese | YYYY-MM-DD | 123,456.78 | Taiwan | ### Testing in the dashboard To see how a language and locale change the flow before you ship them, run your playbook from the dashboard: 1. Open the playbook and select **Test playbook**. 2. Save a test user, then pick a **Language** and a **Locale** under **Run playbook**. 3. Select **Run test**. The Footprint flow opens with those settings. **Browser default** leaves the field out of `l10n`, so the flow fills it in from your browser in the order above. --- # Introduction The JavaScript SDK adds Footprint onboarding to your web app. Use it with JavaScript or TypeScript, with or without a framework such as React, Vue, or Angular. It launches iframes from your site and exchanges secure messages between Footprint and your app. ## Browser support The SDK supports all recent versions of the major browsers. For security, Footprint does not support less popular browsers that no longer receive security updates. | Name | Versions | | ----------------------- | --------------------- | | Chrome | Last 3 major versions | | Chrome Mobile | Last 3 major versions | | Firefox | Last 3 major versions | | Microsoft Edge | Last 3 major versions | | Safari OSX | Last 3 major versions | | Safari iOS | Last 3 major versions | | Android default browser | Last 3 major versions | The SDK depends on native browser features. Polyfilling some of them (for example, the Promises API) can stop `footprint.js` from working normally. If the SDK does not behave as expected, remove polyfills to see whether they are the cause. ## Installation Install the SDK: ```bash npm install @onefootprint/footprint-js ``` Configure your app's permissions and [Content Security Policy](/articles/integrate/content-security-policy) to allow Footprint. Import the SDK stylesheet so the iframe renders with the correct styles: ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; ``` ## Device intelligence The SDK can collect device signals through Fingerprint, a third-party provider. Its agent is an optional peer dependency. If your playbook uses device-intelligence rules, install it so those rules receive the signals they need: ```bash npm install @fingerprint/agent ``` The SDK loads Fingerprint lazily; no import is needed. Onboarding still completes without it. If your app already loads Fingerprint, you can leave out the dependency to avoid loading it twice. footprint-js 6.0 loads Fingerprint's previous agent, `@fingerprintjs/fingerprintjs-pro`. On that version, install it instead, and switch to `@fingerprint/agent` when you upgrade to 6.1 or later. ## Next steps * [Onboarding](/articles/sdks/js-onboarding) launches the onboarding flow and handles its callbacks. * [Customization](/articles/integrate/customization) themes and localizes the flow. --- # Onboarding Launch a Footprint onboarding flow from your JavaScript or TypeScript app. Your playbook defines which data to collect and which checks to run. By default, the flow opens in a modal. To embed it in your page instead, see [Inline integration](#inline-integration). ## Start an onboarding 1. **Get an onboarding token.** Start the onboarding with [POST /onboardings](/articles/guide/definitive-integration-guide#the-end-to-end-integration-step-4-run-the-playbook) and take the token it returns, such as `obtok_xxx`. 2. **Initialize the flow.** Trigger Footprint, for example when a button is clicked, and pass the `onboardingSessionToken` and an `onComplete` callback to `initialize`. ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const App = () => { const launch = () => { onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, }); }; return ( ); } ``` 3. **Handle completion.** When the user completes the flow, `onComplete` receives `{ validationToken, onboardingId }`. Send the `onboardingId` to your backend and read the result with GET /onboardings/{id}. The ID comes from the browser, so check that it matches the `id` your backend got from `POST /onboardings` for this user before you act on the result. `validationToken` is deprecated and will be removed, so use `onboardingId` when possible. Before version 7.0.0, `onComplete` received the validation token as a plain string. To upgrade, change `(validationToken) =>` to `({ validationToken }) =>`. A complete example lives in [onefootprint/examples](https://github.com/onefootprint/examples/tree/master/idv/frontend-vite-vanilla). ## Listen to events The SDK fires events as the user acts in the flow. Pass the handlers to `initialize` (modal) or `initializeInline`: ```typescript import { onboarding } from "@onefootprint/footprint-js"; onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, onError: (error) => { console.log(error); }, onAuth: (validationToken) => { console.log(validationToken); }, onCancel: () => { console.log("User canceled the flow"); }, onClose: () => { console.log("User closed the flow"); }, }); ``` ## Track flow progress `onRequirementChange` is available from version 5.5.0; the `page` field requires 5.6.0. Pass `onRequirementChange` to track the flow's progress from your page, for example to drive your own stepper while the flow runs inline. It fires whenever the requirement being executed changes, and again when the flow moves to a different screen within the same requirement: ```typescript import { onboarding } from "@onefootprint/footprint-js"; onboarding.initializeInline({ onboardingSessionToken: "obtok_xxx", containerId: "footprint-container", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, onRequirementChange: ({ kind, page }) => { console.log(kind); // e.g. "collect_business_data" console.log(page); // e.g. "business_owners", or undefined }, }); ``` Possible `kind` values are `collect_business_data`, `collect_data` (personal information), `collect_document`, `liveness` (passkey registration), `collect_investor_profile`, `collect_card_data`, `collect_custom_data`, `collect_document_data`, `register_auth_method` and `process`. New kinds may be added over time, so handle unknown values gracefully. When a requirement spans more than one distinct screen, the payload also carries a `page` field. Today it is set to `business_owners` while the beneficial owners screen of `collect_business_data` is shown, so a stepper can distinguish it from the business details screen of the same requirement. It is omitted everywhere else, and new `page` values may be added over time. ## Inline integration `initializeInline` is available from version 5.1.0. To embed the flow in your page instead of opening a modal, call `initializeInline`. It needs a container element in your DOM, where the flow renders: ```javascript import "@onefootprint/footprint-js/dist/footprint-js.css"; import { onboarding } from "@onefootprint/footprint-js"; const App = () => { const launchInline = () => { onboarding.initializeInline({ onboardingSessionToken: "obtok_xxx", containerId: "footprint-container", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, }); }; return (
); } ``` The inline integration takes the same event handlers and customization options as the modal. Give the container enough height; the recommended minimum is 600px. ## Customize the appearance Pass an `appearance` object to `initialize` (modal) or `initializeInline` to restyle the flow: ```typescript import { onboarding } from "@onefootprint/footprint-js"; onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, appearance: { variables: { borderRadius: "8px", colorSuccess: "#10b981", colorError: "#F87171", buttonPrimaryBg: "#5550e9", }, }, }); ``` The [customization guide](/articles/integrate/customization) lists every variable. ## Available props | Variable | Description | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `onboardingSessionToken` | The onboarding session token you created. | | `onComplete` | Fires after the user completes the onboarding flow, with `{ validationToken, onboardingId }`. Read the result with `GET /onboardings/{onboardingId}`. | | `onAuth` | Optional. Fires after the user logs in, before the user has finished onboarding, with a `validationToken` your backend exchanges with Footprint for the `fp_id` and the login method used. | | `onError` | Optional. Fires on an unrecoverable error while initializing the onboarding flow, with an error string that carries the details. | | `onCancel` | Fires when the user abandons the flow, for example by clicking the close button inside the iframe. | | `onClose` | Fires when the user closes the flow, whether completed or canceled. | | `onRequirementChange` | Optional. Fires when the requirement being executed changes, with `{ kind, page? }` so your page can track the flow's progress. | | `appearance` | Optional. A `FootprintAppearance` object that customizes the look of your integration. | | `l10n` | Optional. Sets the language and locale; see [Localization configuration](/articles/integrate/customization#localization-configuration). | | `containerId` | Required for inline integration only. The ID of the DOM element the onboarding flow renders into. | --- # Changelog Notable releases of `@onefootprint/footprint-js`, the JavaScript SDK that launches Footprint onboarding in the browser. --- # Introduction The Expo SDK opens your Footprint onboarding flow in an in-app browser. This package cannot run in the Expo Go app because it requires custom native code. Rebuild your app with `npx expo prebuild`, as described in the Expo guide [Adding custom native code](https://docs.expo.dev/workflow/customizing/). ## Minimum version requirements Check your environment against these versions before installing: | Dependency | Minimum version | | ---------- | --------------------- | | Expo | Last 3 major versions | The flow opens in the device browser and does not load on versions older than those listed under [Browser support](/articles/sdks/javascript-typescript-introduction#browser-support). ## Installation 1. Install the SDK. ```bash npm install @onefootprint/footprint-expo ``` 2. Install the required peer dependencies. ```bash npm install expo-linking expo-web-browser ``` 3. On iOS, install the pods. ```bash npx pod-install ``` ## Device intelligence If your playbook uses device-intelligence rules, install Fingerprint to collect the signals those rules need. Fingerprint is a third-party provider. Its SDK is optional: onboarding completes without it, but without device-intelligence signals. If your app already bundles Fingerprint, you can leave out the dependency to avoid a duplicate native framework. Fingerprint requires Expo SDK 54 or later with the New Architecture, iOS 15.1, and Android API 24. To set it up: 1. Install the peer dependency. ```bash npm install @fingerprint/react-native ``` 2. Add Fingerprint's config plugin to `app.json`. It adds the Maven repository that hosts Fingerprint's Android SDK. ```json { "expo": { "plugins": ["@fingerprint/react-native"] } } ``` 3. Rebuild the native code. ```bash npx expo prebuild ``` For footprint-expo 3.8, use `@fingerprintjs/fingerprintjs-pro-react-native` and add `https://maven.fpregistry.io/releases` to your Android repositories. From 3.9, use `@fingerprint/react-native`. ## Next steps * [Onboarding](/articles/sdks/expo-onboarding) starts an onboarding from your app and handles the onboarding ID it returns. * [WebView integration](/articles/sdks/expo-webview) renders the flow in a native sheet you control instead of an in-app browser. --- # Onboarding Launch your Footprint onboarding flow from your Expo app. Your playbook defines the data to collect, checks to run, and outcome. [Install the SDK](/articles/sdks/expo-introduction#installation) before you start. ## Start an onboarding 1. **Create an onboarding session.** Call [POST /onboardings](/articles/guide/definitive-integration-guide#the-end-to-end-integration-step-4-run-the-playbook) and keep the onboarding session token it returns, such as `obtok_xxx`. 2. **Launch the flow.** When the user taps a button, for example, call `onboarding.initialize` with the `onboardingSessionToken` and an `onComplete` callback. ```javascript import { onboarding } from "@onefootprint/footprint-expo"; import { View, Button } from "react-native"; const App = () => { const launch = () => { onboarding.initialize({ onboardingSessionToken: "obtok_xxx", onComplete: ({ onboardingId }) => { console.log(onboardingId); }, }); }; return (