# Send Envelope

### Send envelope

| Method        | POST                     |
| ------------- | ------------------------ |
| URL           | `/api/v1/envelope/send`  |
| Authorization | Bearer {token}           |
| content-type  | application/json         |
| mailboxUuid   | {uuid}                   |
| Body          | “{“”data””: “”string””}” |

To create and send an envelope you should know what template will be used for envelope creation.

### sendEnvelopeDto

```
{
    "data":"<envelope>
    templateUuid=\"56cacd6a-ffe7-4b77-9c0c-f928d9a18cb5\"
    status=\"DRAFT\"
    templateVersion=\"ab0d11cb-ebdd-42bd-a581-ddca1bb9b585\">
    <state>
            <message/>
    </state>
    <info>
            <subject>Envelope subject</subject>
            <message>Envelope message</message>
            <expire afterDays=\"30\" notifyIn=\"1\"/>
    </info>
    <flow>
            <roles>
                    <role id=\"23f20eec-adad-4325-b553-1bde4be29198\" mailboxUuid=\"9baec31c-e940-4894-b6d1-52033e1af66e\"/>
                    <role id=\"b811f2b6-1656-42aa-9420-a9b8addb0246\" mailboxUuid=\"42c95245-30c1-46ef-bd5b-a9a111deec10\"/>
            </roles>
    </flow>
    <documents>
            <document id=\"4a61f258-fd9d-406c-b47e-81c90d4e5c47\">
                    <field name=\"date field\">2020-12-02T10:20:10.846Z</field>
            </document>
    </documents>
</envelope>"
    }
```

#### RESPONSE

**Response returns envelope UUID:**

```
{"uuid":"89499ba2-287d-404c-87b0-342dc5b01b6a"}
```

You can check envelope status by this UUID.

### sendEnvelope

```
{"data":"
<envelope templateUuid=\"500afafd-711e-471a-a18f-24a89cd4ede3\" status=\"SENT\" templateVersion=\"143a2a4b-325e-4c05-a4c1-52f44e21b745\">
    <state>
        <message/>
    </state>
    <documents>
        <document id=\"ef247568-559a-4ec1-9ecc-6b44c9fb8215\">
            <field name=\"TEST template 2\">12312</field>
        </document>
        <document id=\"43d47e65-011d-4890-9eaf-c1c6d860b3b2\"/>
    </documents>
</envelope>","uuid":"3e8e9c87-09a1-4b5f-8f1a-2ea3049ed34e"}
```

All provided data will be filled to appropriated fields and when next recipient open this envelope this data will be shown.


---

# 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/send-envelope.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.
