# Reorder Documents in an Envelope

## Reorder documents

<mark style="color:blue;">PUT</mark> `https://api.zapsign.com.br/api/v1/docs/{doc_token}/document-display-order/`

#### Conditions

* The document identified by `doc_token` must be an **envelope** (i.e., a document that groups multiple files).
* The envelope must be **in progress**.
* You must include **all** the document tokens that are part of the envelope, in the desired order. These tokens are available in the response when the document is created or from the document details.

#### Path Parameters

<table><thead><tr><th width="180">Name</th><th width="137.52203369140625">Type</th><th>Description</th></tr></thead><tbody><tr><td>doc_token</td><td>string</td><td>Document token</td></tr></tbody></table>

#### Headers

<table><thead><tr><th width="151.21807861328125">Name</th><th width="114.2691650390625">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td><p>apiToken ahead of the "Bearer" text. </p><p>Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23</p></td></tr></tbody></table>

#### Body

<table><thead><tr><th width="167.09869384765625">Field</th><th width="137.719482421875">Type</th><th>Description</th></tr></thead><tbody><tr><td>document_display_order</td><td>array of string</td><td>Ordered list of document tokens indicating the new display order.</td></tr></tbody></table>

Body&#x20;

```json
{
  "document_display_order": [
    "6a4c7b7d-433e-4faf-a4b1-1f96bbf72c68",    
    "09d983a1-7c26-472a-a2ef-8ee10470b5ed",
    "9f8c63bb-eb1b-461d-8ede-0ae90d75c18a"
  ]
}

```

{% tabs %}
{% tab title="200 Success." %}

```javascript
{
    "message": "Document successfully updated"
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.zapsign.com.br/english/documentos/update-document/reorder-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.
