---
title: "Add a document to review and sign"
url: "https://developer.incode.com/api-reference/document-signature-documents-post/"
section: "api-reference"
group: "Electronic signature"
version: "v1.1"
status: "live"
endpoint: "POST /omni/document-signature/documents"
---
# Add a document to review and sign

`POST /omni/document-signature/documents`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Adds one document to the session's Document Signature module. Documents are shown in the order they are added. Limits: PDF or MARKDOWN, at most 10 documents per session, at most 10 MB each. Rejected once the session's documents are signed. Requires an executive or admin token of the session's organization and the interviewId parameter.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `interviewId` | query | string |  |  |
| `api-version` | header | string | yes | Default: `1.0` |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string |  | Name shown to the user and printed on the signature page |
| `format` | string | yes | PDF or MARKDOWN Enum: `PDF`, `MARKDOWN` |
| `content` | string |  | Base64 of the PDF bytes for PDF, the markdown text itself for MARKDOWN. Max 10 MB decoded. |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `documentId` | string |  |  |
| `order` | integer (int32) |  | 1-based position in which the documents are shown |
| `name` | string |  |  |
| `format` | string |  | Enum: `PDF`, `MARKDOWN` |
| `sha256` | string |  | Lowercase hex SHA-256 of the original bytes, also printed on the signature page |
| `sizeBytes` | integer (int64) |  |  |
| `signedAt` | integer (int64) |  | Epoch millis of the signature, null until signed |
| `signatureId` | string |  | Shared by every document signed in the same call |
| `content` | string |  | Markdown text, only for MARKDOWN documents |
| `url` | string |  | Presigned URL of the original, valid one hour |
| `signedUrl` | string |  | Presigned URL of the signed PDF: original plus signature page for PDF, the signature page alone for MARKDOWN. Null until signed. |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/omni/document-signature/documents?interviewId=%3CinterviewId%3E \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "X-Incode-Hardware-Id: <YOUR_INCODE_HARDWARE_ID>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "<format>"
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/document-signature/documents?interviewId=%3CinterviewId%3E", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "X-Incode-Hardware-Id": "<YOUR_INCODE_HARDWARE_ID>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "format": "<format>"
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "X-Incode-Hardware-Id": "<YOUR_INCODE_HARDWARE_ID>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/document-signature/documents?interviewId=%3CinterviewId%3E", headers=headers, json={
  "format": "<format>"
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/document-signature/documents?interviewId=%3CinterviewId%3E"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("X-Incode-Hardware-Id", "<YOUR_INCODE_HARDWARE_ID>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"format\": \"<format>\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```
require "net/http"
require "json"

uri = URI("https://demo-api.incodesmile.com/omni/document-signature/documents?interviewId=%3CinterviewId%3E")
req = Net::HTTP::Post.new(uri)
req["x-api-key"] = "<YOUR_API_KEY>"
req["X-Incode-Hardware-Id"] = "<YOUR_INCODE_HARDWARE_ID>"
req["api-version"] = "1.0"
req["Content-Type"] = "application/json"
req.body = '{
  "format": "<format>"
}'

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
```

### PHP

```
$ch = curl_init("https://demo-api.incodesmile.com/omni/document-signature/documents?interviewId=%3CinterviewId%3E");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "x-api-key: <YOUR_API_KEY>",
    "X-Incode-Hardware-Id: <YOUR_INCODE_HARDWARE_ID>",
    "api-version: 1.0",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
  "format": "<format>"
}');

$data = json_decode(curl_exec($ch), true);
curl_close($ch);
```

### Example response

```json
{
  "documentId": "string",
  "order": 0,
  "name": "string",
  "format": "PDF",
  "sha256": "string",
  "sizeBytes": 0,
  "signedAt": 0,
  "signatureId": "string",
  "content": "string",
  "url": "string",
  "signedUrl": "string"
}
```
