> For the complete documentation index, see [llms.txt](https://docs.zapsign.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapsign.com.br/facilitadores/sdks/sdk-em-go/requisicoes-para-documentos/inserir-documento-extra.md).

# Inserir documento extra

Aqui nessa página você encontrará informações da requisição para criação de um documento extra a um documento já existente aqui na Zapsign.

## Visão geral:

Na SDK em Go, temos o arquivo '**add\_extra\_doc\_test.go**' no diretório do projeto **SdkGo** na Zapsign! Confira o diretório clicando [aqui](<  https://github.com/ZapSign/SdkGo>).&#x20;

Ao entrar no projeto, podemos ver claramente que existe uma estrutura de testes automatizados para cada requisição da Zapsign na pasta "**tests**". Para acessar o teste de criação de um documento extra, basta navegar em **"tests/docs/add\_extra\_doc\_test.go".**

![](https://3085168645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4noMoX5ZGb2-RhWjjf-887967055%2Fuploads%2FNMj3RTwo9JoUe1nGliyH%2Fimage.png?alt=media\&token=173f6afa-8f59-4f96-a060-ef40d6556e63)

Para que esse teste consiga ter um [retorno 200](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200) e com sucesso, precisamos de algumas configurações essenciais.

* Um API Token.&#x20;
  * Descubra como achar seu [API Token](https://docs.zapsign.com.br/).
  * [Adicione seu API Token no projeto](https://docs.zapsign.com.br/facilitadores/sdks/sdk-em-go/definindo-configuracoes/adicionando-api-token.md)

* Um documento principal já criado na Zapsign. Veja como podemos criar um [documento na Zapsign utilizando a API.](https://docs.zapsign.com.br/documentos/criar-documento)

* O Body da requisição

  * Navegue até "**models/extradoc.go"**
    * Configure como você quer que seu extra documento seja criado. Veja mais detalhes nesse link de como criar um [documento extra utilizando a API](https://docs.zapsign.com.br/documentos/adicionar-anexo-documento-extra).

  <figure><img src="https://3085168645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4noMoX5ZGb2-RhWjjf-887967055%2Fuploads%2F2ligXglX59Iom2c2Wqqb%2FCaptura%20de%20tela%20de%202023-02-09%2015-14-50.png?alt=media&amp;token=74ecd142-4480-4541-ad8b-4b01026969e3" alt=""><figcaption></figcaption></figure>

Após toda a configuração do seu [API Token](https://docs.zapsign.com.br/) e um token de um documento principal, basta rodar o teste automatizado que o documento extra seja anexado ao documento principal.&#x20;

<figure><img src="https://3085168645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4noMoX5ZGb2-RhWjjf-887967055%2Fuploads%2FGIg191CPcqyUrPkW8vpk%2FCaptura%20de%20tela%20de%202023-02-09%2015-18-39.png?alt=media&amp;token=ca9bf67d-7922-4084-9a6c-a34d8bce74f3" alt=""><figcaption><p>Sucesso ao criar um documento extra</p></figcaption></figure>

Pronto! A requisição foi realizada com sucesso e o documento extra foi anexado ao documento principal!  Fácil, né? 😁

Ficou alguma dúvida ou tem alguma sugestão de melhoria? Nos contate [aqui](https://zapsign.com.br/contato/).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zapsign.com.br/facilitadores/sdks/sdk-em-go/requisicoes-para-documentos/inserir-documento-extra.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
