> 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/integration-basics/sandbox-testes.md).

# Sandbox/tests

For context, we recommend reading how document creation and listing work first:

{% content-ref url="/pages/-LsYgNLWMNqAlDnd53uc" %}
[Creating a document](/api/mutations/criando-um-documento.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LsYgEpXilJyyGsfTnN1" %}
[Retrieving documents](/api/queries/resgatando-documentos.md)
{% endcontent-ref %}

### Creating Sandbox documents

Creating test documents only depends on a single attribute to be set in the document: `"sandbox"`.

```javascript
mutation CreateDocumentMutation(
  ...
) {
  createDocument(
    sandbox: true,
    document: $document,
    signers: $signers,
    file: $file
  ) {
  ...
  }
}
```

Done! Documents created with `"sandbox"` won’t consume credits, but since they are test documents, they will be deleted after a few days.

Until they are deleted, you can view them in the document listings on the dashboard if you enable the following option on the API keys page:

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

### Retrieving Sandbox Documents

Just like in the dashboard, the document listing does **not** return sandbox documents by default.

To include them, you need to enable two specific flags.

**Enabling sandbox document listing**

To allow the listing to return documents created in sandbox mode, add the `showSandbox` flag in the query parameters:

```graphql
query {
  documents(
    limit: 60, 
    page: 1,
    showSandbox: true
  ) {
  ...
  }
}
```

**Listing only sandbox documents**

You can also retrieve **only** the documents created in sandbox mode. To do that, add the `onlySandbox` flag in the query parameters:

```graphql
query {
  documents(
    limit: 60, 
    page: 1,
    onlySandbox: true
  ) {
  ...
  }
}
```

{% hint style="info" %}
You can check what each of these parameters means directly in the full GraphQL API documentation, under the **Docs** tab in Altair. Not sure how to access it? Check out our tutorial: **Usando o Altair**.
{% endhint %}

{% hint style="warning" %}
If you're unsure how to send a document in your integration, this repository provides more information and examples on how to handle file uploads:

<https://github.com/jaydenseric/graphql-multipart-request-spec>
{% endhint %}

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