How to guide - Onboard a company and its legal representatives (KYB)

Run a full KYB flow on one Workflow Session: verify a company in the official registry, then create and verify an Applicant for the company and one for each of its legal representatives.

In this example, let's say you need to onboard a new business customer: Lumen Studio, a French SAS.

Before becoming a customer, Lumen Studio must complete your KYB workflow:

  1. The company is identified in the official registry
  2. The company provides its company certificate
  3. Each of its legal representatives is screened against watchlists
  4. Each of its legal representatives verifies their identity

In this workflow, your Workflow Template contains 4 Action Groups:

  • Company Verification
  • Document Analysis
  • Identity Verification
  • Watchlist Verification

The whole flow is built on one Workflow Session. Inside it, you create one legal_person Applicant for the company, and one natural_person Applicant per legal representative, attached to the company through parent_applicant_id.

➡️

Before you start:

Make sure your organization already has a Workflow Template containing these 4 Action Groups.

🚧

Generate the links last

parent_applicant_id can only be changed until the first link has been generated for the Workflow Session. Once a link exists, re-parenting an existing Applicant returns a 400.

Creating a new child Applicant is still allowed after a link exists—only moving an existing one is blocked. Even so, building the whole Applicant tree first (Steps 4 and 5) and calling the links endpoint last (Step 9) keeps the structure editable while you assemble it.

Step 1: Retrieve the Workflow Template ID

Endpoint: List Workflow Templates (GET /workflow_templates)

// no request body required
{
  "meta": {
    "next_cursor": null
  },
  "data": [
    {
      "id": "35a07993...",
      "name": "Business onboarding",
      "action_groups": [
        {
          "type": "company_verification"
        },
        {
          "type": "document_analysis"
        },
        {
          "type": "identity_verification"
        },
        {
          "type": "watchlist_verification"
        }
      ],
      "workspaces": [],
      "created_at": "2025-09-10T12:56:59+00:00",
      "updated_at": "2025-09-10T12:56:59+00:00"
    }
  ]
}

👉 Save the Id value—you'll need it to create a Workflow Session.

Step 2: Create a new Workflow Session

Give the session a clear name so it's easy to identify later in the app dashboard.

{
  "name": "Onboarding of Lumen Studio",
  "workflow_template_id": "35a07993...",
  "workspace_id": null
}
{
  "id": "c0cbf043...",
  "name": "Onboarding of Lumen Studio",
  "workflow_template_id": "35a07993...",
  "workspace_id": "814aac47...",
  "status": "awaiting",
  "action_groups": [
    {
      "type": "company_verification",
      "status": "awaiting",
      "actions": []
    },
    {
      "type": "document_analysis",
      "status": "awaiting",
      "actions": []
    },
    {
      "type": "identity_verification",
      "status": "awaiting",
      "actions": []
    },
    {
      "type": "watchlist_verification",
      "status": "awaiting",
      "actions": []
    }
  ],
  "created_at": "2025-09-22T14:30:00+00:00",
  "updated_at": "2025-09-22T14:30:00+00:00"
}

👉 Save the Workflow Session Id—every following call refers to it, either in the path or as workflow_session_id in the body.

Step 3: Verify Lumen Studio in the company registry

This is the step that makes the rest of the flow possible: it returns the company's official identity and the list of its legal representatives, which you will turn into Applicants in Steps 4 and 5.

No Applicant exists yet at this point, so initiate the verification from the company number rather than from an Applicant. Pass the Workflow Session Id to attach it to the session.

{
  "company_number": "794513986",
  "country_code": "FR",
  "workflow_session_id": "c0cbf043..."
}
{
  "id": "b71f2ac4...",
  "workspace_id": "814aac47...",
  "created_at": "2025-09-22T14:32:00+00:00",
  "updated_at": "2025-09-22T14:32:00+00:00",
  "status": "pending",
  "data_anonymized": false,
  "workflow_session_id": "c0cbf043...",
  "previous_attempt_id": null,
  "applicant_id": null
}

