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

# Sign the document

> [!WARNING]
>
> You are viewing the documentation of release 26.1, which is no longer the current one. [Go to the documentation of the current release 26.2](https://developers.circularo.com/).

## Requirements

* Authentication token
* Document ID
* Document version

## How to

### 1. Seal the document

This endpoint allows you to put a seal on a document, which means to apply an **invisible electronic certificate** that ensures the integrity and authenticity of the document.

[https://help.circularo.com/en/help-center/latest/context-menu](https://help.circularo.com/en/help-center/latest/context-menu)

```http theme={null}
PUT /documents/seal/:version?token=:authenticationToken
```

* Document version - if the document has just been created the version will be "1".
* To find document version you can call below request and the version will be included in response

```http theme={null}
GET /documents/:id
```

#### Example

Request

```http theme={null}
PUT /documents/seal/3?token=ADFFQBYXP2NVGR6PAP3KOR27FETP6
{
    "id": "d148b19a-4fa9-442e-adfd-7aa68b8eb766"
}
```

Response

* No response, only status 200.

### 2. Sign the document

This API call is used to sign a given document.

```http theme={null}
PUT /documents/sign/:version?token=:authenticationToken
```

* Document version - To find document version you can call below request and the version will be included in response

```http theme={null}
GET /documents/:id
```

* You also need your signature image (blob). It can be found in object that is returned when [logging](https://developers.circularo.com/26.1/scenarios/1-authentication-and-security/1-user-logins-session-tokens/1-authentication-with-username-and-password.md) into the application

```http theme={null}
POST /login
```

#### Example

Request

```http theme={null}
PUT /documents/sign/3?token=ADFFQBYXP2NVGR6PAP3KOR27FETP6
{
	"signatures": [{
		"pages": [1], //specify on which page should the signature be placed
		"position": { //position and size of the signature in the document page
			"percentX": 0.5336425978217023,
			"percentY": 0.2360980475986889,
			"percentWidth": 0.3910665378654381,
			"percentHeight": 0.1
		},
		"blob": "8p52gkutoyc9ty6ecvu6i8p61it0dd287ta2a1ftdglb28hekqqkp1mzg53ypwvp", // signature image
		"decorationType": "empty",
		"type": "signature", // other possible types: initials, stamp, wacom, annotation, and image
		"timestamp": false //if true places timestamp under the signature
	}],
	"id": "eb8cd65b-fd15-4a01-a1d1-b94c177d23a8" //id of the document you want to sign
}
```

Response

* No response, only status 200.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.