---
title: "Prove onboarding API client"
url: "https://platformdocs.coinme.com/#/docs/caas-prove-onboarding-api-client"
markdown: "https://platformdocs.coinme.com/docs/caas-prove-onboarding-api-client.md"
summary: "The `@coinme/prove-onboarding-api-client` package provides a client for interacting with the Coinme Prove Onboarding APIs."
surface: "caas"
platform: "server"
package: "@coinme/prove-onboarding-api-client"
updated: "2026-11-04"
---

# Prove onboarding API client

The `@coinme/prove-onboarding-api-client` package provides a client for interacting with the Coinme Prove Onboarding APIs.

> **Server only.**
>
> `AuthService` takes your partner client secret and mints a partner access token. Use it, and these clients, only on your backend (Node.js). Never bundle them into a browser, WebView or mobile (React Native) app, where anyone can extract the secret and the token: `AuthService` throws if it runs there. For anything that runs on a customer's device, mint a [Transient Auth Token](https://platformdocs.coinme.com/docs/transient-auth-token.md) on your backend instead.

> **This is version 2.0.0, and 1.x is deprecated.**
>
> This page documents version 2.0.0 of the CaaS API clients, which is not published yet; until it is, the registry serves 1.x, which is configured differently. Install with `@^2.0.0`. [CaaS API clients](https://platformdocs.coinme.com/docs/caas-api-clients.md) covers installing, authenticating, environments and [upgrading from 1.x](https://platformdocs.coinme.com/docs/caas-api-clients.md#upgrading-from-1-x).

## Install

```bash
npm install @coinme/prove-onboarding-api-client@^2.0.0 @coinme/core-api-client@^2.0.0
```

The packages come from Coinme's private registry; [Install in the overview](https://platformdocs.coinme.com/docs/caas-api-clients.md#install) shows the `.npmrc` entries. Every client needs a token from `AuthService` in `@coinme/core-api-client`.

## Create the client

The API client for interacting with the Prove Onboarding APIs.

```typescript
import { APIClient } from '@coinme/prove-onboarding-api-client';

const onboardingClient = new APIClient({
  baseUrl: 'https://caas-staging.coinme.com/services',
  onboardingBaseUrl: process.env.COINME_ONBOARDING_BASE_URL!,
  partnerId: process.env.COINME_PARTNER_ID!,
  token: await authService.getToken(),
});
```

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `baseUrl` | `string` | Yes | Base URL of the CaaS API for the environment to call, including the `/services` path, for example `https://caas-staging.coinme.com/services` for staging. Use the URLs Coinme provides for each environment. |
| `onboardingBaseUrl` | `string` | Yes | Base URL of the secure onboarding host for the environment to call, including the `/services` path. Customer onboarding, which carries the customer's KYC data, is sent here; every other call uses `baseUrl`. |
| `partnerId` | `string` | Yes | The unique identifier Coinme assigns to each partner. |
| `token` | `string` | Yes | The bearer token from `AuthService.getToken()`. |

A client keeps the token it was given; pass a new one to `updateToken` when it expires, or create the client per request. [Environments in the overview](https://platformdocs.coinme.com/docs/caas-api-clients.md#environments) lists the base URLs.

## Methods

### createInstantLink

Initiate authentication flow with an instant link. This flow will result in an SMS containing the redirect URL being sent to the provided mobile phone number.

```typescript
createInstantLink(body: CreateInstantLinkRequest): Promise<CreateInstantLinkResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `CreateInstantLinkRequest` | The parameters required to create an instant link. |

A promise that resolves to a `CreateInstantLinkResponse`. See [CreateInstantLinkResponse](#createinstantlinkresponse), [CreateInstantLinkRequest](#createinstantlinkrequest).

```typescript
const response = await onboardingClient.createInstantLink({
  mobileNumber: 'mobile-number',
});
```

### customerOnboarding

Initiates the customer onboarding process.

```typescript
customerOnboarding(body: CustomerOnboardingRequest): Promise<CustomerOnboardingResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `CustomerOnboardingRequest` | The parameters required to initiate the customer onboarding process. |

A promise that resolves to a `CustomerOnboardingResponse`. See [CustomerOnboardingResponse](#customeronboardingresponse), [CustomerOnboardingRequest](#customeronboardingrequest).

```typescript
const response = await onboardingClient.customerOnboarding({
  address: {
    city: 'city',
    country: 'US',
    line1: 'line1',
    postalCode: '98101',
    state: 'WA',
  },
  dateOfBirth: '1990-01-01',
  email: 'customer@example.com',
  fullName: {
    firstName: 'first-name',
    lastName: 'last-name',
  },
  phoneNumber: {
    countryCode: 'US',
    number: 'number',
  },
  SSN: 'ssn',
});
```

### finalizeInstantLink

Finalize instant link authentication process.

```typescript
finalizeInstantLink(body: FinalizeMobileAuthRequest): Promise<FinalizeInstantLinkResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `FinalizeMobileAuthRequest` | The parameters required to finalize the instant link authentication process. |

A promise that resolves to a `FinalizeInstantLinkResponse`. See [FinalizeInstantLinkResponse](#finalizeinstantlinkresponse), [FinalizeMobileAuthRequest](#finalizemobileauthrequest).

```typescript
const response = await onboardingClient.finalizeInstantLink({
  verificationFingerprint: 'verification-fingerprint',
});
```

### finalizeMobileAuth

Finalize mobile auth.

```typescript
finalizeMobileAuth(body: FinalizeMobileAuthRequest): Promise<FinalizeMobileAuthResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `FinalizeMobileAuthRequest` | The parameters required to finalize mobile auth. |

A promise that resolves to a `FinalizeMobileAuthResponse`. See [FinalizeMobileAuthResponse](#finalizemobileauthresponse), [FinalizeMobileAuthRequest](#finalizemobileauthrequest).

```typescript
const response = await onboardingClient.finalizeMobileAuth({
  verificationFingerprint: 'verification-fingerprint',
});
```

### getInstantLinkById

Get instant link by ID.

```typescript
getInstantLinkById(authId: string): Promise<GetInstantLinkByIdResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `authId` | `string` | The unique identifier appended to the `smsRedirectUrl` from the initiate link response. |

A promise that resolves to a `GetInstantLinkByIdResponse`. See [GetInstantLinkByIdResponse](#getinstantlinkbyidresponse).

```typescript
const response = await onboardingClient.getInstantLinkById('auth-id');
```

### initiateMobileAuth

Initiate mobile auth.

```typescript
initiateMobileAuth(body: InitiateMobileAuthRequest): Promise<InitiateMobileAuthResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `InitiateMobileAuthRequest` | The parameters required to initiate mobile auth. |

A promise that resolves to a `InitiateMobileAuthResponse`. See [InitiateMobileAuthResponse](#initiatemobileauthresponse), [InitiateMobileAuthRequest](#initiatemobileauthrequest).

```typescript
const response = await onboardingClient.initiateMobileAuth({
  consentCollectedTimestamp: 'consent-collected-timestamp',
  consentDescription: 'consent-description',
  consentTransactionId: 'consent-transaction-id',
});
```

### retrieveIdentityInformation

Looks up the identity details registered to a phone number, to pre-fill onboarding. Send the phone number with the last four digits of the customer's Social Security Number (`last4`) or their date of birth (`dob`). The SSN in the response is a token issued through the vault provider, never the number itself.

```typescript
retrieveIdentityInformation(body: RetrieveIdentityInformationRequest): Promise<RetrieveIdentityInformationResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `RetrieveIdentityInformationRequest` | The parameters required to retrieve identity information. |

A promise that resolves to a `RetrieveIdentityInformationResponse`. See [RetrieveIdentityInformationResponse](#retrieveidentityinformationresponse), [RetrieveIdentityInformationRequest](#retrieveidentityinformationrequest).

```typescript
const response = await onboardingClient.retrieveIdentityInformation({
  last4: '1234',
  phoneNumber: 'phone-number',
});
```

### updateToken

Allows updating the token dynamically (e.g., after refresh), without creating a new instance of the client.

```typescript
updateToken(newToken: string): void
```

| Parameter | Type | Description |
| --- | --- | --- |
| `newToken` | `string` | The new token to use. |

Returns `void`.

```typescript
onboardingClient.updateToken('new-token');
```

### verifyIdentity

Verify user identity.

```typescript
verifyIdentity(body: VerifyIdentityRequest): Promise<VerifyIdentityResponse>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `body` | `VerifyIdentityRequest` | The parameters required to verify the user's identity. |

A promise that resolves to a `VerifyIdentityResponse`. See [VerifyIdentityResponse](#verifyidentityresponse), [VerifyIdentityRequest](#verifyidentityrequest).

```typescript
const response = await onboardingClient.verifyIdentity({
  phoneNumber: 'phone-number',
});
```

## Types

The request, query and response types of the methods above, as the package exports them. Ids are strings and amounts are decimal strings, as the API sends and expects them; response fields are optional and may be null, because the API leaves out or nulls values it has no data for.

### CreateInstantLinkRequest

Request for `POST /services/sendAuthSms`: Initiate Instant Link.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `deviceIp` | `string` | No | IP of mobile device. Can be IPv4 or IPv6 |
| `mobileNumber` | `string` | Yes | Phone number to send link to |
| `requestId` | `string` | No | Optional requestId that can be used to track the requests through the entire Instant Link flow. If not sent, it will be generated automatically |
| `sessionId` | `string` | No |  |

### CreateInstantLinkResponse

Response for `POST /services/sendAuthSms`: Initiate Instant Link.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `authUrl` | `string \| null` | No |  |
| `requestId` | `string \| null` | No |  |

### CustomerOnboardingRequest

Request for `POST /services/customeronboarding`: Initiate Customer Onboarding.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | `object` | Yes | Full home address of customer |
| `address.city` | `string` | Yes | City of customer home address |
| `address.country` | `string` | Yes | 3 character abbreviation of country of customer's home address (i.e. USA) |
| `address.line1` | `string` | Yes | Line 1 of customer home address |
| `address.line2` | `string` | No | Line 2 of customer home address |
| `address.postalCode` | `string` | Yes | Postal code of customer home address |
| `address.state` | `string` | Yes | State of customer home address |
| `dateOfBirth` | `string` | Yes | Date of birth in format YYYY-MM-DD |
| `email` | `string` | Yes | Email of customer Format: email. |
| `fullName` | `object` | Yes | Full legal name of customer |
| `fullName.firstName` | `string` | Yes | First name of customer |
| `fullName.lastName` | `string` | Yes | Last name of customer |
| `fullName.middleName` | `string` | No | Middle name of customer |
| `fullName.otherNames` | `string[]` | No |  |
| `phoneNumber` | `object` | Yes | 10-digit phone number |
| `phoneNumber.countryCode` | `string` | Yes | Country code of phone number (i.e. 1) |
| `phoneNumber.number` | `string` | Yes | 10-digit phone number |
| `SSN` | `string` | Yes | Social security number of the customer |

### CustomerOnboardingResponse

Response for `POST /services/customeronboarding`: Initiate Customer Onboarding.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `customerId` | `string \| null` | No |  |
| `status` | `string \| null` | No |  |

### FinalizeInstantLinkRequest

Request for `POST /services/authLinkResult`: Initiate Instant Link Finish.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `requestId` | `string` | No |  |
| `verificationFingerprint` | `string` | Yes | Extracted from the URL at finalTargetUrl |

### FinalizeInstantLinkResponse

Response for `POST /services/authLinkResult`: Initiate Instant Link Finish.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `authenticatedPhoneNumber` | `string \| null` | No |  |
| `requestId` | `string \| null` | No |  |

### FinalizeMobileAuthRequest

Request for `POST /services/mobileAuthFinish`: Finish Mobile Auth.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `requestId` | `string` | No |  |
| `verificationFingerprint` | `string` | Yes | Extracted from the URL at finalTargetUrl |

### FinalizeMobileAuthResponse

Response for `POST /services/mobileAuthFinish`: Finish Mobile Auth.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `authenticatedPhoneNumber` | `string \| null` | No |  |
| `requestId` | `string \| null` | No |  |

### GetInstantLinkByIdPathParams

PathParams for `GET /services/smsAuth/{authId}`: Get Instant Link by ID.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `authId` | `string` | Yes | authId appended to the smsRedirectUrl from the Initiate Instant Link response |

### GetInstantLinkByIdResponse

Where an instant link sends the customer. The API answers the link with a redirect to the authentication page rather than with a JSON body.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `redirectUrl` | `string` | Yes | The authentication URL the instant link redirects to. |

### InitiateMobileAuthRequest

Request for `POST /services/mobileAuth`: Initiate Mobile Auth.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `consentCollectedTimestamp` | `string` | Yes | Date/Time field when the original consent was collected by the client (format: YYYY-MM-DD) Format: date. |
| `consentDescription` | `string` | Yes | The client describes the type of consent (electronic/paper), use case and reference to the version of Terms and Conditions (T&Cs), if applicable |
| `consentStatus` | `'optedIn' \| 'optedOut' \| 'notCollected' \| 'unknown'` | No |  |
| `consentTransactionId` | `string` | Yes | Unique id of the consent collected by the client |
| `deviceIp` | `string` | No | IP of mobile device. Can be IPv4 or IPv6 |
| `requestId` | `string` | No | Optional requestId that can be used to track the requests through the entire Mobile Auth flow. If not sent, it will be generated automatically |

### InitiateMobileAuthResponse

Response for `POST /services/mobileAuth`: Initiate Mobile Auth.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `redirectTargetUrl` | `string \| null` | No |  |
| `requestId` | `string \| null` | No |  |

### RetrieveIdentityInformationRequest

Request for `POST /services/identity`: Initiate Identity Pre-Fill.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `consentStatus` | `'optedIn' \| 'optedOut' \| 'notCollected' \| 'unknown'` | No |  |
| `dob` | `string` | No |  |
| `last4` | `string` | No | Last 4 digits of the Social Security Number (SSN) |
| `phoneNumber` | `string` | Yes | 10-digit phone number |
| `requestId` | `string` | No |  |

### RetrieveIdentityInformationResponse

Response for `POST /services/identity`: Initiate Identity Pre-Fill.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalInfo` | `string \| null` | No |  |
| `description` | `string \| null` | No |  |
| `requestId` | `string \| null` | No |  |
| `response` | `object \| null` | No |  |
| `response.carrier` | `string \| null` | No |  |
| `response.countryCode` | `string \| null` | No |  |
| `response.individual` | `object \| null` | No |  |
| `response.individual.addresses` | `object[] \| null` | No |  |
| `response.individual.addresses[].address` | `string \| null` | No |  |
| `response.individual.addresses[].city` | `string \| null` | No |  |
| `response.individual.addresses[].extendedAddress` | `string \| null` | No |  |
| `response.individual.addresses[].postalCode` | `string \| null` | No |  |
| `response.individual.addresses[].region` | `string \| null` | No |  |
| `response.individual.dob` | `string \| null` | No |  |
| `response.individual.emailAddresses` | `string[] \| null` | No |  |
| `response.individual.firstName` | `string \| null` | No |  |
| `response.individual.lastName` | `string \| null` | No |  |
| `response.individual.ssn` | `string \| null` | No | An SSN token issued through the vault provider, not the number itself. |
| `response.lineType` | `string \| null` | No |  |
| `response.phoneNumber` | `string \| null` | No |  |
| `response.reasonCodes` | `string[] \| null` | No |  |
| `response.transactionId` | `string \| null` | No |  |
| `status` | `number \| null` | No |  |

### VerifyIdentityRequest

Request for `POST /services/verify`: Initiate Verify.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | `string` | No | Line 1 of customer home address |
| `city` | `string` | No | City of customer home address |
| `consentStatus` | `string` | No | enum of optedIn, optedOut, notCollected, unknown |
| `dob` | `string` | No | Date of birth of customer in format YYYY-MM-DD |
| `driversLicenseNumber` | `string` | No |  |
| `driversLicenseState` | `string` | No |  |
| `emailAddress` | `string` | No |  |
| `extendedAddress` | `string` | No | Line 2 of customer home address |
| `firstName` | `string` | No | First name of customer |
| `last4` | `string` | No |  |
| `lastName` | `string` | No | Last name of customer |
| `phoneNumber` | `string` | Yes | 10-digit phone number |
| `postalCode` | `string` | No | Postal code of customer home address |
| `region` | `string` | No | State of customer home address |
| `requestId` | `string` | No |  |

### VerifyIdentityResponse

Response for `POST /services/verify`: Initiate Verify.

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalInfo` | `string \| null` | No |  |
| `description` | `string \| null` | No |  |
| `requestId` | `string \| null` | No |  |
| `response` | `object \| null` | No |  |
| `response.address` | `object \| null` | No |  |
| `response.address.addressScore` | `number \| null` | No |  |
| `response.address.city` | `boolean \| null` | No |  |
| `response.address.distance` | `number \| null` | No |  |
| `response.address.postalCode` | `boolean \| null` | No |  |
| `response.address.region` | `boolean \| null` | No |  |
| `response.address.street` | `boolean \| null` | No |  |
| `response.address.streetNumber` | `number \| null` | No |  |
| `response.carrier` | `string \| null` | No |  |
| `response.countryCode` | `string \| null` | No |  |
| `response.identifiers` | `object \| null` | No |  |
| `response.identifiers.dob` | `boolean \| null` | No |  |
| `response.identifiers.driversLicenseNumber` | `boolean \| null` | No |  |
| `response.identifiers.driversLicenseState` | `boolean \| null` | No |  |
| `response.identifiers.last4` | `boolean \| null` | No |  |
| `response.identifiers.ssn` | `boolean \| null` | No |  |
| `response.knowYourCustomer` | `object \| null` | No |  |
| `response.knowYourCustomer.amlTypeLists` | `object[] \| null` | No |  |
| `response.knowYourCustomer.amlTypeLists[].amlType` | `string \| null` | No |  |
| `response.knowYourCustomer.amlTypeLists[].fields` | `({ name?: ... \| ... \| ...; source?: ... \| ... \| ...; value?: ... \| ... \| ... })[] \| null` | No |  |
| `response.knowYourCustomer.amlTypeLists[].listHits` | `number \| null` | No |  |
| `response.knowYourCustomer.totalHits` | `number \| null` | No |  |
| `response.lineType` | `string \| null` | No |  |
| `response.matchDataType` | `string \| null` | No |  |
| `response.name` | `object \| null` | No |  |
| `response.name.firstName` | `number \| null` | No |  |
| `response.name.lastName` | `number \| null` | No |  |
| `response.name.nameScore` | `number \| null` | No |  |
| `response.payfoneAlias` | `string \| null` | No |  |
| `response.phoneNumber` | `string \| null` | No |  |
| `response.reasonCodes` | `string[] \| null` | No |  |
| `response.transactionId` | `string \| null` | No |  |
| `response.verified` | `boolean \| null` | No |  |
| `status` | `number \| null` | No |  |

### Address

The customer's home address.

```typescript
type Address = CustomerOnboardingRequest['address'];
```

### AddressInfo

One of the person's addresses.

```typescript
type AddressInfo = NonNullable<Individual['addresses']>[number];
```

### AmlFields

One matched field of an anti-money-laundering list hit.

```typescript
type AmlFields = NonNullable<AmlType['fields']>[number];
```

### AmlType

Hits on one anti-money-laundering list.

```typescript
type AmlType = NonNullable<KnowYourCustomer['amlTypeLists']>[number];
```

### FullName

The customer's full legal name.

```typescript
type FullName = CustomerOnboardingRequest['fullName'];
```

### Identifiers

Which submitted identifiers matched.

```typescript
type Identifiers = NonNullable<IdentityVerificationResult['identifiers']>;
```

### IdentityInformation

The identity details in a `RetrieveIdentityInformationResponse`.

```typescript
type IdentityInformation = NonNullable<RetrieveIdentityInformationResponse['response']>;
```

### IdentityVerificationResult

The verification result in a `VerifyIdentityResponse`.

```typescript
type IdentityVerificationResult = NonNullable<VerifyIdentityResponse['response']>;
```

### Individual

The person the phone number belongs to.

```typescript
type Individual = NonNullable<IdentityInformation['individual']>;
```

### KnowYourCustomer

Anti-money-laundering list results.

```typescript
type KnowYourCustomer = NonNullable<IdentityVerificationResult['knowYourCustomer']>;
```

### Name

How well the submitted name matched.

```typescript
type Name = NonNullable<IdentityVerificationResult['name']>;
```

### Nullable

A type that represents a nullable version of the given type.

```typescript
type Nullable<T> = { [P in keyof T]: T[P] | null };
```

### PhoneNumber

The customer's phone number, split into country code and number.

```typescript
type PhoneNumber = CustomerOnboardingRequest['phoneNumber'];
```

### VerifiedAddress

How well the submitted address matched.

```typescript
type VerifiedAddress = NonNullable<IdentityVerificationResult['address']>;
```

### Other names

Names the package also exports for the types above. The 1.x names remain as aliases of the generated ones.

| Name | Same as |
| --- | --- |
| `CreateInstantLinkBodyParams` | `CreateInstantLinkRequest` |
| `CustomerOnboardingBodyParams` | `CustomerOnboardingRequest` |
| `InitiateMobileAuthBodyParams` | `InitiateMobileAuthRequest` |
| `RetrieveIdentityInformationBodyParams` | `RetrieveIdentityInformationRequest` |
| `VerificationBodyParams` | `FinalizeMobileAuthRequest` |
| `VerifyIdentityBodyParams` | `VerifyIdentityRequest` |

## Errors

Every method rejects with an `APIError` when a call fails. Check for it with `isAPIError`, which works across packages, rather than `instanceof`. [Errors in the overview](https://platformdocs.coinme.com/docs/caas-api-clients.md#errors) explains the error shape.

| Export | What it is |
| --- | --- |
| `APIError` | Custom error class for handling API responses. Extends the native Error class to include structured error response details. |
| `isAPIError` | Tells whether an error was thrown by a CaaS API client. Prefer this to `instanceof APIError` when an application uses more than one client package: each package carries its own copy of the class. |
| `CAASErrorData` | Represents detailed information about an individual error in a CAAS error response. |
| `CAASErrorResponse` | Represents the structure of a CAAS error response, including HTTP status, timestamp, path, and an array of individual error data. |
| `GenericErrorResponse` | Represents the structure of a generic error response, used when handling non-CAAS errors like client or server errors (4xx or 5xx). |

### CAASErrorResponse

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `caasError` | `boolean` | Yes | True when the response body carried the CaaS error envelope (`errorResponse.errorData`), whatever the HTTP status; `errorData` then holds the server's own error codes. False for network failures and other error bodies, which are reported as one `GENERIC_ERROR`. |
| `errorData` | `CAASErrorData<U, V>[]` | Yes | Array of detailed error information objects, each representing an individual error. For non-CAAS errors, this array may contain generic error data. |
| `httpStatus` | `string` | Yes | HTTP status code as a string, indicating the type of error response. |
| `path` | `string` | Yes | API path where the error occurred, useful for tracing the origin of the error. |
| `timestamp` | `string` | Yes | Timestamp when the error occurred, in ISO 8601 format. |

### CAASErrorData

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `errorCode` | `U` | Yes | Unique code identifying the specific error that occurred. |
| `message` | `string` | Yes | Descriptive message explaining the nature of the error. |
| `metadata` | `V` | No | Optional metadata providing additional context for the error. |

```typescript
import { isAPIError } from '@coinme/prove-onboarding-api-client';

try {
  // a call on the client
} catch (error) {
  if (isAPIError(error)) {
    console.error(error.errorResponse.httpStatus, error.errorResponse.errorData);
  }
  throw error;
}
```