Accepted country_code values are FR, GB, BE, CH, NL, ES, LU, IT and DE. German companies additionally require company_name, and accept zip_code, street, city and register_court to narrow the lookup.

Wait for the result

The verification is asynchronous. On creation its status is always pending, and the data object is only populated once it reaches verified.

Subscribe to the verification.company.done webhook, or poll Retrieve a Company Verification (GET /verifications/companies/{companyVerificationId}) until the status is no longer pending or awaiting_data.

{
  "id": "b71f2ac4...",
  "status": "verified",
  "workflow_session_id": "c0cbf043...",
  "data": {
    "company_information": {
      "name": "LUMEN STUDIO",
      "company_number": "794513986",
      "partial_data": false,
      "required_document_type": ["company_certificate"],
      "legal_form": {
        "code": "6CHY",
        "description": "SAS, société par actions simplifiée"
      },
      "vat_number": "FR61794513986",
      "founded_on": "2013-07-24",
      "active": true,
      "legal_representatives": [
        {
          "title": "Présidente",
          "type": "natural_person",
          "first_name": "Kelly",
          "last_name": "Smith",
          "birth_name": "Smith",
          "born_on": "1990-07-13",
          "company_name": null,
          "company_number": null
        },
        {
          "title": "Directeur Général",
          "type": "natural_person",
          "first_name": "Marc",
          "last_name": "Dubois",
          "birth_name": "Dubois",
          "born_on": "1985-03-04",
          "company_name": null,
          "company_number": null
        }
      ]
    }
  }
}

Three fields in this response drive the rest of the recipe:

  • legal_representatives—the people you will create as natural_person Applicants in Step 5.
  • required_document_type—the document type this company's registry expects. Use it in Step 7 instead of hardcoding a type.
  • partial_data—when true, the company has restricted the publication of some of its data and representatives may be missing. Treat the list as incomplete and collect the missing representatives yourself.
📘

Representatives are not always people

A legal representative can itself be a company. Entries where type is legal_person carry company_name and company_number instead of first_name, last_name and born_on.

Filter on type == "natural_person" before creating natural person Applicants, and decide separately how far up the ownership chain you want to go.

Step 4: Create the legal person Applicant

  • Endpoint: Create a new Applicant (POST /workflow_sessions/{workflowSessionId}/applicants)
  • Content type: application/json

Create the Applicant representing the company itself, filled with the data returned by the Company Verification. This Applicant is the root of the tree, so it has no parent_applicant_id.

{
  "type": "legal_person",
  "label": "Lumen Studio",
  "reference_id": "LUMEN-001",
  "delivery_mode": "email",
  "email": "[email protected]",
  "legal_person": {
    "company_name": "LUMEN STUDIO",
    "country_code": "FR",
    "legal_representatives": [
      {
        "first_name": "Kelly",
        "last_name": "Smith"
      },
      {
        "first_name": "Marc",
        "last_name": "Dubois"
      }
    ]
  }
}
{
  "id": "a4d9e112...",
  "workflow_session_id": "c0cbf043...",
  "type": "legal_person",
  "status": "initiated",
  "label": "Lumen Studio",
  "reference_id": "LUMEN-001",
  "delivery_mode": "email",
  "email": "[email protected]",
  "legal_person": {
    "company_name": "LUMEN STUDIO",
    "country_code": "FR",
    "legal_representatives": [
      {
        "first_name": "Kelly",
        "last_name": "Smith"
      },
      {
        "first_name": "Marc",
        "last_name": "Dubois"
      }
    ]
  },
  "parent_applicant_id": null,
  "child_applicant_ids": [],
  "created_at": "2025-09-22T14:35:00+00:00",
  "updated_at": "2025-09-22T14:35:00+00:00"
}

👉 Save this Applicant Id—it is the parent_applicant_id of every natural person you create next.

The data you put in legal_person is not just bookkeeping: it is used to cross-validate what Youtrust later extracts from the company's documents.

📘

country_code on a legal person Applicant

Company Verification covers nine countries, but the legal_person.country_code field on an Applicant currently only accepts FR.

