> For the complete documentation index, see [llms.txt](https://docs.autentique.com.br/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autentique.com.br/api/mutations/movendo-documento-para-pasta.md).

# Moving document to a folder

To move a document to a folder, use the following *mutation:*

```graphql
mutation {
  moveDocumentToFolder(
    document_id: "DOCUMENT_ID",
    folder_id: "FOLDER_DESTINATION_ID"
  )
}
```

And finally, testing this mutation in [Altair](https://altair.autentique.com.br):

<figure><img src="/files/lfXMqzSWi587UrxoMmNS" alt=""><figcaption></figcaption></figure>

If your document is already in a folder, you need to provide the parameter corresponding to its current folder using the `current_folder_id` attribute.

```graphql
mutation {
  moveDocumentToFolder(
    document_id: "DOCUMENT_ID",
    current_folder_id: "CURRENT_FOLDER_ID",
    folder_id: "FOLDER_DESTINATION_ID"
  )
}
```

If you need to file a document into a **group** or **organization** folder, you'll also need to use the `context` attribute.

<pre class="language-graphql"><code class="lang-graphql"><strong>mutation {
</strong>  moveDocumentToFolder(
    document_id: "DOCUMENT_ID",
    folder_id: "FOLDER_DESTINATION_ID",
    context: ORGANIZATION # For organization folders, GROUP for group folders
  )
}
</code></pre>

Lastly, to remove a document from a folder, set `folder_id` to `null`.

```graphql
mutation {
  moveDocumentToFolder(
    document_id: "DOCUMENT_ID",
    folder_id: null
  )
}
```

{% 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 %}

{% file src="/files/-M03o9cE5QB3vLoPUlzJ" %}
Para importar e usar no Postman
{% endfile %}
