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

# Documenso

> Documenso Scenario seeding parameters, nested fields, and examples

Use `documenso` in `twins` and put this configuration under `seed_config.documenso`.

Documenso electronic-document workflow with folders, v2 envelopes/documents/templates, recipients, positioned fields, signing order, captured email, direct links, and lifecycle webhooks.

## Example seed

This is the complete Scenario request body for [creating a Scenario](https://docs.argalabs.com/api-reference/post-create-a-scenario.md). You can also import it with `arga test-runner scenarios import --file scenario.json`.

```json theme={null}
{
  "name": "Documenso eval fixture",
  "twins": [
    "documenso"
  ],
  "seed_config": {
    "documenso": {
      "folders": [
        {
          "id": "folder_contracts",
          "name": "Contracts",
          "type": "DOCUMENT"
        }
      ],
      "envelopes": [
        {
          "title": "Mutual NDA",
          "externalId": "nda-scenario-001",
          "folderId": "folder_contracts",
          "status": "DRAFT",
          "documentMeta": {
            "signingOrder": "SEQUENTIAL",
            "message": "Please review and sign."
          },
          "recipients": [
            {
              "name": "Ada Lovelace",
              "email": "ada@example.test",
              "role": "SIGNER",
              "signingOrder": 1,
              "fields": [
                {
                  "type": "SIGNATURE",
                  "page": 1,
                  "positionX": 12,
                  "positionY": 72,
                  "width": 28,
                  "height": 8,
                  "fieldMeta": {
                    "required": true
                  }
                }
              ]
            },
            {
              "name": "Grace Approver",
              "email": "grace@example.test",
              "role": "APPROVER",
              "signingOrder": 2,
              "fields": [
                {
                  "type": "CHECKBOX",
                  "page": 1,
                  "positionX": 12,
                  "positionY": 84,
                  "width": 5,
                  "height": 5,
                  "fieldMeta": {
                    "required": true
                  }
                }
              ]
            }
          ]
        }
      ],
      "templates": [
        {
          "title": "Consulting Agreement Template",
          "recipients": [
            {
              "name": "Client",
              "email": "",
              "role": "SIGNER"
            }
          ]
        }
      ],
      "webhooks": [
        {
          "url": "https://hooks.example.test/documenso",
          "events": [
            "ENVELOPE_SENT",
            "ENVELOPE_COMPLETED",
            "DOCUMENT_REJECTED"
          ],
          "secret": "scenario-documenso-secret",
          "enabled": true
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.documenso`. Required nested fields are marked in their tables. Provider-native objects can contain service-specific fields beyond the representative record shapes below.

| Parameter | Type | Description |
| - | - | - |
| `folders` | `object[]` | Folders fixtures in provider-native format. |
| `envelopes` | `object[]` | Envelopes fixtures in provider-native format. |
| `documents` | `object[]` | Documents fixtures in provider-native format. |
| `templates` | `object[]` | Templates fixtures in provider-native format. |
| `webhooks` | `object[]` | Webhook subscriptions or configurations. |

## Resource fields

These tables describe the record shapes used by the example. Keep native field names and casing. Map keys such as property names, IDs, and metadata keys are supplied by your fixture.

### `folders[]`

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | Explicit resource identifier, when supported. |
| `name` | `string` | Human-readable name. |
| `type` | `string` | Type. |

### `envelopes[]`

| Parameter | Type | Description |
| - | - | - |
| `title` | `string` | Human-readable name. |
| `externalId` | `string` | ExternalId. |
| `folderId` | `string` | FolderId. |
| `status` | `string` | Status. |
| `documentMeta` | `object` | DocumentMeta. |
| `recipients` | `object[]` | Recipients fixtures in provider-native format. |

### `envelopes[].recipients[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |
| `email` | `string` | Main account email address. |
| `role` | `string` | Role. |
| `signingOrder` | `integer` | SigningOrder. |
| `fields` | `object[]` | Fields fixtures in provider-native format. |

### `envelopes[].recipients[].fields[]`

| Parameter | Type | Description |
| - | - | - |
| `type` | `string` | Type. |
| `page` | `integer` | Page. |
| `positionX` | `integer` | PositionX. |
| `positionY` | `integer` | PositionY. |
| `width` | `integer` | Width. |
| `height` | `integer` | Height. |
| `fieldMeta` | `object` | FieldMeta. |

### `templates[]`

| Parameter | Type | Description |
| - | - | - |
| `title` | `string` | Human-readable name. |
| `recipients` | `object[]` | Recipients fixtures in provider-native format. |

### `templates[].recipients[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |
| `email` | `string` | Main account email address. |
| `role` | `string` | Role. |

### `webhooks[]`

| Parameter | Type | Description |
| - | - | - |
| `url` | `string` | Url. |
| `events` | `string[]` | Events fixtures in provider-native format. |
| `secret` | `string` | Secret. |
| `enabled` | `boolean` | Enable or set enabled behavior. |

See [Scenario seeding](https://docs.argalabs.com/twins/seeding.md) for saving, provisioning, and resetting fixtures.


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