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

# Sdk reference

A list of all methods in the `SignplusService` service. Click on the method name to view detailed information about that method.

| Methods                                                                   | Description                                                     |
| :------------------------------------------------------------------------ | :-------------------------------------------------------------- |
| [createEnvelope](#createenvelope)                                         | Create new envelope                                             |
| [createEnvelopeFromTemplate](#createenvelopefromtemplate)                 | Create new envelope from template                               |
| [listEnvelopes](#listenvelopes)                                           | List envelopes                                                  |
| [getEnvelope](#getenvelope)                                               | Get envelope                                                    |
| [deleteEnvelope](#deleteenvelope)                                         | Delete envelope                                                 |
| [downloadEnvelopeSignedDocuments](#downloadenvelopesigneddocuments)       | Download signed documents for an envelope                       |
| [downloadEnvelopeCertificate](#downloadenvelopecertificate)               | Download certificate of completion for an envelope              |
| [getEnvelopeDocument](#getenvelopedocument)                               | Get envelope document                                           |
| [getEnvelopeDocuments](#getenvelopedocuments)                             | Get envelope documents                                          |
| [addEnvelopeDocument](#addenvelopedocument)                               | Add envelope document                                           |
| [setEnvelopeDynamicFields](#setenvelopedynamicfields)                     | Set envelope dynamic fields                                     |
| [addEnvelopeSigningSteps](#addenvelopesigningsteps)                       | Add envelope signing steps                                      |
| [setEnvelopeAttachmentsSettings](#setenvelopeattachmentssettings)         | Set envelope attachment settings                                |
| [setEnvelopeAttachmentsPlaceholders](#setenvelopeattachmentsplaceholders) | Placeholders to be set, completely replacing the existing ones. |
| [getAttachmentFile](#getattachmentfile)                                   | Get envelope attachment file                                    |
| [sendEnvelope](#sendenvelope)                                             | Send envelope for signature                                     |
| [duplicateEnvelope](#duplicateenvelope)                                   | Duplicate envelope                                              |
| [voidEnvelope](#voidenvelope)                                             | Void envelope                                                   |
| [renameEnvelope](#renameenvelope)                                         | Rename envelope                                                 |
| [setEnvelopeComment](#setenvelopecomment)                                 | Set envelope comment                                            |
| [setEnvelopeNotification](#setenvelopenotification)                       | Set envelope notification                                       |
| [setEnvelopeExpirationDate](#setenvelopeexpirationdate)                   | Set envelope expiration date                                    |
| [setEnvelopeLegalityLevel](#setenvelopelegalitylevel)                     | Set envelope legality level                                     |
| [getEnvelopeAnnotations](#getenvelopeannotations)                         | Get envelope annotations                                        |
| [getEnvelopeDocumentAnnotations](#getenvelopedocumentannotations)         | Get envelope document annotations                               |
| [addEnvelopeAnnotation](#addenvelopeannotation)                           | Add envelope annotation                                         |
| [deleteEnvelopeAnnotation](#deleteenvelopeannotation)                     | Delete envelope annotation                                      |
| [createTemplate](#createtemplate)                                         | Create new template                                             |
| [listTemplates](#listtemplates)                                           | List templates                                                  |
| [getTemplate](#gettemplate)                                               | Get template                                                    |
| [deleteTemplate](#deletetemplate)                                         | Delete template                                                 |
| [duplicateTemplate](#duplicatetemplate)                                   | Duplicate template                                              |
| [addTemplateDocument](#addtemplatedocument)                               | Add template document                                           |
| [getTemplateDocument](#gettemplatedocument)                               | Get template document                                           |
| [getTemplateDocuments](#gettemplatedocuments)                             | Get template documents                                          |
| [addTemplateSigningSteps](#addtemplatesigningsteps)                       | Add template signing steps                                      |
| [renameTemplate](#renametemplate)                                         | Rename template                                                 |
| [setTemplateComment](#settemplatecomment)                                 | Set template comment                                            |
| [setTemplateNotification](#settemplatenotification)                       | Set template notification                                       |
| [getTemplateAnnotations](#gettemplateannotations)                         | Get template annotations                                        |
| [getDocumentTemplateAnnotations](#getdocumenttemplateannotations)         | Get document template annotations                               |
| [addTemplateAnnotation](#addtemplateannotation)                           | Add template annotation                                         |
| [deleteTemplateAnnotation](#deletetemplateannotation)                     | Delete template annotation                                      |
| [setTemplateAttachmentsSettings](#settemplateattachmentssettings)         | Set template attachment settings                                |
| [setTemplateAttachmentsPlaceholders](#settemplateattachmentsplaceholders) | Placeholders to be set, completely replacing the existing ones. |
| [createWebhook](#createwebhook)                                           | Create webhook                                                  |
| [listWebhooks](#listwebhooks)                                             | List webhooks                                                   |
| [deleteWebhook](#deletewebhook)                                           | Delete webhook                                                  |

## createEnvelope

Create new envelope

* HTTP Method: `POST`
* Endpoint: `/envelope`

**Parameters**

| Name | Type                                                                           | Required | Description       |
| :--- | :----------------------------------------------------------------------------- | :------- | :---------------- |
| body | [CreateEnvelopeRequest](/api-reference/endpoints/signplus/create-new-envelope) | ✅        | The request body. |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { CreateEnvelopeRequest, EnvelopeLegalityLevel, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const envelopeLegalityLevel = EnvelopeLegalityLevel.SES;

  const createEnvelopeRequest: CreateEnvelopeRequest = {
    name: 'name',
    legalityLevel: envelopeLegalityLevel,
    expiresAt: 8,
    comment: 'comment',
    sandbox: true,
  };

  const { data } = await signplus.signplus.createEnvelope(createEnvelopeRequest);

  console.log(data);
})();
```

## createEnvelopeFromTemplate

Create new envelope from template

* HTTP Method: `POST`
* Endpoint: `/envelope/from_template/{template_id}`

**Parameters**

| Name       | Type                                                                                                     | Required | Description       |
| :--------- | :------------------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [CreateEnvelopeFromTemplateRequest](/api-reference/endpoints/signplus/create-new-envelope-from-template) | ✅        | The request body. |
| templateId | string                                                                                                   | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { CreateEnvelopeFromTemplateRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const createEnvelopeFromTemplateRequest: CreateEnvelopeFromTemplateRequest = {
    name: 'name',
    comment: 'comment',
    sandbox: true,
  };

  const { data } = await signplus.signplus.createEnvelopeFromTemplate('template_id', createEnvelopeFromTemplateRequest);

  console.log(data);
})();
```

## listEnvelopes

List envelopes

* HTTP Method: `POST`
* Endpoint: `/envelopes`

**Parameters**

| Name | Type                                                                     | Required | Description       |
| :--- | :----------------------------------------------------------------------- | :------- | :---------------- |
| body | [ListEnvelopesRequest](/api-reference/endpoints/signplus/list-envelopes) | ❌        | The request body. |

**Return Type**

`ListEnvelopesResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { EnvelopeOrderField, EnvelopeStatus, ListEnvelopesRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const envelopeStatus = EnvelopeStatus.DRAFT;

  const envelopeOrderField = EnvelopeOrderField.CREATION_DATE;

  const listEnvelopesRequest: ListEnvelopesRequest = {
    name: 'name',
    tags: ['tags'],
    comment: 'comment',
    ids: ['ids'],
    statuses: [envelopeStatus],
    folderIds: ['folder_ids'],
    onlyRootFolder: true,
    dateFrom: 5,
    dateTo: 9,
    uid: 'uid',
    first: 9,
    last: 7,
    after: 'after',
    before: 'before',
    orderField: envelopeOrderField,
    ascending: true,
    includeTrash: true,
  };

  const { data } = await signplus.signplus.listEnvelopes(listEnvelopesRequest);

  console.log(data);
})();
```

## getEnvelope

Get envelope

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getEnvelope('envelope_id');

  console.log(data);
})();
```

## deleteEnvelope

Delete envelope

* HTTP Method: `DELETE`
* Endpoint: `/envelope/{envelope_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.deleteEnvelope('envelope_id');

  console.log(data);
})();
```

## downloadEnvelopeSignedDocuments

Download signed documents for an envelope

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/signed_documents`

**Parameters**

| Name                    | Type    | Required | Description                                                             |
| :---------------------- | :------ | :------- | :---------------------------------------------------------------------- |
| envelopeId              | string  | ✅        | ID of the envelope                                                      |
| certificateOfCompletion | boolean | ❌        | Whether to include the certificate of completion in the downloaded file |

**Return Type**

`ArrayBuffer`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.downloadEnvelopeSignedDocuments('envelope_id', {
    certificateOfCompletion: true,
  });

  console.log(data);
})();
```

## downloadEnvelopeCertificate

Download certificate of completion for an envelope

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/certificate`

**Parameters**

| Name       | Type   | Required | Description        |
| :--------- | :----- | :------- | :----------------- |
| envelopeId | string | ✅        | ID of the envelope |

**Return Type**

`ArrayBuffer`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.downloadEnvelopeCertificate('envelope_id');

  console.log(data);
})();
```

## getEnvelopeDocument

Get envelope document

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/document/{document_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |
| documentId | string | ✅        |             |

**Return Type**

`Document`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getEnvelopeDocument('envelope_id', 'document_id');

  console.log(data);
})();
```

## getEnvelopeDocuments

Get envelope documents

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/documents`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |

**Return Type**

`ListEnvelopeDocumentsResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getEnvelopeDocuments('envelope_id');

  console.log(data);
})();
```

## addEnvelopeDocument

Add envelope document

* HTTP Method: `POST`
* Endpoint: `/envelope/{envelope_id}/document`

**Parameters**

| Name       | Type                                                                                  | Required | Description       |
| :--------- | :------------------------------------------------------------------------------------ | :------- | :---------------- |
| body       | [AddEnvelopeDocumentRequest](/api-reference/endpoints/signplus/add-envelope-document) | ✅        | The request body. |
| envelopeId | string                                                                                | ✅        |                   |

**Return Type**

`Document`

**Example Usage Code Snippet**

```typescript theme={null}
import { AddEnvelopeDocumentRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const addEnvelopeDocumentRequest: AddEnvelopeDocumentRequest = {
    file: new ArrayBuffer(0),
  };

  const { data } = await signplus.signplus.addEnvelopeDocument('envelope_id', addEnvelopeDocumentRequest);

  console.log(data);
})();
```

## setEnvelopeDynamicFields

Set envelope dynamic fields

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/dynamic_fields`

**Parameters**

| Name       | Type                                                                                             | Required | Description       |
| :--------- | :----------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetEnvelopeDynamicFieldsRequest](/api-reference/endpoints/signplus/set-envelope-dynamic-fields) | ✅        | The request body. |
| envelopeId | string                                                                                           | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { DynamicField, SetEnvelopeDynamicFieldsRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const dynamicField: DynamicField = {
    name: 'name',
    value: 'value',
  };

  const setEnvelopeDynamicFieldsRequest: SetEnvelopeDynamicFieldsRequest = {
    dynamicFields: [dynamicField],
  };

  const { data } = await signplus.signplus.setEnvelopeDynamicFields('envelope_id', setEnvelopeDynamicFieldsRequest);

  console.log(data);
})();
```

## addEnvelopeSigningSteps

Add envelope signing steps

* HTTP Method: `POST`
* Endpoint: `/envelope/{envelope_id}/signing_steps`

**Parameters**

| Name       | Type                                                                                           | Required | Description       |
| :--------- | :--------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [AddEnvelopeSigningStepsRequest](/api-reference/endpoints/signplus/add-envelope-signing-steps) | ✅        | The request body. |
| envelopeId | string                                                                                         | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { AddEnvelopeSigningStepsRequest, SigningStep, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const recipientRole = RecipientRole.SIGNER;

  const recipientVerificationType = RecipientVerificationType.SMS;

  const recipientVerification: RecipientVerification = {
    type: recipientVerificationType,
    value: 'value',
  };

  const recipient: Recipient = {
    id: 'id',
    uid: 'uid',
    name: 'name',
    email: 'email',
    role: recipientRole,
    verification: recipientVerification,
  };

  const signingStep: SigningStep = {
    recipients: [recipient],
  };

  const addEnvelopeSigningStepsRequest: AddEnvelopeSigningStepsRequest = {
    signingSteps: [signingStep],
  };

  const { data } = await signplus.signplus.addEnvelopeSigningSteps('envelope_id', addEnvelopeSigningStepsRequest);

  console.log(data);
})();
```

## setEnvelopeAttachmentsSettings

Set envelope attachment settings

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/attachments/settings`

**Parameters**

| Name       | Type                                                                                                        | Required | Description       |
| :--------- | :---------------------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetEnvelopeAttachmentsSettingsRequest](/api-reference/endpoints/signplus/set-envelope-attachment-settings) | ✅        | The request body. |
| envelopeId | string                                                                                                      | ✅        |                   |

**Return Type**

`EnvelopeAttachments`

**Example Usage Code Snippet**

```typescript theme={null}
import { AttachmentSettings, SetEnvelopeAttachmentsSettingsRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const attachmentSettings: AttachmentSettings = {
    visibleToRecipients: true,
  };

  const setEnvelopeAttachmentsSettingsRequest: SetEnvelopeAttachmentsSettingsRequest = {
    settings: attachmentSettings,
  };

  const { data } = await signplus.signplus.setEnvelopeAttachmentsSettings(
    'envelope_id',
    setEnvelopeAttachmentsSettingsRequest,
  );

  console.log(data);
})();
```

## setEnvelopeAttachmentsPlaceholders

Placeholders to be set, completely replacing the existing ones.

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/attachments/placeholders`

**Parameters**

| Name       | Type                                                                                                                | Required | Description       |
| :--------- | :------------------------------------------------------------------------------------------------------------------ | :------- | :---------------- |
| body       | [SetEnvelopeAttachmentsPlaceholdersRequest](/api-reference/endpoints/signplus/set-envelope-attachment-placeholders) | ✅        | The request body. |
| envelopeId | string                                                                                                              | ✅        |                   |

**Return Type**

`EnvelopeAttachments`

**Example Usage Code Snippet**

```typescript theme={null}
import {
  AttachmentPlaceholderRequest1,
  SetEnvelopeAttachmentsPlaceholdersRequest,
  Signplus,
} from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const attachmentPlaceholderRequest1: AttachmentPlaceholderRequest1 = {
    recipientId: 'recipient_id',
    id: 'id',
    name: 'name',
    hint: 'hint',
    required: true,
    multiple: true,
  };

  const setEnvelopeAttachmentsPlaceholdersRequest: SetEnvelopeAttachmentsPlaceholdersRequest = {
    placeholders: [attachmentPlaceholderRequest1],
  };

  const { data } = await signplus.signplus.setEnvelopeAttachmentsPlaceholders(
    'envelope_id',
    setEnvelopeAttachmentsPlaceholdersRequest,
  );

  console.log(data);
})();
```

## getAttachmentFile

Get envelope attachment file

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/attachments/{file_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |
| fileId     | string | ✅        |             |

**Return Type**

`ArrayBuffer`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getAttachmentFile('envelope_id', 'file_id');

  console.log(data);
})();
```

## sendEnvelope

Send envelope for signature

* HTTP Method: `POST`
* Endpoint: `/envelope/{envelope_id}/send`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.sendEnvelope('envelope_id');

  console.log(data);
})();
```

## duplicateEnvelope

Duplicate envelope

* HTTP Method: `POST`
* Endpoint: `/envelope/{envelope_id}/duplicate`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.duplicateEnvelope('envelope_id');

  console.log(data);
})();
```

## voidEnvelope

Void envelope

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/void`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| envelopeId | string | ✅        |             |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.voidEnvelope('envelope_id');

  console.log(data);
})();
```

## renameEnvelope

Rename envelope

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/rename`

**Parameters**

| Name       | Type                                                                       | Required | Description       |
| :--------- | :------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [RenameEnvelopeRequest](/api-reference/endpoints/signplus/rename-envelope) | ✅        | The request body. |
| envelopeId | string                                                                     | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { RenameEnvelopeRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const renameEnvelopeRequest: RenameEnvelopeRequest = {
    name: 'name',
  };

  const { data } = await signplus.signplus.renameEnvelope('envelope_id', renameEnvelopeRequest);

  console.log(data);
})();
```

## setEnvelopeComment

Set envelope comment

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/set_comment`

**Parameters**

| Name       | Type                                                                                | Required | Description       |
| :--------- | :---------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetEnvelopeCommentRequest](/api-reference/endpoints/signplus/set-envelope-comment) | ✅        | The request body. |
| envelopeId | string                                                                              | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { SetEnvelopeCommentRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const setEnvelopeCommentRequest: SetEnvelopeCommentRequest = {
    comment: 'comment',
  };

  const { data } = await signplus.signplus.setEnvelopeComment('envelope_id', setEnvelopeCommentRequest);

  console.log(data);
})();
```

## setEnvelopeNotification

Set envelope notification

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/set_notification`

**Parameters**

| Name       | Type                                                                                | Required | Description       |
| :--------- | :---------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [EnvelopeNotification](/api-reference/endpoints/signplus/set-envelope-notification) | ✅        | The request body. |
| envelopeId | string                                                                              | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { EnvelopeNotification, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const envelopeNotification: EnvelopeNotification = {
    subject: 'subject',
    message: 'message',
    reminderInterval: 1,
  };

  const { data } = await signplus.signplus.setEnvelopeNotification('envelope_id', envelopeNotification);

  console.log(data);
})();
```

## setEnvelopeExpirationDate

Set envelope expiration date

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/set_expiration_date`

**Parameters**

| Name       | Type                                                                                           | Required | Description       |
| :--------- | :--------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetEnvelopeExpirationRequest](/api-reference/endpoints/signplus/set-envelope-expiration-date) | ✅        | The request body. |
| envelopeId | string                                                                                         | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { SetEnvelopeExpirationRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const setEnvelopeExpirationRequest: SetEnvelopeExpirationRequest = {
    expiresAt: 123,
  };

  const { data } = await signplus.signplus.setEnvelopeExpirationDate('envelope_id', setEnvelopeExpirationRequest);

  console.log(data);
})();
```

## setEnvelopeLegalityLevel

Set envelope legality level

* HTTP Method: `PUT`
* Endpoint: `/envelope/{envelope_id}/set_legality_level`

**Parameters**

| Name       | Type                                                                                             | Required | Description       |
| :--------- | :----------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetEnvelopeLegalityLevelRequest](/api-reference/endpoints/signplus/set-envelope-legality-level) | ✅        | The request body. |
| envelopeId | string                                                                                           | ✅        |                   |

**Return Type**

`Envelope`

**Example Usage Code Snippet**

```typescript theme={null}
import { EnvelopeLegalityLevel, SetEnvelopeLegalityLevelRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const envelopeLegalityLevel = EnvelopeLegalityLevel.SES;

  const setEnvelopeLegalityLevelRequest: SetEnvelopeLegalityLevelRequest = {
    legalityLevel: envelopeLegalityLevel,
  };

  const { data } = await signplus.signplus.setEnvelopeLegalityLevel('envelope_id', setEnvelopeLegalityLevelRequest);

  console.log(data);
})();
```

## getEnvelopeAnnotations

Get envelope annotations

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/annotations`

**Parameters**

| Name       | Type   | Required | Description        |
| :--------- | :----- | :------- | :----------------- |
| envelopeId | string | ✅        | ID of the envelope |

**Return Type**

`Annotation[]`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getEnvelopeAnnotations('envelope_id');

  console.log(data);
})();
```

## getEnvelopeDocumentAnnotations

Get envelope document annotations

* HTTP Method: `GET`
* Endpoint: `/envelope/{envelope_id}/annotations/{document_id}`

**Parameters**

| Name       | Type   | Required | Description        |
| :--------- | :----- | :------- | :----------------- |
| envelopeId | string | ✅        | ID of the envelope |
| documentId | string | ✅        | ID of document     |

**Return Type**

`ListEnvelopeDocumentAnnotationsResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getEnvelopeDocumentAnnotations('envelope_id', 'document_id');

  console.log(data);
})();
```

## addEnvelopeAnnotation

Add envelope annotation

* HTTP Method: `POST`
* Endpoint: `/envelope/{envelope_id}/annotation`

**Parameters**

| Name       | Type                                                                              | Required | Description        |
| :--------- | :-------------------------------------------------------------------------------- | :------- | :----------------- |
| body       | [AddAnnotationRequest](/api-reference/endpoints/signplus/add-envelope-annotation) | ✅        | The request body.  |
| envelopeId | string                                                                            | ✅        | ID of the envelope |

**Return Type**

`Annotation`

**Example Usage Code Snippet**

```typescript theme={null}
import {
  AddAnnotationRequest,
  AnnotationCheckbox,
  AnnotationDateTime,
  AnnotationInitials,
  AnnotationSignature,
  AnnotationText,
  AnnotationType,
  Signplus,
} from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const annotationType = AnnotationType.TEXT;

  const annotationSignature: AnnotationSignature = {
    id: 'id',
  };

  const annotationInitials: AnnotationInitials = {
    id: 'id',
  };

  const annotationFontFamily = AnnotationFontFamily.UNKNOWN;

  const annotationFont: AnnotationFont = {
    family: annotationFontFamily,
    italic: true,
    bold: true,
  };

  const annotationText: AnnotationText = {
    size: 5.96,
    color: 8.73,
    value: 'value',
    tooltip: 'tooltip',
    dynamicFieldName: 'dynamic_field_name',
    font: annotationFont,
  };

  const annotationDateTimeFormat = AnnotationDateTimeFormat.DMY_NUMERIC_SLASH;

  const annotationDateTime: AnnotationDateTime = {
    size: 0.26,
    font: annotationFont,
    color: 'color',
    autoFill: true,
    timezone: 'timezone',
    timestamp: 1,
    format: annotationDateTimeFormat,
  };

  const annotationCheckboxStyle = AnnotationCheckboxStyle.CIRCLE_CHECK;

  const annotationCheckbox: AnnotationCheckbox = {
    checked: true,
    style: annotationCheckboxStyle,
  };

  const addAnnotationRequest: AddAnnotationRequest = {
    recipientId: 'recipient_id',
    documentId: 'document_id',
    page: 2,
    x: 1.99,
    y: 8.2,
    width: 4.89,
    height: 9.43,
    required: true,
    type: annotationType,
    signature: annotationSignature,
    initials: annotationInitials,
    text: annotationText,
    datetime: annotationDateTime,
    checkbox: annotationCheckbox,
  };

  const { data } = await signplus.signplus.addEnvelopeAnnotation('envelope_id', addAnnotationRequest);

  console.log(data);
})();
```

## deleteEnvelopeAnnotation

Delete envelope annotation

* HTTP Method: `DELETE`
* Endpoint: `/envelope/{envelope_id}/annotation/{annotation_id}`

**Parameters**

| Name         | Type   | Required | Description                    |
| :----------- | :----- | :------- | :----------------------------- |
| envelopeId   | string | ✅        | ID of the envelope             |
| annotationId | string | ✅        | ID of the annotation to delete |

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.deleteEnvelopeAnnotation('envelope_id', 'annotation_id');

  console.log(data);
})();
```

## createTemplate

Create new template

* HTTP Method: `POST`
* Endpoint: `/template`

**Parameters**

| Name | Type                                                                           | Required | Description       |
| :--- | :----------------------------------------------------------------------------- | :------- | :---------------- |
| body | [CreateTemplateRequest](/api-reference/endpoints/signplus/create-new-template) | ✅        | The request body. |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { CreateTemplateRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const createTemplateRequest: CreateTemplateRequest = {
    name: 'name',
  };

  const { data } = await signplus.signplus.createTemplate(createTemplateRequest);

  console.log(data);
})();
```

## listTemplates

List templates

* HTTP Method: `POST`
* Endpoint: `/templates`

**Parameters**

| Name | Type                                                                     | Required | Description       |
| :--- | :----------------------------------------------------------------------- | :------- | :---------------- |
| body | [ListTemplatesRequest](/api-reference/endpoints/signplus/list-templates) | ❌        | The request body. |

**Return Type**

`ListTemplatesResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { ListTemplatesRequest, Signplus, TemplateOrderField } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const templateOrderField = TemplateOrderField.TEMPLATE_ID;

  const listTemplatesRequest: ListTemplatesRequest = {
    name: 'name',
    tags: ['tags'],
    ids: ['ids'],
    first: 1,
    last: 6,
    after: 'after',
    before: 'before',
    orderField: templateOrderField,
    ascending: true,
  };

  const { data } = await signplus.signplus.listTemplates(listTemplatesRequest);

  console.log(data);
})();
```

## getTemplate

Get template

* HTTP Method: `GET`
* Endpoint: `/template/{template_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| templateId | string | ✅        |             |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getTemplate('template_id');

  console.log(data);
})();
```

## deleteTemplate

Delete template

* HTTP Method: `DELETE`
* Endpoint: `/template/{template_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| templateId | string | ✅        |             |

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.deleteTemplate('template_id');

  console.log(data);
})();
```

## duplicateTemplate

Duplicate template

* HTTP Method: `POST`
* Endpoint: `/template/{template_id}/duplicate`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| templateId | string | ✅        |             |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.duplicateTemplate('template_id');

  console.log(data);
})();
```

## addTemplateDocument

Add template document

* HTTP Method: `POST`
* Endpoint: `/template/{template_id}/document`

**Parameters**

| Name       | Type                                                                                  | Required | Description       |
| :--------- | :------------------------------------------------------------------------------------ | :------- | :---------------- |
| body       | [AddTemplateDocumentRequest](/api-reference/endpoints/signplus/add-template-document) | ✅        | The request body. |
| templateId | string                                                                                | ✅        |                   |

**Return Type**

`Document`

**Example Usage Code Snippet**

```typescript theme={null}
import { AddTemplateDocumentRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const addTemplateDocumentRequest: AddTemplateDocumentRequest = {
    file: new ArrayBuffer(0),
  };

  const { data } = await signplus.signplus.addTemplateDocument('template_id', addTemplateDocumentRequest);

  console.log(data);
})();
```

## getTemplateDocument

Get template document

* HTTP Method: `GET`
* Endpoint: `/template/{template_id}/document/{document_id}`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| templateId | string | ✅        |             |
| documentId | string | ✅        |             |

**Return Type**

`Document`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getTemplateDocument('template_id', 'document_id');

  console.log(data);
})();
```

## getTemplateDocuments

Get template documents

* HTTP Method: `GET`
* Endpoint: `/template/{template_id}/documents`

**Parameters**

| Name       | Type   | Required | Description |
| :--------- | :----- | :------- | :---------- |
| templateId | string | ✅        |             |

**Return Type**

`ListTemplateDocumentsResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getTemplateDocuments('template_id');

  console.log(data);
})();
```

## addTemplateSigningSteps

Add template signing steps

* HTTP Method: `POST`
* Endpoint: `/template/{template_id}/signing_steps`

**Parameters**

| Name       | Type                                                                                           | Required | Description       |
| :--------- | :--------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [AddTemplateSigningStepsRequest](/api-reference/endpoints/signplus/add-template-signing-steps) | ✅        | The request body. |
| templateId | string                                                                                         | ✅        |                   |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { AddTemplateSigningStepsRequest, Signplus, TemplateSigningStep } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const templateRecipientRole = TemplateRecipientRole.SIGNER;

  const templateRecipient: TemplateRecipient = {
    id: 'id',
    uid: 'uid',
    name: 'name',
    email: 'email',
    role: templateRecipientRole,
  };

  const templateSigningStep: TemplateSigningStep = {
    recipients: [templateRecipient],
  };

  const addTemplateSigningStepsRequest: AddTemplateSigningStepsRequest = {
    signingSteps: [templateSigningStep],
  };

  const { data } = await signplus.signplus.addTemplateSigningSteps('template_id', addTemplateSigningStepsRequest);

  console.log(data);
})();
```

## renameTemplate

Rename template

* HTTP Method: `PUT`
* Endpoint: `/template/{template_id}/rename`

**Parameters**

| Name       | Type                                                                       | Required | Description       |
| :--------- | :------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [RenameTemplateRequest](/api-reference/endpoints/signplus/rename-template) | ✅        | The request body. |
| templateId | string                                                                     | ✅        |                   |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { RenameTemplateRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const renameTemplateRequest: RenameTemplateRequest = {
    name: 'name',
  };

  const { data } = await signplus.signplus.renameTemplate('template_id', renameTemplateRequest);

  console.log(data);
})();
```

## setTemplateComment

Set template comment

* HTTP Method: `PUT`
* Endpoint: `/template/{template_id}/set_comment`

**Parameters**

| Name       | Type                                                                                | Required | Description       |
| :--------- | :---------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetTemplateCommentRequest](/api-reference/endpoints/signplus/set-template-comment) | ✅        | The request body. |
| templateId | string                                                                              | ✅        |                   |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { SetTemplateCommentRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const setTemplateCommentRequest: SetTemplateCommentRequest = {
    comment: 'comment',
  };

  const { data } = await signplus.signplus.setTemplateComment('template_id', setTemplateCommentRequest);

  console.log(data);
})();
```

## setTemplateNotification

Set template notification

* HTTP Method: `PUT`
* Endpoint: `/template/{template_id}/set_notification`

**Parameters**

| Name       | Type                                                                                | Required | Description       |
| :--------- | :---------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [EnvelopeNotification](/api-reference/endpoints/signplus/set-envelope-notification) | ✅        | The request body. |
| templateId | string                                                                              | ✅        |                   |

**Return Type**

`Template`

**Example Usage Code Snippet**

```typescript theme={null}
import { EnvelopeNotification, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const envelopeNotification: EnvelopeNotification = {
    subject: 'subject',
    message: 'message',
    reminderInterval: 1,
  };

  const { data } = await signplus.signplus.setTemplateNotification('template_id', envelopeNotification);

  console.log(data);
})();
```

## getTemplateAnnotations

Get template annotations

* HTTP Method: `GET`
* Endpoint: `/template/{template_id}/annotations`

**Parameters**

| Name       | Type   | Required | Description        |
| :--------- | :----- | :------- | :----------------- |
| templateId | string | ✅        | ID of the template |

**Return Type**

`ListTemplateAnnotationsResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getTemplateAnnotations('template_id');

  console.log(data);
})();
```

## getDocumentTemplateAnnotations

Get document template annotations

* HTTP Method: `GET`
* Endpoint: `/template/{template_id}/annotations/{document_id}`

**Parameters**

| Name       | Type   | Required | Description        |
| :--------- | :----- | :------- | :----------------- |
| templateId | string | ✅        | ID of the template |
| documentId | string | ✅        | ID of document     |

**Return Type**

`ListTemplateDocumentAnnotationsResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.getDocumentTemplateAnnotations('template_id', 'document_id');

  console.log(data);
})();
```

## addTemplateAnnotation

Add template annotation

* HTTP Method: `POST`
* Endpoint: `/template/{template_id}/annotation`

**Parameters**

| Name       | Type                                                                              | Required | Description        |
| :--------- | :-------------------------------------------------------------------------------- | :------- | :----------------- |
| body       | [AddAnnotationRequest](/api-reference/endpoints/signplus/add-envelope-annotation) | ✅        | The request body.  |
| templateId | string                                                                            | ✅        | ID of the template |

**Return Type**

`Annotation`

**Example Usage Code Snippet**

```typescript theme={null}
import {
  AddAnnotationRequest,
  AnnotationCheckbox,
  AnnotationDateTime,
  AnnotationInitials,
  AnnotationSignature,
  AnnotationText,
  AnnotationType,
  Signplus,
} from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const annotationType = AnnotationType.TEXT;

  const annotationSignature: AnnotationSignature = {
    id: 'id',
  };

  const annotationInitials: AnnotationInitials = {
    id: 'id',
  };

  const annotationFontFamily = AnnotationFontFamily.UNKNOWN;

  const annotationFont: AnnotationFont = {
    family: annotationFontFamily,
    italic: true,
    bold: true,
  };

  const annotationText: AnnotationText = {
    size: 5.96,
    color: 8.73,
    value: 'value',
    tooltip: 'tooltip',
    dynamicFieldName: 'dynamic_field_name',
    font: annotationFont,
  };

  const annotationDateTimeFormat = AnnotationDateTimeFormat.DMY_NUMERIC_SLASH;

  const annotationDateTime: AnnotationDateTime = {
    size: 0.26,
    font: annotationFont,
    color: 'color',
    autoFill: true,
    timezone: 'timezone',
    timestamp: 1,
    format: annotationDateTimeFormat,
  };

  const annotationCheckboxStyle = AnnotationCheckboxStyle.CIRCLE_CHECK;

  const annotationCheckbox: AnnotationCheckbox = {
    checked: true,
    style: annotationCheckboxStyle,
  };

  const addAnnotationRequest: AddAnnotationRequest = {
    recipientId: 'recipient_id',
    documentId: 'document_id',
    page: 2,
    x: 1.99,
    y: 8.2,
    width: 4.89,
    height: 9.43,
    required: true,
    type: annotationType,
    signature: annotationSignature,
    initials: annotationInitials,
    text: annotationText,
    datetime: annotationDateTime,
    checkbox: annotationCheckbox,
  };

  const { data } = await signplus.signplus.addTemplateAnnotation('template_id', addAnnotationRequest);

  console.log(data);
})();
```

## deleteTemplateAnnotation

Delete template annotation

* HTTP Method: `DELETE`
* Endpoint: `/template/{template_id}/annotation/{annotation_id}`

**Parameters**

| Name         | Type   | Required | Description                    |
| :----------- | :----- | :------- | :----------------------------- |
| templateId   | string | ✅        | ID of the template             |
| annotationId | string | ✅        | ID of the annotation to delete |

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.deleteTemplateAnnotation('template_id', 'annotation_id');

  console.log(data);
})();
```

## setTemplateAttachmentsSettings

Set template attachment settings

* HTTP Method: `PUT`
* Endpoint: `/template/{template_id}/attachments/settings`

**Parameters**

| Name       | Type                                                                                                        | Required | Description       |
| :--------- | :---------------------------------------------------------------------------------------------------------- | :------- | :---------------- |
| body       | [SetEnvelopeAttachmentsSettingsRequest](/api-reference/endpoints/signplus/set-envelope-attachment-settings) | ✅        | The request body. |
| templateId | string                                                                                                      | ✅        |                   |

**Return Type**

`EnvelopeAttachments`

**Example Usage Code Snippet**

```typescript theme={null}
import { AttachmentSettings, SetEnvelopeAttachmentsSettingsRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const attachmentSettings: AttachmentSettings = {
    visibleToRecipients: true,
  };

  const setEnvelopeAttachmentsSettingsRequest: SetEnvelopeAttachmentsSettingsRequest = {
    settings: attachmentSettings,
  };

  const { data } = await signplus.signplus.setTemplateAttachmentsSettings(
    'template_id',
    setEnvelopeAttachmentsSettingsRequest,
  );

  console.log(data);
})();
```

## setTemplateAttachmentsPlaceholders

Placeholders to be set, completely replacing the existing ones.

* HTTP Method: `PUT`
* Endpoint: `/template/{template_id}/attachments/placeholders`

**Parameters**

| Name       | Type                                                                                                                | Required | Description       |
| :--------- | :------------------------------------------------------------------------------------------------------------------ | :------- | :---------------- |
| body       | [SetEnvelopeAttachmentsPlaceholdersRequest](/api-reference/endpoints/signplus/set-envelope-attachment-placeholders) | ✅        | The request body. |
| templateId | string                                                                                                              | ✅        |                   |

**Return Type**

`EnvelopeAttachments`

**Example Usage Code Snippet**

```typescript theme={null}
import {
  AttachmentPlaceholderRequest1,
  SetEnvelopeAttachmentsPlaceholdersRequest,
  Signplus,
} from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const attachmentPlaceholderRequest1: AttachmentPlaceholderRequest1 = {
    recipientId: 'recipient_id',
    id: 'id',
    name: 'name',
    hint: 'hint',
    required: true,
    multiple: true,
  };

  const setEnvelopeAttachmentsPlaceholdersRequest: SetEnvelopeAttachmentsPlaceholdersRequest = {
    placeholders: [attachmentPlaceholderRequest1],
  };

  const { data } = await signplus.signplus.setTemplateAttachmentsPlaceholders(
    'template_id',
    setEnvelopeAttachmentsPlaceholdersRequest,
  );

  console.log(data);
})();
```

## createWebhook

Create webhook

* HTTP Method: `POST`
* Endpoint: `/webhook`

**Parameters**

| Name | Type                                                                     | Required | Description       |
| :--- | :----------------------------------------------------------------------- | :------- | :---------------- |
| body | [CreateWebhookRequest](/api-reference/endpoints/signplus/create-webhook) | ✅        | The request body. |

**Return Type**

`Webhook`

**Example Usage Code Snippet**

```typescript theme={null}
import { CreateWebhookRequest, Signplus, WebhookEvent } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const webhookEvent = WebhookEvent.ENVELOPE_EXPIRED;

  const createWebhookRequest: CreateWebhookRequest = {
    event: webhookEvent,
    target: 'target',
  };

  const { data } = await signplus.signplus.createWebhook(createWebhookRequest);

  console.log(data);
})();
```

## listWebhooks

List webhooks

* HTTP Method: `POST`
* Endpoint: `/webhooks`

**Parameters**

| Name | Type                                                                   | Required | Description       |
| :--- | :--------------------------------------------------------------------- | :------- | :---------------- |
| body | [ListWebhooksRequest](/api-reference/endpoints/signplus/list-webhooks) | ❌        | The request body. |

**Return Type**

`ListWebhooksResponse`

**Example Usage Code Snippet**

```typescript theme={null}
import { ListWebhooksRequest, Signplus, WebhookEvent } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const webhookEvent = WebhookEvent.ENVELOPE_EXPIRED;

  const listWebhooksRequest: ListWebhooksRequest = {
    webhookId: 'webhook_id',
    event: webhookEvent,
  };

  const { data } = await signplus.signplus.listWebhooks(listWebhooksRequest);

  console.log(data);
})();
```

## deleteWebhook

Delete webhook

* HTTP Method: `DELETE`
* Endpoint: `/webhook/{webhook_id}`

**Parameters**

| Name      | Type   | Required | Description |
| :-------- | :----- | :------- | :---------- |
| webhookId | string | ✅        |             |

**Example Usage Code Snippet**

```typescript theme={null}
import { Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const { data } = await signplus.signplus.deleteWebhook('webhook_id');

  console.log(data);
})();
```

# Models

# SetEnvelopeAttachmentsPlaceholdersRequest

**Properties**

| Name         | Type                             | Required | Description |
| :----------- | :------------------------------- | :------- | :---------- |
| placeholders | AttachmentPlaceholderRequest1\[] | ✅        |             |

# Document

**Properties**

| Name      | Type    | Required | Description                       |
| :-------- | :------ | :------- | :-------------------------------- |
| id        | string  | ❌        | Unique identifier of the document |
| name      | string  | ❌        | Name of the document              |
| filename  | string  | ❌        | Filename of the document          |
| pageCount | number  | ❌        | Number of pages in the document   |
| pages     | Page\[] | ❌        | List of pages in the document     |

# CreateEnvelopeRequest

**Properties**

| Name          | Type                  | Required | Description                                                                                                                                                               |
| :------------ | :-------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name          | string                | ✅        | Name of the envelope                                                                                                                                                      |
| legalityLevel | EnvelopeLegalityLevel | ✅        | Legal level of the envelope (SES is Simple Electronic Signature, QES\_EIDAS is Qualified Electronic Signature, QES\_ZERTES is Qualified Electronic Signature with Zertes) |
| expiresAt     | number                | ❌        | Unix timestamp of the expiration date                                                                                                                                     |
| comment       | string                | ❌        | Comment for the envelope                                                                                                                                                  |
| sandbox       | boolean               | ❌        | Whether the envelope is created in sandbox mode                                                                                                                           |

# ListEnvelopesRequest

**Properties**

| Name           | Type               | Required | Description                                       |
| :------------- | :----------------- | :------- | :------------------------------------------------ |
| name           | string             | ❌        | Name of the envelope                              |
| tags           | string\[]          | ❌        | List of tags                                      |
| comment        | string             | ❌        | Comment of the envelope                           |
| ids            | string\[]          | ❌        | List of envelope IDs                              |
| statuses       | EnvelopeStatus\[]  | ❌        | List of envelope statuses                         |
| folderIds      | string\[]          | ❌        | List of folder IDs                                |
| onlyRootFolder | boolean            | ❌        | Whether to only list envelopes in the root folder |
| dateFrom       | number             | ❌        | Unix timestamp of the start date                  |
| dateTo         | number             | ❌        | Unix timestamp of the end date                    |
| uid            | string             | ❌        | Unique identifier of the user                     |
| first          | number             | ❌        |                                                   |
| last           | number             | ❌        |                                                   |
| after          | string             | ❌        |                                                   |
| before         | string             | ❌        |                                                   |
| orderField     | EnvelopeOrderField | ❌        | Field to order envelopes by                       |
| ascending      | boolean            | ❌        | Whether to order envelopes in ascending order     |
| includeTrash   | boolean            | ❌        | Whether to include envelopes in the trash         |

# AttachmentPlaceholder

**Properties**

| Name        | Type                         | Required | Description                                                |
| :---------- | :--------------------------- | :------- | :--------------------------------------------------------- |
| recipientId | string                       | ❌        | ID of the recipient                                        |
| id          | string                       | ❌        | ID of the attachment placeholder                           |
| name        | string                       | ❌        | Name of the attachment placeholder                         |
| hint        | string                       | ❌        | Hint of the attachment placeholder                         |
| required    | boolean                      | ❌        | Whether the attachment placeholder is required             |
| multiple    | boolean                      | ❌        | Whether the attachment placeholder can have multiple files |
| files       | AttachmentPlaceholderFile\[] | ❌        |                                                            |

# SetEnvelopeAttachmentsSettingsRequest

**Properties**

| Name     | Type               | Required | Description |
| :------- | :----------------- | :------- | :---------- |
| settings | AttachmentSettings | ✅        |             |

# EnvelopeNotification

**Properties**

| Name             | Type   | Required | Description                       |
| :--------------- | :----- | :------- | :-------------------------------- |
| subject          | string | ❌        | Subject of the notification       |
| message          | string | ❌        | Message of the notification       |
| reminderInterval | number | ❌        | Interval in days to send reminder |

# ListTemplatesRequest

**Properties**

| Name       | Type               | Required | Description                                   |
| :--------- | :----------------- | :------- | :-------------------------------------------- |
| name       | string             | ❌        | Name of the template                          |
| tags       | string\[]          | ❌        | List of tag templates                         |
| ids        | string\[]          | ❌        | List of templates IDs                         |
| first      | number             | ❌        |                                               |
| last       | number             | ❌        |                                               |
| after      | string             | ❌        |                                               |
| before     | string             | ❌        |                                               |
| orderField | TemplateOrderField | ❌        | Field to order templates by                   |
| ascending  | boolean            | ❌        | Whether to order templates in ascending order |

# SetTemplateCommentRequest

**Properties**

| Name    | Type   | Required | Description              |
| :------ | :----- | :------- | :----------------------- |
| comment | string | ✅        | Comment for the template |

# Template

**Properties**

| Name            | Type                   | Required | Description                                                                                                                                                               |
| :-------------- | :--------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id              | string                 | ❌        | Unique identifier of the template                                                                                                                                         |
| name            | string                 | ❌        | Name of the template                                                                                                                                                      |
| comment         | string                 | ❌        | Comment for the template                                                                                                                                                  |
| pages           | number                 | ❌        | Total number of pages in the template                                                                                                                                     |
| legalityLevel   | EnvelopeLegalityLevel  | ❌        | Legal level of the envelope (SES is Simple Electronic Signature, QES\_EIDAS is Qualified Electronic Signature, QES\_ZERTES is Qualified Electronic Signature with Zertes) |
| createdAt       | number                 | ❌        | Unix timestamp of the creation date                                                                                                                                       |
| updatedAt       | number                 | ❌        | Unix timestamp of the last modification date                                                                                                                              |
| expirationDelay | number                 | ❌        | Expiration delay added to the current time when an envelope is created from this template                                                                                 |
| numRecipients   | number                 | ❌        | Number of recipients in the envelope                                                                                                                                      |
| signingSteps    | TemplateSigningStep\[] | ❌        |                                                                                                                                                                           |
| documents       | Document\[]            | ❌        |                                                                                                                                                                           |
| notification    | EnvelopeNotification   | ❌        |                                                                                                                                                                           |
| dynamicFields   | string\[]              | ❌        | List of dynamic fields                                                                                                                                                    |
| attachments     | EnvelopeAttachments    | ❌        |                                                                                                                                                                           |

# RecipientVerificationType

Type of verification the recipient must complete before accessing the envelope. - `PASSCODE`: requires a code to be entered. - `SMS`: sends a code via SMS. - `ID_VERIFICATION`: prompts the recipient to complete an automated ID and selfie check.

**Properties**

| Name             | Type   | Required | Description        |
| :--------------- | :----- | :------- | :----------------- |
| SMS              | string | ✅        | "SMS"              |
| PASSCODE         | string | ✅        | "PASSCODE"         |
| ID\_VERIFICATION | string | ✅        | "ID\_VERIFICATION" |

# AddEnvelopeSigningStepsRequest

**Properties**

| Name         | Type           | Required | Description           |
| :----------- | :------------- | :------- | :-------------------- |
| signingSteps | SigningStep\[] | ❌        | List of signing steps |

# AnnotationFontFamily

Font family of the text

**Properties**

| Name    | Type   | Required | Description |
| :------ | :----- | :------- | :---------- |
| UNKNOWN | string | ✅        | "UNKNOWN"   |
| SERIF   | string | ✅        | "SERIF"     |
| SANS    | string | ✅        | "SANS"      |
| MONO    | string | ✅        | "MONO"      |

# AddTemplateSigningStepsRequest

**Properties**

| Name         | Type                   | Required | Description           |
| :----------- | :--------------------- | :------- | :-------------------- |
| signingSteps | TemplateSigningStep\[] | ✅        | List of signing steps |

# SetEnvelopeCommentRequest

**Properties**

| Name    | Type   | Required | Description              |
| :------ | :----- | :------- | :----------------------- |
| comment | string | ✅        | Comment for the envelope |

# TemplateOrderField

Field to order templates by

**Properties**

| Name                         | Type   | Required | Description                    |
| :--------------------------- | :----- | :------- | :----------------------------- |
| TEMPLATE\_ID                 | string | ✅        | "TEMPLATE\_ID"                 |
| TEMPLATE\_CREATION\_DATE     | string | ✅        | "TEMPLATE\_CREATION\_DATE"     |
| TEMPLATE\_MODIFICATION\_DATE | string | ✅        | "TEMPLATE\_MODIFICATION\_DATE" |
| TEMPLATE\_NAME               | string | ✅        | "TEMPLATE\_NAME"               |

# EnvelopeOrderField

Field to order envelopes by

**Properties**

| Name                   | Type   | Required | Description              |
| :--------------------- | :----- | :------- | :----------------------- |
| CREATION\_DATE         | string | ✅        | "CREATION\_DATE"         |
| MODIFICATION\_DATE     | string | ✅        | "MODIFICATION\_DATE"     |
| NAME                   | string | ✅        | "NAME"                   |
| STATUS                 | string | ✅        | "STATUS"                 |
| LAST\_DOCUMENT\_CHANGE | string | ✅        | "LAST\_DOCUMENT\_CHANGE" |

# AddEnvelopeDocumentRequest

**Properties**

| Name | Type        | Required | Description                     |
| :--- | :---------- | :------- | :------------------------------ |
| file | ArrayBuffer | ❌        | File to upload in binary format |

# ListWebhooksRequest

**Properties**

| Name      | Type         | Required | Description          |
| :-------- | :----------- | :------- | :------------------- |
| webhookId | string       | ❌        | ID of the webhook    |
| event     | WebhookEvent | ❌        | Event of the webhook |

# SetEnvelopeLegalityLevelRequest

**Properties**

| Name          | Type                  | Required | Description                                                                                                                                                               |
| :------------ | :-------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| legalityLevel | EnvelopeLegalityLevel | ❌        | Legal level of the envelope (SES is Simple Electronic Signature, QES\_EIDAS is Qualified Electronic Signature, QES\_ZERTES is Qualified Electronic Signature with Zertes) |

# AttachmentPlaceholderFile

**Properties**

| Name     | Type   | Required | Description               |
| :------- | :----- | :------- | :------------------------ |
| id       | string | ❌        | ID of the file            |
| name     | string | ❌        | Name of the file          |
| size     | number | ❌        | Size of the file in bytes |
| mimetype | string | ❌        | MIME type of the file     |

# SetEnvelopeExpirationRequest

**Properties**

| Name      | Type   | Required | Description                           |
| :-------- | :----- | :------- | :------------------------------------ |
| expiresAt | number | ✅        | Unix timestamp of the expiration date |

# AnnotationText

Text annotation (null if annotation is not a text)

**Properties**

| Name             | Type           | Required | Description                        |
| :--------------- | :------------- | :------- | :--------------------------------- |
| size             | number         | ❌        | Font size of the text in pt        |
| color            | number         | ❌        | Text color in 32bit representation |
| value            | string         | ❌        | Text content of the annotation     |
| tooltip          | string         | ❌        | Tooltip of the annotation          |
| dynamicFieldName | string         | ❌        | Name of the dynamic field          |
| font             | AnnotationFont | ❌        |                                    |

# AnnotationCheckbox

Checkbox annotation (null if annotation is not a checkbox)

**Properties**

| Name    | Type                    | Required | Description                     |
| :------ | :---------------------- | :------- | :------------------------------ |
| checked | boolean                 | ❌        | Whether the checkbox is checked |
| style   | AnnotationCheckboxStyle | ❌        | Style of the checkbox           |

# Envelope

**Properties**

| Name          | Type                  | Required | Description                                                                                                                                                               |
| :------------ | :-------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id            | string                | ❌        | Unique identifier of the envelope                                                                                                                                         |
| name          | string                | ❌        | Name of the envelope                                                                                                                                                      |
| comment       | string                | ❌        | Comment for the envelope                                                                                                                                                  |
| pages         | number                | ❌        | Total number of pages in the envelope                                                                                                                                     |
| flowType      | EnvelopeFlowType      | ❌        | Flow type of the envelope (REQUEST\_SIGNATURE is a request for signature, SIGN\_MYSELF is a self-signing flow)                                                            |
| legalityLevel | EnvelopeLegalityLevel | ❌        | Legal level of the envelope (SES is Simple Electronic Signature, QES\_EIDAS is Qualified Electronic Signature, QES\_ZERTES is Qualified Electronic Signature with Zertes) |
| status        | EnvelopeStatus        | ❌        | Status of the envelope                                                                                                                                                    |
| createdAt     | number                | ❌        | Unix timestamp of the creation date                                                                                                                                       |
| updatedAt     | number                | ❌        | Unix timestamp of the last modification date                                                                                                                              |
| expiresAt     | number                | ❌        | Unix timestamp of the expiration date                                                                                                                                     |
| numRecipients | number                | ❌        | Number of recipients in the envelope                                                                                                                                      |
| isDuplicable  | boolean               | ❌        | Whether the envelope can be duplicated                                                                                                                                    |
| signingSteps  | SigningStep\[]        | ❌        |                                                                                                                                                                           |
| documents     | Document\[]           | ❌        |                                                                                                                                                                           |
| notification  | EnvelopeNotification  | ❌        |                                                                                                                                                                           |
| attachments   | EnvelopeAttachments   | ❌        |                                                                                                                                                                           |

# AddTemplateDocumentRequest

**Properties**

| Name | Type        | Required | Description                     |
| :--- | :---------- | :------- | :------------------------------ |
| file | ArrayBuffer | ✅        | File to upload in binary format |

# TemplateRecipient

**Properties**

| Name  | Type                  | Required | Description                                                                                                                                                                   |
| :---- | :-------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id    | string                | ❌        | Unique identifier of the recipient                                                                                                                                            |
| uid   | string                | ❌        | Unique identifier of the user associated with the recipient                                                                                                                   |
| name  | string                | ❌        | Name of the recipient                                                                                                                                                         |
| email | string                | ❌        | Email of the recipient                                                                                                                                                        |
| role  | TemplateRecipientRole | ❌        | Role of the recipient (SIGNER signs the document, RECEIVES\_COPY receives a copy of the document, IN\_PERSON\_SIGNER signs the document in person, SENDER sends the document) |

# AddAnnotationRequest

**Properties**

| Name        | Type                | Required | Description                                                                                     |
| :---------- | :------------------ | :------- | :---------------------------------------------------------------------------------------------- |
| documentId  | string              | ✅        | ID of the document                                                                              |
| page        | number              | ✅        | Page number where the annotation is placed                                                      |
| x           | number              | ✅        | X coordinate of the annotation (in % of the page width from 0 to 100) from the top left corner  |
| y           | number              | ✅        | Y coordinate of the annotation (in % of the page height from 0 to 100) from the top left corner |
| width       | number              | ✅        | Width of the annotation (in % of the page width from 0 to 100)                                  |
| height      | number              | ✅        | Height of the annotation (in % of the page height from 0 to 100)                                |
| type        | AnnotationType      | ✅        | Type of the annotation                                                                          |
| recipientId | string              | ❌        | ID of the recipient                                                                             |
| required    | boolean             | ❌        |                                                                                                 |
| signature   | AnnotationSignature | ❌        | Signature annotation (null if annotation is not a signature)                                    |
| initials    | AnnotationInitials  | ❌        | Initials annotation (null if annotation is not initials)                                        |
| text        | AnnotationText      | ❌        | Text annotation (null if annotation is not a text)                                              |
| datetime    | AnnotationDateTime  | ❌        | Date annotation (null if annotation is not a date)                                              |
| checkbox    | AnnotationCheckbox  | ❌        | Checkbox annotation (null if annotation is not a checkbox)                                      |

# ListEnvelopeDocumentAnnotationsResponse

**Properties**

| Name        | Type          | Required | Description |
| :---------- | :------------ | :------- | :---------- |
| annotations | Annotation\[] | ❌        |             |

# EnvelopeStatus

Status of the envelope

**Properties**

| Name         | Type   | Required | Description    |
| :----------- | :----- | :------- | :------------- |
| DRAFT        | string | ✅        | "DRAFT"        |
| IN\_PROGRESS | string | ✅        | "IN\_PROGRESS" |
| COMPLETED    | string | ✅        | "COMPLETED"    |
| EXPIRED      | string | ✅        | "EXPIRED"      |
| DECLINED     | string | ✅        | "DECLINED"     |
| VOIDED       | string | ✅        | "VOIDED"       |
| PENDING      | string | ✅        | "PENDING"      |

# RecipientVerification

**Properties**

| Name  | Type                      | Required | Description                                                                                                                                                                                                                                          |
| :---- | :------------------------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type  | RecipientVerificationType | ❌        | Type of verification the recipient must complete before accessing the envelope. - `PASSCODE`: requires a code to be entered. - `SMS`: sends a code via SMS. - `ID_VERIFICATION`: prompts the recipient to complete an automated ID and selfie check. |
| value | string                    | ❌        | Required for `PASSCODE` and `SMS` verification. - `PASSCODE`: code required by the recipient to sign the document. - `SMS`: recipient's phone number. - `ID_VERIFICATION`: leave empty.                                                              |

# AnnotationCheckboxStyle

Style of the checkbox

**Properties**

| Name          | Type   | Required | Description     |
| :------------ | :----- | :------- | :-------------- |
| CIRCLE\_CHECK | string | ✅        | "CIRCLE\_CHECK" |
| CIRCLE\_FULL  | string | ✅        | "CIRCLE\_FULL"  |
| SQUARE\_CHECK | string | ✅        | "SQUARE\_CHECK" |
| SQUARE\_FULL  | string | ✅        | "SQUARE\_FULL"  |
| CHECK\_MARK   | string | ✅        | "CHECK\_MARK"   |
| TIMES\_SQUARE | string | ✅        | "TIMES\_SQUARE" |

# SigningStep

**Properties**

| Name       | Type         | Required | Description        |
| :--------- | :----------- | :------- | :----------------- |
| recipients | Recipient\[] | ❌        | List of recipients |

# AnnotationDateTime

Date annotation (null if annotation is not a date)

**Properties**

| Name      | Type                     | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| :-------- | :----------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| size      | number                   | ❌        | Font size of the text in pt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| font      | AnnotationFont           | ❌        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| color     | string                   | ❌        | Color of the text in hex format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| autoFill  | boolean                  | ❌        | Whether the date should be automatically filled                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| timezone  | string                   | ❌        | Timezone of the date                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| timestamp | number                   | ❌        | Unix timestamp of the date                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| format    | AnnotationDateTimeFormat | ❌        | Format of the date time (DMY\_NUMERIC\_SLASH is day/month/year with slashes, MDY\_NUMERIC\_SLASH is month/day/year with slashes, YMD\_NUMERIC\_SLASH is year/month/day with slashes, DMY\_NUMERIC\_DASH\_SHORT is day/month/year with dashes, DMY\_NUMERIC\_DASH is day/month/year with dashes, YMD\_NUMERIC\_DASH is year/month/day with dashes, MDY\_TEXT\_DASH\_SHORT is month/day/year with dashes, MDY\_TEXT\_SPACE\_SHORT is month/day/year with spaces, MDY\_TEXT\_SPACE is month/day/year with spaces) |

# AttachmentSettings

**Properties**

| Name                | Type    | Required | Description                                         |
| :------------------ | :------ | :------- | :-------------------------------------------------- |
| visibleToRecipients | boolean | ❌        | Whether the attachment is visible to the recipients |

# CreateTemplateRequest

**Properties**

| Name | Type   | Required | Description |
| :--- | :----- | :------- | :---------- |
| name | string | ✅        |             |

# ListTemplateDocumentsResponse

**Properties**

| Name      | Type        | Required | Description |
| :-------- | :---------- | :------- | :---------- |
| documents | Document\[] | ❌        |             |

# AnnotationInitials

Initials annotation (null if annotation is not initials)

**Properties**

| Name | Type   | Required | Description                                  |
| :--- | :----- | :------- | :------------------------------------------- |
| id   | string | ❌        | Unique identifier of the annotation initials |

# AnnotationFont

**Properties**

| Name   | Type                 | Required | Description                |
| :----- | :------------------- | :------- | :------------------------- |
| family | AnnotationFontFamily | ❌        | Font family of the text    |
| italic | boolean              | ❌        | Whether the text is italic |
| bold   | boolean              | ❌        | Whether the text is bold   |

# AnnotationType

Type of the annotation

**Properties**

| Name      | Type   | Required | Description |
| :-------- | :----- | :------- | :---------- |
| TEXT      | string | ✅        | "TEXT"      |
| SIGNATURE | string | ✅        | "SIGNATURE" |
| INITIALS  | string | ✅        | "INITIALS"  |
| CHECKBOX  | string | ✅        | "CHECKBOX"  |
| DATE      | string | ✅        | "DATE"      |

# Webhook

**Properties**

| Name   | Type         | Required | Description                      |
| :----- | :----------- | :------- | :------------------------------- |
| id     | string       | ❌        | Unique identifier of the webhook |
| event  | WebhookEvent | ❌        | Event of the webhook             |
| target | string       | ❌        | Target URL of the webhook        |

# RenameTemplateRequest

**Properties**

| Name | Type   | Required | Description          |
| :--- | :----- | :------- | :------------------- |
| name | string | ✅        | Name of the template |

# ListTemplatesResponse

**Properties**

| Name            | Type        | Required | Description                      |
| :-------------- | :---------- | :------- | :------------------------------- |
| hasNextPage     | boolean     | ❌        | Whether there is a next page     |
| hasPreviousPage | boolean     | ❌        | Whether there is a previous page |
| templates       | Template\[] | ❌        |                                  |

# EnvelopeAttachments

**Properties**

| Name       | Type                                  | Required | Description |
| :--------- | :------------------------------------ | :------- | :---------- |
| settings   | AttachmentSettings                    | ❌        |             |
| recipients | AttachmentPlaceholdersPerRecipient\[] | ❌        |             |

# RecipientRole

Role of the recipient (SIGNER signs the document, RECEIVES\_COPY receives a copy of the document, IN\_PERSON\_SIGNER signs the document in person, SENDER sends the document)

**Properties**

| Name               | Type   | Required | Description          |
| :----------------- | :----- | :------- | :------------------- |
| SIGNER             | string | ✅        | "SIGNER"             |
| RECEIVES\_COPY     | string | ✅        | "RECEIVES\_COPY"     |
| IN\_PERSON\_SIGNER | string | ✅        | "IN\_PERSON\_SIGNER" |

# Annotation

**Properties**

| Name        | Type                | Required | Description                                                                                     |
| :---------- | :------------------ | :------- | :---------------------------------------------------------------------------------------------- |
| id          | string              | ❌        | Unique identifier of the annotation                                                             |
| recipientId | string              | ❌        | ID of the recipient                                                                             |
| documentId  | string              | ❌        | ID of the document                                                                              |
| page        | number              | ❌        | Page number where the annotation is placed                                                      |
| x           | number              | ❌        | X coordinate of the annotation (in % of the page width from 0 to 100) from the top left corner  |
| y           | number              | ❌        | Y coordinate of the annotation (in % of the page height from 0 to 100) from the top left corner |
| width       | number              | ❌        | Width of the annotation (in % of the page width from 0 to 100)                                  |
| height      | number              | ❌        | Height of the annotation (in % of the page height from 0 to 100)                                |
| required    | boolean             | ❌        | Whether the annotation is required                                                              |
| type        | AnnotationType      | ❌        | Type of the annotation                                                                          |
| signature   | AnnotationSignature | ❌        | Signature annotation (null if annotation is not a signature)                                    |
| initials    | AnnotationInitials  | ❌        | Initials annotation (null if annotation is not initials)                                        |
| text        | AnnotationText      | ❌        | Text annotation (null if annotation is not a text)                                              |
| datetime    | AnnotationDateTime  | ❌        | Date annotation (null if annotation is not a date)                                              |
| checkbox    | AnnotationCheckbox  | ❌        | Checkbox annotation (null if annotation is not a checkbox)                                      |

# DynamicField

**Properties**

| Name  | Type   | Required | Description                |
| :---- | :----- | :------- | :------------------------- |
| name  | string | ❌        | Name of the dynamic field  |
| value | string | ❌        | Value of the dynamic field |

# AnnotationDateTimeFormat

Format of the date time (DMY\_NUMERIC\_SLASH is day/month/year with slashes, MDY\_NUMERIC\_SLASH is month/day/year with slashes, YMD\_NUMERIC\_SLASH is year/month/day with slashes, DMY\_NUMERIC\_DASH\_SHORT is day/month/year with dashes, DMY\_NUMERIC\_DASH is day/month/year with dashes, YMD\_NUMERIC\_DASH is year/month/day with dashes, MDY\_TEXT\_DASH\_SHORT is month/day/year with dashes, MDY\_TEXT\_SPACE\_SHORT is month/day/year with spaces, MDY\_TEXT\_SPACE is month/day/year with spaces)

**Properties**

| Name                      | Type   | Required | Description                 |
| :------------------------ | :----- | :------- | :-------------------------- |
| DMY\_NUMERIC\_SLASH       | string | ✅        | "DMY\_NUMERIC\_SLASH"       |
| MDY\_NUMERIC\_SLASH       | string | ✅        | "MDY\_NUMERIC\_SLASH"       |
| YMD\_NUMERIC\_SLASH       | string | ✅        | "YMD\_NUMERIC\_SLASH"       |
| DMY\_NUMERIC\_DASH\_SHORT | string | ✅        | "DMY\_NUMERIC\_DASH\_SHORT" |
| DMY\_NUMERIC\_DASH        | string | ✅        | "DMY\_NUMERIC\_DASH"        |
| YMD\_NUMERIC\_DASH        | string | ✅        | "YMD\_NUMERIC\_DASH"        |
| MDY\_TEXT\_DASH\_SHORT    | string | ✅        | "MDY\_TEXT\_DASH\_SHORT"    |
| MDY\_TEXT\_SPACE\_SHORT   | string | ✅        | "MDY\_TEXT\_SPACE\_SHORT"   |
| MDY\_TEXT\_SPACE          | string | ✅        | "MDY\_TEXT\_SPACE"          |

# EnvelopeFlowType

Flow type of the envelope (REQUEST\_SIGNATURE is a request for signature, SIGN\_MYSELF is a self-signing flow)

**Properties**

| Name               | Type   | Required | Description          |
| :----------------- | :----- | :------- | :------------------- |
| REQUEST\_SIGNATURE | string | ✅        | "REQUEST\_SIGNATURE" |
| SIGN\_MYSELF       | string | ✅        | "SIGN\_MYSELF"       |

# EnvelopeLegalityLevel

Legal level of the envelope (SES is Simple Electronic Signature, QES\_EIDAS is Qualified Electronic Signature, QES\_ZERTES is Qualified Electronic Signature with Zertes)

**Properties**

| Name        | Type   | Required | Description   |
| :---------- | :----- | :------- | :------------ |
| SES         | string | ✅        | "SES"         |
| QES\_EIDAS  | string | ✅        | "QES\_EIDAS"  |
| QES\_ZERTES | string | ✅        | "QES\_ZERTES" |

# TemplateRecipientRole

Role of the recipient (SIGNER signs the document, RECEIVES\_COPY receives a copy of the document, IN\_PERSON\_SIGNER signs the document in person, SENDER sends the document)

**Properties**

| Name               | Type   | Required | Description          |
| :----------------- | :----- | :------- | :------------------- |
| SIGNER             | string | ✅        | "SIGNER"             |
| RECEIVES\_COPY     | string | ✅        | "RECEIVES\_COPY"     |
| IN\_PERSON\_SIGNER | string | ✅        | "IN\_PERSON\_SIGNER" |
| SENDER             | string | ✅        | "SENDER"             |

# SetEnvelopeDynamicFieldsRequest

**Properties**

| Name          | Type            | Required | Description            |
| :------------ | :-------------- | :------- | :--------------------- |
| dynamicFields | DynamicField\[] | ✅        | List of dynamic fields |

# Page

**Properties**

| Name   | Type   | Required | Description                  |
| :----- | :----- | :------- | :--------------------------- |
| width  | number | ❌        | Width of the page in pixels  |
| height | number | ❌        | Height of the page in pixels |

# TemplateSigningStep

**Properties**

| Name       | Type                 | Required | Description        |
| :--------- | :------------------- | :------- | :----------------- |
| recipients | TemplateRecipient\[] | ❌        | List of recipients |

# AttachmentPlaceholdersPerRecipient

**Properties**

| Name          | Type                     | Required | Description           |
| :------------ | :----------------------- | :------- | :-------------------- |
| recipientId   | string                   | ❌        | ID of the recipient   |
| recipientName | string                   | ❌        | Name of the recipient |
| placeholders  | AttachmentPlaceholder\[] | ❌        |                       |

# ListEnvelopesResponse

**Properties**

| Name            | Type        | Required | Description                      |
| :-------------- | :---------- | :------- | :------------------------------- |
| hasNextPage     | boolean     | ❌        | Whether there is a next page     |
| hasPreviousPage | boolean     | ❌        | Whether there is a previous page |
| envelopes       | Envelope\[] | ❌        |                                  |

# Recipient

**Properties**

| Name         | Type                  | Required | Description                                                                                                                                                                   |
| :----------- | :-------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name         | string                | ✅        | Name of the recipient                                                                                                                                                         |
| email        | string                | ✅        | Email of the recipient                                                                                                                                                        |
| role         | RecipientRole         | ✅        | Role of the recipient (SIGNER signs the document, RECEIVES\_COPY receives a copy of the document, IN\_PERSON\_SIGNER signs the document in person, SENDER sends the document) |
| id           | string                | ❌        | Unique identifier of the recipient                                                                                                                                            |
| uid          | string                | ❌        | Unique identifier of the user associated with the recipient                                                                                                                   |
| verification | RecipientVerification | ❌        |                                                                                                                                                                               |

# WebhookEvent

Event of the webhook

**Properties**

| Name                   | Type   | Required | Description              |
| :--------------------- | :----- | :------- | :----------------------- |
| ENVELOPE\_EXPIRED      | string | ✅        | "ENVELOPE\_EXPIRED"      |
| ENVELOPE\_DECLINED     | string | ✅        | "ENVELOPE\_DECLINED"     |
| ENVELOPE\_VOIDED       | string | ✅        | "ENVELOPE\_VOIDED"       |
| ENVELOPE\_COMPLETED    | string | ✅        | "ENVELOPE\_COMPLETED"    |
| ENVELOPE\_AUDIT\_TRAIL | string | ✅        | "ENVELOPE\_AUDIT\_TRAIL" |

# CreateWebhookRequest

**Properties**

| Name   | Type         | Required | Description               |
| :----- | :----------- | :------- | :------------------------ |
| event  | WebhookEvent | ✅        | Event of the webhook      |
| target | string       | ✅        | URL of the webhook target |

# CreateEnvelopeFromTemplateRequest

**Properties**

| Name    | Type    | Required | Description                                     |
| :------ | :------ | :------- | :---------------------------------------------- |
| name    | string  | ✅        | Name of the envelope                            |
| comment | string  | ❌        | Comment for the envelope                        |
| sandbox | boolean | ❌        | Whether the envelope is created in sandbox mode |

# ListTemplateAnnotationsResponse

**Properties**

| Name        | Type          | Required | Description |
| :---------- | :------------ | :------- | :---------- |
| annotations | Annotation\[] | ❌        |             |

# RenameEnvelopeRequest

**Properties**

| Name | Type   | Required | Description          |
| :--- | :----- | :------- | :------------------- |
| name | string | ❌        | Name of the envelope |

# ListTemplateDocumentAnnotationsResponse

**Properties**

| Name        | Type          | Required | Description |
| :---------- | :------------ | :------- | :---------- |
| annotations | Annotation\[] | ❌        |             |

# AttachmentPlaceholderRequest1

**Properties**

| Name        | Type    | Required | Description                                    |
| :---------- | :------ | :------- | :--------------------------------------------- |
| recipientId | string  | ✅        | ID of the recipient                            |
| name        | string  | ✅        |                                                |
| required    | boolean | ✅        | Whether the attachment placeholder is required |
| multiple    | boolean | ✅        |                                                |
| id          | string  | ❌        | ID of the attachment placeholder               |
| hint        | string  | ❌        | Hint of the attachment placeholder             |

# ListEnvelopeDocumentsResponse

**Properties**

| Name      | Type        | Required | Description |
| :-------- | :---------- | :------- | :---------- |
| documents | Document\[] | ❌        |             |

# ListWebhooksResponse

**Properties**

| Name     | Type       | Required | Description |
| :------- | :--------- | :------- | :---------- |
| webhooks | Webhook\[] | ❌        |             |

# AnnotationSignature

Signature annotation (null if annotation is not a signature)

**Properties**

| Name | Type   | Required | Description                                   |
| :--- | :----- | :------- | :-------------------------------------------- |
| id   | string | ❌        | Unique identifier of the annotation signature |
