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

# Create CoworkerIdentityCheckDocument

> Create a new CoworkerIdentityCheckDocument record.

A **CoworkerIdentityCheckDocument** represents a document submitted as part of a `CoworkerIdentityCheck` for a customer. Each document record can hold up to three files, corresponding to different sides or aspects of the verification evidence:

| File slot  | Field prefix         | Purpose                                               |
| ---------- | -------------------- | ----------------------------------------------------- |
| Face photo | `Photo`              | A photograph of the customer's face                   |
| Front      | `Document`           | The front side of the identity or address document    |
| Back       | `AdditionalDocument` | The back side or a supplementary page of the document |

Which slots are required depends on the `VerificationType` and document type configured on the parent `CoworkerIdentityCheck`.

The `VerificationStatus` tracks the review state of this individual document through the same lifecycle used by `CoworkerIdentityCheck`: `Pending` → `Submitted` → `Successful` or `Failed` (or `Cancelled`).

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`CoworkerIdentityCheckDocument-Create`** role.
</Note>

## Enums

<Accordion title="eIdVerificationStatus — VerificationStatus values">
  | Value | Name       |
  | ----- | ---------- |
  | 0     | None       |
  | 1     | Pending    |
  | 2     | Submitted  |
  | 3     | Successful |
  | 4     | Failed     |
  | 5     | Cancelled  |
</Accordion>

## Request Body

### Required Fields

<ParamField body="CoworkerId" type="integer" required>
  Coworker Id.
</ParamField>

<ParamField body="CoworkerIdentityCheckId" type="integer" required>
  Coworker Identity Check Id.
</ParamField>

<ParamField body="Name" type="string" required>
  Display name for this document record.
</ParamField>

### Optional Fields

<ParamField body="NewPhotoUrl" type="string">
  New Photo Url.
</ParamField>

<ParamField body="ClearPhotoFile" type="boolean">
  Clear Photo File.
</ParamField>

<ParamField body="NewDocumentUrl" type="string">
  New Document Url.
</ParamField>

<ParamField body="ClearDocumentFile" type="boolean">
  Clear Document File.
</ParamField>

<ParamField body="NewAdditionalDocumentUrl" type="string">
  New Additional Document Url.
</ParamField>

<ParamField body="ClearAdditionalDocumentFile" type="boolean">
  Clear Additional Document File.
</ParamField>

<ParamField body="Notes" type="string">
  Free-text notes or reviewer comments about this document.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST \
    "https://spaces.nexudus.com/api/spaces/coworkeridentitycheckdocuments" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "CoworkerId": 0,
      "CoworkerIdentityCheckId": 0,
      "Name": ""
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/spaces/coworkeridentitycheckdocuments',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        CoworkerId: 0,
        CoworkerIdentityCheckId: 0,
        Name: ''
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://spaces.nexudus.com/api/spaces/coworkeridentitycheckdocuments',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'CoworkerId': 0,
          'CoworkerIdentityCheckId': 0,
          'Name': ''
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Status" type="integer">
  HTTP status code. `200` on success.
</ResponseField>

<ResponseField name="Message" type="string">
  A human-readable message confirming the creation.
</ResponseField>

<ResponseField name="Value" type="object">
  Contains the `Id` of the newly created record.
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `true` if the coworkeridentitycheckdocument was created successfully.
</ResponseField>

<ResponseField name="Errors" type="array">
  `null` on success.
</ResponseField>

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "CoworkerIdentityCheckDocument was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}
```

### 400

<ResponseField name="Message" type="string">
  A summary of the validation error(s), in the format `PropertyName: error message`.
</ResponseField>

<ResponseField name="Value" type="any">
  `null` on validation failure.
</ResponseField>

<ResponseField name="Errors" type="object[]">
  Array of validation errors.

  <Expandable>
    <ResponseField name="AttemptedValue" type="any">
      The value that was submitted for the field, or `null` if missing.
    </ResponseField>

    <ResponseField name="Message" type="string">
      The validation error message.
    </ResponseField>

    <ResponseField name="PropertyName" type="string">
      The name of the property that failed validation.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `false` when the request fails validation.
</ResponseField>

```json Example Response theme={null}
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}
```
