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

# Decide Record

> Approve or reject the sealed KYC record of an onboarding

Records your decision on the sealed KYC record a KYC source delivered for the customer. It applies to an onboarding through a `KYC_SOURCE` only. The review of a Trusset identity check is decided by the check itself.

A record is approved only after you opened it: the status reads `AWAITING_DECISION`. Opening happens on your own machine with the [KYC courier tool](https://docs.trusset.org/tools/kyc-courier/overview.md), which proves it with [Open KYC Record](https://docs.trusset.org/endpoints/customers/open-kyc-record.md). Trusset never opens a record.

Approving returns one unsigned `setListed` transaction for each whitelist bound to the source that does not list the wallet yet. The status then reads `AWAITING_SIGNATURE`. When the source is bound to no whitelist, the approval completes the onboarding.

## Path Parameters

**customer** `string` *required*

The customer `id`, your `externalId`, the reference key or a wallet address of the customer.

## Body Parameters

**decision** `string` *required*

`APPROVE` or `REJECT`.

**reason** `string` (default: NOT\_ACCEPTED)

With `REJECT`: `BAD_SIGNATURE`, `DIGEST_MISMATCH`, `UNKNOWN_SOURCE_KEY`, `UNDECRYPTABLE`, `INCOMPLETE` or `NOT_ACCEPTED`.

**signerAddress** `string`

With `APPROVE`: the wallet of your instance that will sign the whitelist admissions. The transactions are checked against it.

## Response Fields

**data** `object`

**decision** `string`

`APPROVE` or `REJECT`.

**admissions** `array`

With `APPROVE`: one entry per whitelist bound to the source, each `listId`, `listName`, `listAddress`, `alreadyListed` and `plan`, the unsigned transaction, or `null` when the wallet is listed already. [Build Transactions](https://docs.trusset.org/endpoints/customers/build-onboarding-transactions.md) returns the same plans again.

**onboarding** `object`

The onboarding after the decision.

```bash cURL theme={null}
curl -X POST "https://api.trusset.org/customers/api/onboarding/client-51877/decision" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: trusset_your_key_here" \
  -d '{ "decision": "APPROVE", "signerAddress": "0x8ba1f109551bD432803012645Ac136ddd64DBA72" }'
```

```typescript TypeScript theme={null}
const response = await fetch(
  'https://api.trusset.org/customers/api/onboarding/client-51877/decision',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', 'X-API-Key': 'trusset_your_key_here' },
    body: JSON.stringify({ decision: 'APPROVE', signerAddress: '0x8ba1f109551bD432803012645Ac136ddd64DBA72' })
  }
);
const { data } = await response.json();
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `INVALID_DECISION` | `400` | `decision` is neither `APPROVE` nor `REJECT` |
| `INVALID_INPUT` | `400` | `reason` is not one of the reject reasons |
| `INVALID_ADDRESS` | `400` | `signerAddress` is malformed |
| `CUSTOMER_NOT_FOUND` | `404` | No customer of your instance matches `customer` |
| `DECISION_NOT_APPLICABLE` | `409` | The onboarding runs on the Trusset identity check, or no record arrived yet |
| `RECORD_NOT_OPENED` | `409` | The record is still sealed. Open it with your local tool first |
| `RECORD_NOT_APPROVABLE` | `409` | The record was rejected, revoked or superseded |
| `RECORD_NOT_REJECTABLE` | `409` | Only a waiting or opened record can be rejected |
| `RECORD_EXPIRED` | `409` | The record passed its validity date |
| `RATE_LIMIT_EXCEEDED` | `429` | More than 120 onboarding writes in the minute |
| `ONBOARDING_DECISION_FAILED` | `500` | The decision failed on the server |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.