Unified.to
All articles

User Provisioning and Verification with Unified


September 23, 2025

With Unified's HRIS API devs can build use provisioning features that work with any HRIS integration like BambooHR, Workday and 180+ more.

You can create, update, list and delete users in your customers' employee directories.

In this guide, I will show you how to provision users using the SDK, with BambooHR as an example. The same approach works for all Unified HR integrations.

Prerequisites

  • Node.js (v18+)
  • Unified account with at least one HR integration enabled (e.g. for this example we are using BambooHR)
  • Unified API key
  • Your customer's HR connection ID

Supported Integrations

Unified's API works with 180+ HR integrations (BambooHR, Workday, HiBob, Gusto, etc.) and 5+ verification providers (Certn, Checkr, First Advantage, Verifiable, Yardstik).

See all HR integrations

See all verification integrations


Step 1: Setting up your project

mkdir user-verification-demo
cd user-verification-demo
npm init -y
npm install @unified-api/typescript-sdk dotenv

Add your credentials to .env:

UNIFIED_API_KEY=your_unified_api_key
CONNECTION_BAMBOOHR=your_customer_bamboohr_connection_id
CONNECTION_VERIFICATION=your_customer_verification_connection_id

Step 2: Initialize the SDK

import 'dotenv/config';
import { UnifiedTo } from '@unified-api/typescript-sdk';

const { UNIFIED_API_KEY, CONNECTION_BAMBOOHR, CONNECTION_VERIFICATION } = process.env;

const sdk = new UnifiedTo({
  security: { jwt: UNIFIED_API_KEY! },
});

Step 3: How to Get Your Customer's Connection ID

Before you get started, your end customer must authorize your app to access their HRIs integration via Unified's auth flow.

Once authorized, you will receive a connection ID for that customer's integration. Store this carefully and use it in all API calls for that specific customer.


Step 4: Creating a User (Provisioning)

export async function createUser(connectionId: string, email: string, firstName: string, lastName: string) {
  const userResult = await sdk.hris.createEmployee({
    connectionId,
    employee: {
      email,
      firstName,
      lastName,
      status: "EMPLOYEE_STATUS_ACTIVE",
    },
  });
  return userResult.employee;
}

Step 5: Listing Users

export async function listUsers(connectionId: string) {
  const usersResult = await sdk.hris.listEmployees({
    connectionId,
    limit: 10,
  });
  return usersResult.employees;
}

Step 6: Updating a User

export async function updateUser(connectionId: string, userId: string, updates: any) {
  const updateResult = await sdk.hris.updateEmployee({
    connectionId,
    id: userId,
    employee: updates,
  });
  return updateResult.employee;
}

Step 7: Deleting a User

export async function deleteUser(connectionId: string, userId: string) {
  await sdk.hris.removeEmployee({
    connectionId,
    id: userId,
  });
  return true;
}

Step 8: Verifying a User (Background Check, License, etc.)

Unified's new Verification API lets you trigger and check for things like background checks, license verifications, using providers like Certn, Checkr, and others.

export async function createVerificationRequest(connectionId: string, user: any) {
  const requestResult = await sdk.verification.createRequest({
    connectionId,
    request: {
      type: "background_check", // or "license", "passport", etc.
      subject: {
        firstName: user.firstName,
        lastName: user.lastName,
        email: user.email,
        // Add other fields as required by the provider/package
      },
      packageId: "standard_background_check", // Use the correct package ID for your provider
    },
  });
  return requestResult.request;
}

Step 9: Example Usage

async function main() {
  // 1. Create a user
  const user = await createUser(CONNECTION_BAMBOOHR!, "jane.doe@example.com", "Jane", "Doe");

  // 2. List users
  const users = await listUsers(CONNECTION_BAMBOOHR!);

  // 3. Update a user
  if (user?.id) {
    const updated = await updateUser(CONNECTION_BAMBOOHR!, user.id, { status: "EMPLOYEE_STATUS_INACTIVE" });
    console.log("Updated user:", updated);
  }

  // 4. Delete a user
  if (user?.id) {
    await deleteUser(CONNECTION_BAMBOOHR!, user.id);
    console.log("User deleted.");
  }

  // 5. Create a verification request (background check)
  if (user) {
    const verification = await createVerificationRequest(CONNECTION_VERIFICATION!, user);
    console.log("Verification request:", verification);
  }

  console.log("Users:", users);
}

main();

And that's it - **Happy Building ** 🎉

All articles