> ## Documentation Index
> Fetch the complete documentation index at: https://developer.uphold.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Attestation and sandbox testing

> Trigger the final KYB attestation for a business user, understand its verification checks, and simulate outcomes in Sandbox using the KYB test helpers.

Preview

The `attestation` process is the final step of KYB. It does not accept input — you trigger it once the business has submitted everything else, and Uphold runs a set of verification checks over the submitted data.

This guide is part of the [business onboarding via REST API](https://developer.uphold.com/developer-guides/user-onboarding/business/via-api.md) flow.

## Before you trigger

The following processes must be complete before the attestation can run:

* `profile`
* `documents`
* `associatedPersons` (every person's `profile`, `identity` and `proofOfAddress`)
* `financialInstitution`, when it applies to the business

If any are incomplete, the request fails with an `operation_not_allowed` error whose `reasons` list what is missing (for example `kyb-profile-incomplete` or `kyb-documents-incomplete`).

## Trigger the attestation

Call [Trigger attestation](https://developer.uphold.com/rest-apis/core-api/kyb/trigger-attestation.md).

```http theme={null}
POST /core/kyb/processes/attestation/trigger
```

A successful response returns the attestation as `running`, with every check `not-started`.

```json Response [expandable] theme={null}
{
  "attestation": {
    "code": "attestation",
    "status": "running",
    "output": {
      "checks": [
        { "code": "business-online-presence", "status": "not-started" },
        { "code": "business-classification", "status": "not-started" },
        { "code": "business-registry", "status": "not-started" },
        { "code": "business-registrations", "status": "not-started" },
        { "code": "business-associated-persons", "status": "not-started" },
        { "code": "business-adverse-media", "status": "not-started" },
        { "code": "business-address-lookup", "status": "not-started" },
        { "code": "business-tin-database", "status": "not-started" },
        { "code": "business-screening", "status": "not-started" },
        { "code": "business-documents", "status": "not-started" },
        { "code": "licensing-verification", "status": "not-started" },
        { "code": "associated-persons-screening", "status": "not-started" },
        {
          "code": "associated-persons-address-lookup",
          "status": "not-started"
        },
        { "code": "associated-persons-tin-database", "status": "not-started" }
      ]
    }
  }
}
```

## Follow the progress

Subscribe to the `core.kyb.attestation.status-changed` and `core.kyb.attestation.updated` webhooks, or poll [Get KYB overview](https://developer.uphold.com/rest-apis/core-api/kyb/get-overview.md) with `?detailed=attestation` to retrieve `processes.attestation.output.checks`.

The `updated` webhook is sent when attestation checks change but the overall attestation status doesn't. When the attestation status changes, only `status-changed` is sent — call [Get KYB overview](https://developer.uphold.com/rest-apis/core-api/kyb/get-overview.md) with `?detailed=attestation` to retrieve the latest checks.

Each check exposes a `code`, a `status`, and optionally a `reason` and a `note` explaining the result.

| Check status | Meaning |
| - | - |
| `not-started` | The check has not begun. |
| `skipped` | The check does not apply to this business. |
| `in-progress` | The check is being run. |
| `in-review` | The check requires manual review by Uphold. |
| `approved` | The check passed. |
| `rejected` | The check failed. |

If the attestation fails, consult the checks, `reason`, and `note` to understand what went wrong and how you or the end-user can fix it. Once the attestation succeeds, the business is verified — [check its capabilities](https://developer.uphold.com/developer-guides/user-onboarding/business/via-api.md#check-capabilities) to confirm it can transact.

## Testing in Sandbox

In Sandbox, no real verification takes place, so the KYB test helpers let you drive each step to a chosen outcome.

> [!NOTE]
>
> The test helpers use the `core.kyb:use-test-helpers` scope, which must be
> enabled for your client credentials.

### Associated person outcomes

Use the associated person test helpers to decide how a person's document verification ends:

* [Set identity outcome](https://developer.uphold.com/rest-apis/core-api/kyb/associated-persons/test-helpers/identity-outcome.md)
* [Set proof of address outcome](https://developer.uphold.com/rest-apis/core-api/kyb/associated-persons/test-helpers/proof-of-address-outcome.md)

### Attestation check states

After triggering the attestation, call [Set attestation state](https://developer.uphold.com/rest-apis/core-api/kyb/test-helpers/set-attestation-state.md) to set the state of one or more checks.

```http theme={null}
POST /core/kyb/test-helpers/attestation-state
{
  "checks": [
    { "code": "business-registry", "outcome": "approved" },
    { "code": "business-screening", "outcome": "rejected" }
  ]
}
```

| Outcome | Effect |
| - | - |
| `approved` | The check passes. |
| `rejected` | The check is declined, functioning as a Request For Information (RFI). |
| `blocked` | The case is rejected and the account is blocked. See the [Set attestation state](https://developer.uphold.com/rest-apis/core-api/kyb/test-helpers/set-attestation-state.md) warning about testing this scenario. |

Once every check is `approved`, the attestation process status becomes `ok` and the business is verified.
