---
title: "Attach signature to pdf document"
url: "https://developer.incode.com/api-reference/attach-signature-to-pdf/"
section: "api-reference"
group: "Onboarding"
version: "v1.1"
status: "live"
endpoint: "POST /omni/attach-signature-to-pdf"
---
# Attach signature to pdf document

`POST /omni/attach-signature-to-pdf`

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

Attach signature from interview to supplied pdf at (x, y) coordinates with desired height to desired page on pdf.
Coordinates are relative to left bottom corner of page.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x` | query | integer (int32) | yes | The x axis where to place the signature image (from the left bottom corner of page) |
| `y` | query | integer (int32) | yes | The y axis where to place the signature image (from the left bottom corner of page) |
| `height` | query | integer (int32) | yes | Height of the image when placed in the pdf, keeps aspect ratio. |
| `pageNumber` | query | integer (int32) |  | number of page on which to put the signature image (pages numbering start from 1, default value is 1) |
| `api-version` | header | string | yes |  |

## Responses

### 200

Stream of new pdf document file

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

## 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/attach-signature-to-pdf \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/attach-signature-to-pdf", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({}),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/attach-signature-to-pdf", headers=headers, json={})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/attach-signature-to-pdf"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