For companies registered elsewhere, omit country_code—the Company Verification itself is unaffected.

Step 5: Create one natural person Applicant per representative

  • Endpoint: Create a new Applicant (POST /workflow_sessions/{workflowSessionId}/applicants)
  • Content type: application/json

For each legal representative of type natural_person, create an Applicant and point its parent_applicant_id at the legal_person Applicant from Step 4.

{
  "type": "natural_person",
  "label": "Kelly Smith",
  "parent_applicant_id": "a4d9e112...",
  "natural_person": {
    "identity": {
      "first_name": "Kelly",
      "last_name": "Smith"
    }
  }
}
{
  "id": "f38b7c50...",
  "workflow_session_id": "c0cbf043...",
  "type": "natural_person",
  "status": "initiated",
  "label": "Kelly Smith",
  "reference_id": null,
  "delivery_mode": "none",
  "email": null,
  "natural_person": {
    "identity": {
      "first_name": "Kelly",
      "last_name": "Smith"
    }
  },
  "parent_applicant_id": "a4d9e112...",
  "child_applicant_ids": [],
  "created_at": "2025-09-22T14:36:00+00:00",
  "updated_at": "2025-09-22T14:36:00+00:00"
}

Repeat for every representative. You can check the resulting tree at any time with List Applicants (GET /workflow_sessions/{workflowSessionId}/applicants?parent_applicant_id=a4d9e112...).

Note that an Applicant's identity only carries first_name and last_name. The representative's date of birth stays in the Company Verification response—you need it in the next step, so keep it at hand.

Step 6: Screen each representative against watchlists

Initiate one Watchlist Verification per legal representative, to check them against international sanctions lists and politically exposed person (PEP) databases.

{
  "workflow_session_id": "c0cbf043...",
  "natural_person": {
    "first_name": "Kelly",
    "last_name": "Smith",
    "born_on": "1990-07-13"
  }
}
{
  "id": "9412b83b...",
  "workspace_id": "814aac47...",
  "created_at": "2025-09-22T14:37:00+00:00",
  "updated_at": "2025-09-22T14:37:00+00:00",
  "status": "pending",
  "data_anonymized": false,
  "workflow_session_id": "c0cbf043...",
  "previous_attempt_id": null
}

born_on is required. Take it from the legal_representatives[].born_on field returned by the Company Verification in Step 3.

🚧

Watchlist Verifications attach to the Session, not to an Applicant

Unlike the other verifications in this recipe, POST /verifications/watchlists does not accept an applicant_id, and the Watchlist Verification response does not return one.

You identify the person by passing their first_name, last_name and born_on directly, and the verification is linked to the Workflow Session as a whole.

If you need to know which representative a given Watchlist Verification belongs to, keep your own mapping between the Applicant Id created in Step 5 and the Watchlist Verification Id returned here.

Step 7: Request an identity document from each representative

Also initiate an Image Identity Verification for each legal representative. Here you can reference the Applicant directly, so no identity data needs repeating.

{
  "applicant_id": "f38b7c50..."
}
{
  "id": "79a291fc...",
  "workspace_id": "814aac47...",
  "created_at": "2025-09-22T14:38:00+00:00",
  "updated_at": "2025-09-22T14:38:00+00:00",
  "status": "pending",
  "status_codes": [],
  "data_anonymized": false,
  "workflow_session_id": "c0cbf043...",
  "previous_attempt_id": null,
  "applicant_id": "f38b7c50..."
}

Because you pass an applicant_id instead of uploading a file, this creates a verification that is waiting for a document. The representative supplies their identity document through the portal link generated in Step 9, and the names you set on the Applicant in Step 5 are cross-checked against the names read from the document.

Fanning out over the representatives

Steps 5, 6 and 7 are the same three calls repeated per representative. In practice you will loop:

const representatives = companyVerification.data.company_information.legal_representatives
  .filter((rep) => rep.type === "natural_person");

