> For the complete documentation index, see [llms.txt](https://docs.cange.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cange.me/api/arquivos/vincular-um-arquivo-em-um-cartao.md).

# Vincular um arquivo em um cartão

Depois que um arquivo é salvo no repositório central de arquivos do Cange, ele ganha um código de vinculação exclusivo (id\_attachment). A rota “Vincular um arquivo a um cartão” existe para que você associe esse arquivo a um cartão específico dentro de um fluxo de processo, mantendo tudo no mesmo contexto de execução.

Para buscar um arquivo através da API, você precisará ter um token de acesso. Se ainda não possui o seu token, consulte nosso guia abaixo sobre como obter o token de autenticação.

{% content-ref url="/pages/9WZ3PW4K1WSS8OpsOrjm" %}
[Autenticação](/api/autenticacao.md)
{% endcontent-ref %}

## Realizando a chamada para vincular um arquivo a um cartão

```http
https://api.cange.me/attachment/card
```

<mark style="color:green;">`POST`</mark> `/attachment/card`

Endpoint com o objetivo de vincular um arquivo a um cartão de um fluxo

**Headers**

| Name          | Value                       |
| ------------- | --------------------------- |
| Content-Type  | <kbd>application/json</kbd> |
| Origin        | `https://app.cange.me`      |
| Authorization | `Bearer <token de acesso>`  |

**Body**

| Name            | Type   | Description                     |
| --------------- | ------ | ------------------------------- |
| `attachment_id` | number | Código identificador do arquivo |
| `card_id`       | number | Código identificador do cartão  |
| `flow_id`       | number | Código identificador do fluxo   |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{}
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cange.me/api/arquivos/vincular-um-arquivo-em-um-cartao.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.
