# Editing a document

After creating the document, you can still edit some of its settings. The mutation for updating the document is shown below:

```graphql
mutation (
  $id: UUID!,
  $document: UpdateDocumentInput! 
) {
  updateDocument(id: $id, document: $document) {
    id
    name
    message
    reminder
    refusable
    sortable
    stop_on_rejected
    new_signature_style
    show_audit_page
    expiration_at
    deadline_at
    email_template_id
    footer
    cc
    configs {
      notification_finished
      notification_signed
      signature_appearance
    }
    created_at
   }
}
```

**Parameters:**

* `id`: A `String` (UUID!) that represents the unique identifier of the document you want to edit.
* `document`: An object (`UpdateDocumentInput!`) that contains the details of the properties you want to update in the document.

Next, you’ll need to assign values to the variables declared in the mutation using a JSON structure.\
Example of variable values for the *mutation*:

```json
{
  "id": "DOCUMENT_ID",
  "document": {
      "name": "DOCUMENT_NAME",
      "message": "Custom message sent to the signer's email",
      "reminder": "WEEKLY",
      "sortable": true, 
      "footer": "BOTTOM", 
      "refusable": true,
      "new_signature_style": true, 
      "show_audit_page": false, 
      "ignore_cpf": true, 
      "email_template_id": 1234, 
      "deadline_at": "2023-11-24T02:59:59.999Z",
      "cc": [
        { "email": "email-cc-1@tuamaeaquelaursa.com" },
        { "email": "email-cc-2@tuamaeaquelaursa.com" }
      ],
      "expiration": {
        "days_before": 7,
        "notify_at": "20/01/2026"
    }
  }
}
```

#### UpdateDocumentInput:

The following table describes the fields that can be included in the `UpdateDocumentInput` object.

<table><thead><tr><th width="218">Field</th><th width="232.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>The new name for your document</td></tr><tr><td>message</td><td>String</td><td>A custom message that will be sent to the signers' email addresses.</td></tr><tr><td>reminder</td><td>'DAILY' | 'WEEKLY'</td><td>Defines the frequency of e-mail reminders</td></tr><tr><td>refusable</td><td>Boolean</td><td>If true, allows the signers to refuse to sign a document.</td></tr><tr><td>ignore_cpf</td><td>Boolean</td><td>Removes the requirement to provide a CPF (Brazilian ID number) to sign.</td></tr><tr><td>stop_on_rejected</td><td>Boolean</td><td>Prevents others from signing if the document has been declined.</td></tr><tr><td>scrolling_required</td><td>Boolean</td><td>Only allows signing if the signer has viewed all pages of the document.</td></tr><tr><td>sortable</td><td>Boolean</td><td>Signers must sign in the order defined in the "signers" array.</td></tr><tr><td>new_signature_style</td><td>Boolean</td><td>If true, enables the use of an updated signature style.</td></tr><tr><td>show_audit_page</td><td>Boolean</td><td><p>Prevents the creation of the final audit page.</p><p>Requires "new_signature_style": true</p></td></tr><tr><td>expiration</td><td><a data-mention href="#expirationinput">#expirationinput</a></td><td>Sends an expiration reminder to the signers.</td></tr><tr><td>footer</td><td>'BOTTOM' | 'LEFT' | 'RIGHT'</td><td>Defines the position of the footer in the document.</td></tr><tr><td>cc</td><td>[ String! ]</td><td>Sends an email notification when the document is signed by all signers.</td></tr><tr><td>configs</td><td><a data-mention href="#documentconfiginput">#documentconfiginput</a></td><td>Other document settings.</td></tr><tr><td>deadline_at</td><td>String</td><td><p>Date in ISO 8601 format, such as "YYYY-MM-DDTHH:MM:SS.SSSZ".</p><p>The deadline for signing the document.</p></td></tr></tbody></table>

#### ExpirationInput

Object within `UpdateDocumentInput` that contains information about the document’s expiration.

<table><thead><tr><th width="186">Field</th><th width="94.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>days_before</td><td>Int!</td><td>Number of days before expiration to send the notification.</td></tr><tr><td>notify_at</td><td>Date!</td><td>Document expiration date.</td></tr></tbody></table>

#### DocumentConfigInput

Sub-object within `UpdateDocumentInput` for additional settings.

| Field                  | Type                                              | Description                                                      |
| ---------------------- | ------------------------------------------------- | ---------------------------------------------------------------- |
| notification\_finished | Boolean                                           | Enables document completion notification                         |
| notification\_signed   | Boolean                                           | Sends an email to the signer when they sign                      |
| signature\_appearance  | 'DRAW' \| 'HANDWRITING' \| 'ELETRONIC' \| 'IMAGE' | Forces the appearance of signatures to match the selected option |
| lock\_user\_data       | Boolean                                           | Does not update user data                                        |

{% hint style="info" %}
You can check what each of these parameters means directly in the full GraphQL API documentation, in the Docs menu of [Altair](https://altair.autentique.com.br/). If you're not sure how to do that, check out our tutorial on [**Using Altair**](/api/integration-basics/altair.md).
{% endhint %}

{% hint style="info" %}
If Altair doesn't help you integrate with the API, check out some examples of how to make these requests in other ways: <https://graphql.org/graphql-js/graphql-clients/>
{% endhint %}


---

# 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.autentique.com.br/api/mutations/editing-a-document.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.
