# KycStatus

## Members

### `api :` [`KycApi`](/reference/identity-javascript-sdk/the-base-package/kyc/kycapi.md)

The `KycApi` instance that this object was created with.

### `status :` [`KycStatusResponse`](/reference/identity-javascript-sdk/the-base-package/kyc/kycapi.md#kycstatusresponse)

An object that implements the `KycStatusResponse` interface.

## Methods

### `constructor(api, status)`

Create a new instance of the `KycStatus` object.

* `api` must be an instance of [`KycApi`](/reference/identity-javascript-sdk/the-base-package/kyc/kycapi.md);
* `status` must be an object that implements the [`KycStatusResponse`](/reference/identity-javascript-sdk/the-base-package/kyc/kycapi.md#kycstatusresponse) interface;

{% hint style="warning" %}
This constructor should not be called directly, use [`KycInstance.status()`](/reference/identity-javascript-sdk/the-base-package/kyc/kycinstance.md#async-status)instead.
{% endhint %}

### `id()`

Get the id of the request.

This function returns a `string`.

```javascript
const id = kycStatus.id()
```

### `isComplete()`

Is the KYC verification complete?

This function returns a `boolean`.

```javascript
if (kycStatus.isComplete()) {
    // do something
}
```

### `isSuccessful()`

Was the KYC verification successful?

This function returns a `boolean`.

```javascript
if (kycStatus.isSuccessful()) {
    // do something
}
```

### `distance()`

Get the machine learning algorithm distance.

This function returns a `number` between `0` and `1`.

```javascript
if (kycStatus.distance() > 0.9) {
    // the user sent something worse than random noise
}
```

### `createdAt()`

When was the KYC verification requested?

This function returns a `Date` object.

```javascript
const createdDate = kycStatus.createdAt()
```

### `completedAt()`

When was the KYC verification completed?

This function returns a `Date` object.

```javascript
const completedDate = kycStatus.completedAt()
```

### `webhook()`

Get the webhook URL that got / will get called when the request is complete.

This function returns an `URL` object.

```javascript
const webhookUrl = kycStatus.webhook()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/kyc/kycstatus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