for (const rep of representatives) {
  const applicant = await api.post(
    `/workflow_sessions/${workflowSessionId}/applicants`,
    {
      type: "natural_person",
      label: `${rep.first_name} ${rep.last_name}`,
      parent_applicant_id: legalPersonId,
      natural_person: {
        identity: { first_name: rep.first_name, last_name: rep.last_name },
      },
    }
  );

  await api.post("/verifications/watchlists", {
    workflow_session_id: workflowSessionId,
    natural_person: {
      first_name: rep.first_name,
      last_name: rep.last_name,
      born_on: rep.born_on,
    },
  });

  await api.post("/verifications/identity_documents", {
    applicant_id: applicant.id,
  });
}

Step 8: Request the company certificate

Attach a Document Analysis to the legal_person Applicant, so the company is asked to provide its certificate.

{
  "applicant_id": "a4d9e112...",
  "type": "company_certificate"
}
{
  "id": "2f6c9d81...",
  "workspace_id": "814aac47...",
  "created_at": "2025-09-22T14:39:00+00:00",
  "updated_at": "2025-09-22T14:39:00+00:00",
  "status": "pending",
  "status_codes": [],
  "type": "company_certificate",
  "workflow_session_id": "c0cbf043..."
}

As in Step 7, referencing an applicant_id instead of uploading a file creates an analysis that waits for the document to be supplied through the portal.

Rather than hardcoding company_certificate, prefer the required_document_type returned by the Company Verification. Depending on the registry the company is filed in, the expected type may be business_registration_certificate or rne_certificate instead.

const [requiredType] =
  companyVerification.data.company_information.required_document_type;

await api.post("/document_analyses", {
  applicant_id: legalPersonId,
  type: requiredType,
});

You can also run fraud detection on the submitted document by setting analysis_type.fraud_level to standard or advanced. This requires the corresponding Document Trust add-on.

Step 9: Generate the Workflow Session links

Endpoint: Generate Workflow Session Links (GET /workflow_sessions/{workflowSessionId}/links)

The Applicant tree is complete and every verification is waiting for input. Generate the links your end users will open.

// no request body required
{
  "applicants": [
    {
      "id": "a4d9e112...",
      "workflow_session_id": "c0cbf043...",
      "workflow_session_link_url": "https://portal.yousign.app/workflow_sessions/abc123",
      "workflow_session_link_expires_at": "2025-09-29T14:40:00+00:00",
      "status": "notified",
      "label": "Lumen Studio",
      "reference_id": "LUMEN-001",
      "type": "legal_person",
      "parent_applicant_id": null,
      "child_applicant_ids": [
        "f38b7c50...",
        "d21a6e97..."
      ],
      "created_at": "2025-09-22T14:35:00+00:00",
      "updated_at": "2025-09-22T14:40:00+00:00"
    }
  ]
}

Note that this endpoint is a GET, and that only one entry is returned. A root Applicant's link also covers its child Applicants, so the two legal representatives are not returned as separate entries—they are reached through the company's link, and their Ids are listed under child_applicant_ids.

Calling the links endpoint last is what keeps the Applicant tree editable while you assemble it. You can still create new child Applicants after a link has been generated—only re-parenting an Applicant that already exists is blocked from that point on.

Step 10: Follow the Workflow Session

Endpoint: Retrieve a Workflow Session (GET /workflow_sessions/{workflowSessionId})

This returns the current state of every Action Group and every underlying resource, which is the simplest way to render an overall progress view.

Rather than polling, subscribe to these webhook events:

EventFires when
verification.company.donethe Company Verification has a result
verification.watchlist.donea Watchlist Verification has a result
verification.identity_document.donean Image Identity Verification has a result
document_analysis.donea Document Analysis has a result
applicant.notifiedan Applicant has been sent their link
workflow_action_group.doneevery Action in a group is complete
workflow_session.donethe whole Workflow Session is complete

If an Action cannot be completed through the portal—for instance you verified a representative offline—you can close it manually with Resolve a Workflow Session Action (POST /workflow_sessions/{workflowSessionId}/resolve_action), passing the resource id, its type (company_verification, watchlist_verification, identity_document_verification, company_certificate_document_analysis, …) and an optional reason.