# Transferindo um Documento

Para transferir um documento, você pode utilizar a seguinte *mutation*.

```graphql
mutation {
  transferDocument(
    id: "ID_DO_DOCUMENTO",
    organization_id: "ID_DA_ORGANIZACAO",
    group_id: "ID_DO_GRUPO"
  )
}
```

#### Parâmetros

* `id`: String (UUID!), que representa o identificador único do documento.
* `organization_id`: Int! , que representa o identificador da organização que receberá o documento.
* `group_id`: Int!, que representa o identificador do grupo que receberá o documento.

Também é possível atribuir os seguintes parâmetros opcionais:

* `current_group_id`: Int, que representa o identificador do grupo atual do documento, caso este pertença a um.
* `context`: ContextEnum (`USER`, `GROUP` ou `ORGANIZATION`), que representa o contexto em que o documento está.

#### Resposta esperada:

```graphql
{
  "data": {
    "transferDocument": true
  }
}
```

{% hint style="info" %}
Você pode conferir o que é cada um desses parâmetros direto na documentação completa da API GraphQL, no menu Docs do [Altair](https://altair.autentique.com.br). Se você não sabe como fazer isso, confira o nosso tutorial em [Usando o Altair](/api/2/integracao/altair.md).
{% endhint %}

{% hint style="info" %}
Se o Altair não te ajuda para integrar com a API, confira alguns exemplos de como fazer essas requisições de outra forma: <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/2/mutations/transferindo-um-documento.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.
