# Envelope Structure

```
<envelope templateUuid="1997a1b4-88e3-4f58-88ca-fcd2c6fb5869" templateVersion="4a303734-a118-44a2-aedf-67df61612628">
        <info>
                <subject>all fields envelope</subject>
                <message/>
                <forwarding delegation="true" sharing="true"/>
        </info>
        <flow>
                <roles>
                        <role id="74266bb8-91ad-4e35-9d98-5862fc59cf3e" mailboxUuid="8dcde243-a918-444a-ac7d-44ac88554769"/>
                        <role id="a09d90c7-46c1-4f59-8d76-e7975dd8fab6" mailboxUuid="8dcde243-a918-444a-ac7d-44ac88554769"/>
                </roles>
        </flow>
        <documents>
                <document id="16c545db-1002-4efb-a4de-b46bc5ed4885">
                        <field name="Text">text</field>
                        <field name="Duplicate">text</field>
                        <field name="Number">10</field>
                        <field name="Currency">10.20</field>
                        <field name="Date">2024-01-11</field>
                        <field name="Dictionary" recordUuid="76d0b4a4-114f-45a6-9039-d654c90a2df2">one 2</field>
                        <field name="Signature">data:image/png;base64,iVBORw...K5CYII=</field>
                        <field name="File" attachmentUuid="dc317260-adf3-4231-8eaa-588759d7b6f7">Screenshot 2024-01-11 at 11.22.54.png</field>
                        <field name="Lookup">two 2</field>
                        <field name="Checkbox">1</field>
                        <field name="Dropdown">2</field>
            // If dropdown contains option multiselect
            <field name="Dropdown 2">
                <value>1</value>
                <value>2</value>
            </field>
                        <field name="1234">Choice</field>
                        <fieldgroup name="Table">
                                <fieldset index="0">
                                        <field name="Text 2">1</field>
                                </fieldset>
                                <fieldset index="1">
                                        <field name="Text 2">2</field>
                                </fieldset>
                        </fieldgroup>
                </document>
        </documents>
</envelope>
```

<table><thead><tr><th width="180.79998779296875">Parameter name</th><th>Description</th></tr></thead><tbody><tr><td><strong>Envelope</strong></td><td></td></tr><tr><td>templateUuid</td><td>ID of the template on the basis of which the envelope was created</td></tr><tr><td>templateVersion</td><td>ID of the template version on the basis of which the envelope was created</td></tr><tr><td>created</td><td>Envelope creation date</td></tr><tr><td><strong>State</strong></td><td></td></tr><tr><td>status</td><td>Envelope status can be: <code>draft</code>, <code>sent</code>, <code>waiting</code>, <code>completed</code>, <code>expired</code>, <code>rejected</code></td></tr><tr><td>date</td><td>Status change date</td></tr><tr><td>roleId</td><td>Role identifier</td></tr><tr><td><strong>Info</strong></td><td></td></tr><tr><td>subject</td><td>Envelope subject</td></tr><tr><td>message</td><td>Short message about envelope</td></tr><tr><td>expire</td><td>Envelope expiration date – through how many days the envelope will be expired</td></tr><tr><td><strong>Documents</strong></td><td></td></tr><tr><td>document id</td><td>Document identifier</td></tr><tr><td>dynamic fields</td><td>Dynamic field which filled by current role</td></tr><tr><td><strong>Flow</strong></td><td></td></tr><tr><td>role id</td><td>Role identifier</td></tr><tr><td>mailboxUuid</td><td>Role mailboxUUID</td></tr><tr><td>active</td><td>Role status – can be true or false</td></tr><tr><td>completed</td><td>Document processing status by role. Can be true or false</td></tr></tbody></table>

### Dynamic Fields attributes

#### Text, Number, Currency, Date, Dropdown Fields

| *\<field name=”string”>value\</field>* |
| -------------------------------------- |

* **name** — string, name of the field you want to fill
* **value** — the value of the field, all validation restrictions configurable on template, mandatory if field doesn’t have optional attribute

Several values as additional tags inside field tag.

#### Duplicate, Lookup and Autonumber Fields

If the template contains these field types, you do not need to send them. They are filled in automatically.

#### Dictionary Field

| *\<field name=”string” recordUuid=”UUID”>value\</field>* |
| -------------------------------------------------------- |

* **name** — string, name of the field you want to fill
* **recordUuid** — UUID, record UUID from dictionary you want to chose
* **value** — the value of the field, all validation restrictions configurable on template, optional, but if you define value verification of recordUUID and value happen

#### Signature Field

| *\<field name=”string”>value\</field>* |
| -------------------------------------- |

* **name** — string, name of the field you want to fill
* **value** — the value of the field, value in base64 format ([data:image/png;base64,iVBORw…K5CYII=](data:image/png;base64,iVBORw...K5CYII=)), all validation restrictions configurable on template, mandatory

#### Checkbox Field

| *\<field name=”string”>value\</field>* |
| -------------------------------------- |

* **name** — string, name of the field you want to fill
* **value** — integer, value 1 to mark it checked, if you don’t want to send value use optional field and skip fill in of particular one, all validation restrictions configurable on template

#### Choice Field

| *\<field name=”string”>value\</field>* |
| -------------------------------------- |

* **name** — string, name of the GROUP of radio buttons
* **value** — string, name of the field from the GROUP of radio buttons which should be marked as chosen

#### Table Field

```
<fieldgroup name="string">
    <fieldset index="0">
        <field name="Text 2">1</field>
    </fieldset>
    <fieldset index="1">
        <field name="Text 2">2</field>
    </fieldset>
</fieldgroup>
```

* **fieldgroup name** — string, name of the table field
* **fieldset index** — integer, index of the table row (if you need more rows, just create more fieldsets)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/envelope/envelope-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
