---
title: "Download the AEAT upload file or the PDF of a generated form (binary attachment)"
method: POST
path: "/api/forms/export"
---

# Download the AEAT upload file or the PDF of a generated form (binary attachment)

`POST /api/forms/export`

## Request

- Base URL: `https://declararfacil.com`
- URL: `https://declararfacil.com/api/forms/export`
- Auth: HTTP bearer

## Request body

- ExportInput
  - `modelo` '303' | '130', required
  - `format` 'aeat' | 'pdf', required
  - `year` integer
  - `quarter` integer

## Response `200`

OK

## Other responses

- `401`: invalid_token: unknown or replaced token; start a new connection with POST /api/agent/v1/connect
- `402`: subscription_required: no active subscription; the body carries subscribe_url, steps, next_step and tell_the_user

---

[API](https://skmtc.dev/declararfacil/apis/declarar-facil-agent-api.md) · [All operations](https://skmtc.dev/declararfacil/apis/declarar-facil-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/declararfacil/apis/declarar-facil-agent-api/revisions/6d6837a48359?raw)
