---
title: "Sign the advisor agreement"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign the advisor agreement

Path: Nicer API › identity

`POST /identity/agreement/sign`

URL: `https://api.nicer.travel/identity/agreement/sign`

Signs the agency's published agreement for the calling advisor: stores their signature (their name as they typed it), their IP address and the signed PDF. An agreement is signed once. Answers the signature without the IP address or where the PDF is stored. Advisors and admins of the agency the request acts for sign for themselves. Errors: 400 ERROR_ITEM_NOT_FOUND for an agreement the agency does not have, 400 AGREEMENT_NOT_PUBLISHED for a version that is not the published one, 400 AGREEMENT_ALREADY_ACCEPTED when the caller signed it already.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Request body

_Required._

- `agreementId` (`identity.agreement.sign.agreementId`; string, required)
- `signature` (`identity.agreement.sign.signature`; string, required)

## Example request

```json
{
  "agreementId": "string",
  "signature": "string"
}
```

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.identity.agreement.sign({
  "agreementId": "string",
  "signature": "string"
});
```

### Nicer CLI

```bash
nicer identity agreement sign --input - <<'JSON'
{
  "agreementId": "string",
  "signature": "string"
}
JSON
```

### cURL

```bash
curl --request POST \
  --url https://api.nicer.travel/identity/agreement/sign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agreementId": "string",
  "signature": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/identity/agreement/sign';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({agreementId: 'string', signature: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/identity/agreement/sign"

payload = {
    "agreementId": "string",
    "signature": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "acceptedAt": "string",
  "companyName": "string",
  "metadata": {
    "property1": null,
    "property2": null
  },
  "signature": "string",
  "status": "accepted",
  "versionNumber": 0,
  "agreementId": "string",
  "userId": "string",
  "createdAt": "string",
  "type": "AgreementAcceptance",
  "updatedAt": "string"
}
```

- `acceptedAt` (`identity.agreement.sign.response.200.acceptedAt`; string, required)
- `companyName` (`identity.agreement.sign.response.200.companyName`; string, required)
- `signature` (`identity.agreement.sign.response.200.signature`; string, required)
- `status` (`identity.agreement.sign.response.200.status`; string, required)
  - one of `"accepted"`, `"updateRequired"`
- `versionNumber` (`identity.agreement.sign.response.200.versionNumber`; number, required)
- `agreementId` (`identity.agreement.sign.response.200.agreementId`; string, required)
- `userId` (`identity.agreement.sign.response.200.userId`; string, required)
- `createdAt` (`identity.agreement.sign.response.200.createdAt`; string, required)
- `type` (`identity.agreement.sign.response.200.type`; string, required)
- `updatedAt` (`identity.agreement.sign.response.200.updatedAt`; string, required)
- `metadata` (`identity.agreement.sign.response.200.metadata`; map of unknown, optional)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.agreement.sign.response.400.errorCode`; string, required)
- `errorMessage` (`identity.agreement.sign.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.agreement.sign.response.401.errorCode`; string, required)
- `errorMessage` (`identity.agreement.sign.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.agreement.sign.response.403.errorCode`; string, required)
- `errorMessage` (`identity.agreement.sign.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/identity/identity.agreement.sign/index.md
