> For the complete documentation index, see [llms.txt](https://docs.fonbnk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fonbnk.com/server-to-server/api-endpoints/submit-user-kyc.md).

# Submit user KYC

## <mark style="color:$warning;">\[POST]</mark> /api/v2/user/kyc

Submits KYC documents for a user.

Request body type:

```typescript
type RequestBody = {
  userEmail: string;
  documentId: string;
  userFields: Record<string, any>;
}
```

Request body example (basic KYC):

```json
{
    "userEmail": "testuser_ng@fonbnk.com",
    "documentId": "67da909b739fc481aa525c43",
    "userFields": {
        "first_name": "John",
        "last_name": "Doe",
        "dob": "1990-01-01",
        "id_number": "A123456789"
    }
}
```

For advanced kyc, an array of images must be provided. Each image object should contain an <mark style="color:$danger;">"image\_type\_id"</mark> field where  with one of these values:

* 0 - the type of an image is "selfie"
* 1 - the type of an image is "front side of the document"
* 2 - the type of an image is "back side of the document".

The <mark style="color:$danger;">"image"</mark> field should contain either a public URL to an image or a base64  string of an encoded image.

Request body example (advanced KYC):

```json
{
  "userEmail": "testuser_ng@fonbnk.com",
  "countryIsoCode": "NG",
  "documentId": "67da93c0dfd3a00f3380b857",
  "userFields": {
    "first_name": "John",
    "last_name": "Doe",
    "dob": "1990-01-01",
    "images": [
      { "image_type_id": 0, "image": "https://cdn.com/selfie.jpg" },
      { "image_type_id": 1, "image": "https://cdn.com/front.jpg" },
      { "image_type_id": 5, "image": "https://cdn.com/back.jpg" }
    ]
  }
}
```

Response is the same as ge


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.fonbnk.com/server-to-server/api-endpoints/submit-user-kyc.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.
