> ## Documentation Index
> Fetch the complete documentation index at: https://docs.melso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Melso MCP: https://mcp.melso.ai/mcp (OAuth; one company per connection). Documentation-search MCP: https://docs.melso.ai/mcp; it does not act on customer accounts. Melso API: https://api.melso.ai/v1, with a company API key or a partner key (early access); invoicing is live and the other operations are marked beta.
>
> Use the live tool list and respect company membership. Ask the person to approve the exact invoice or tax return version in the signed-in app. Melso's professionals prepare and file included returns after approval; an AI assistant does not file. A prepared file or an approval is not evidence of filing: only the AEAT's reference and receipt are. Keep credentials out of chat and logs.

# Show taxes and receipts

> Show a company's tax calendar, its returns with their live amounts, and the AEAT receipt of each filed return.

> [!WARNING]
>
> **Beta.** Melso does not serve these endpoints yet, and their fields can still
> change.

> [!NOTE]
>
> These calls work with a company key in its own company, or with a
> [partner key](https://docs.melso.ai/api/partner/acting-for-companies.md) in any company of the firm.
> `$MELSO_API_KEY` is either one.

Melso recalculates each return as the books change, so your customer sees the
amount long before the deadline. Three calls cover a taxes screen.

## What is due

```bash theme={null}
curl https://api.melso.ai/v1/companies/$COMPANY_ID/tax-calendar \
  -H "Authorization: Bearer $MELSO_API_KEY"
```

Each obligation has its `model`, `period`, `due_date`, `status` and, once
Melso started it, its `tax_return_id`.

## The returns

```bash theme={null}
curl "https://api.melso.ai/v1/companies/$COMPANY_ID/tax-returns?year=2026" \
  -H "Authorization: Bearer $MELSO_API_KEY"
```

| `status` | Meaning |
| - | - |
| `draft` | Recalculated from the books while its period is open. `amount` is the live estimate. |
| `approved` | The owner confirmed it. It waits to be filed. |
| `filed` | Filed with the AEAT. `filing` holds the reference, the CSV and the receipt. |

A negative `amount` is a refund or an amount to offset.

> [!NOTE]
>
> Show a return as filed only when `filing.reference` is present.

## The receipt

```bash theme={null}
curl https://api.melso.ai/v1/companies/$COMPANY_ID/tax-returns/$TAX_RETURN_ID/receipt \
  -H "Authorization: Bearer $MELSO_API_KEY" \
  -o justificante.pdf
```

The AEAT receipt (justificante), as a PDF.

## Who confirms a return

A person of the company authorizes the exact version of each return before
Melso files it. Create the link and open it for them:

```bash theme={null}
curl -X POST https://api.melso.ai/v1/companies/$COMPANY_ID/tax-returns/$TAX_RETURN_ID/approval-link \
  -H "Authorization: Bearer $MELSO_API_KEY"
```

Melso's professionals then review the return and file it. No API call files or
pays a return.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.