> ## 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.
>
> 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.

# Melso API

> Run the Spanish tax and labour obligations of your platform's companies through one API: Melso calculates, a person approves, professionals file.

Spain's tax and labour administrations do not offer a modern API. Behind every
payroll, banking or invoicing product that serves Spanish companies there is
a team uploading files to the AEAT, the Sistema RED and the SEPE by hand, and
answering their notifications.

The Melso API is that team as an API. Your platform sends the facts it
already has (payslips, invoices, bank movements, employees). Melso turns them
into the returns, settlements and notifications the law requires, a person at
the company approves the exact version, and Melso's professionals file it under
the company's representation. You get the administration's reference and
receipt back.

<Note>
  The Melso API is in a design-partner phase. Each operation in the reference
  says whether Melso runs it in production today (**Live capability**) or whether
  it is a contract we are building with design partners (**Preview**). See
  [Availability](/api/availability).
</Note>

<CardGroup cols={3}>
  <Card title="HR and payroll platforms" icon="users" href="/api/solutions/hr-payroll">Altas and bajas, Social Security settlements, Contrat@, Certific\@2, modelos 111 and 190.</Card>
  <Card title="Business banking" icon="building-columns" href="/api/solutions/business-banking">Tax set-aside, receipt capture, reconciliation and quarterly returns for your business customers.</Card>
  <Card title="ERPs and invoicing software" icon="file-invoice" href="/api/solutions/erp-invoicing">VERI\*FACTU invoicing, books, VAT returns and corporate tax from the data you already hold.</Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Add the company">
    Create the company on your partner account and complete its fiscal profile, or
    send the company's owner to Melso's hosted onboarding. See
    [Companies and mandates](/api/companies).
  </Step>

  <Step title="Get its mandate">
    The company's legal representative signs a mandate that lets Melso's
    professionals act before the AEAT, the TGSS or the SEPE for the procedures
    listed. Nothing is filed without an active mandate.
  </Step>

  <Step title="Send what you already have">
    Invoices, expenses and documents, bank movements, employees and payroll runs.
    Melso categorizes, reconciles and keeps the books.
  </Step>

  <Step title="Melso calculates">
    Returns, settlements and notifications are calculated as the data arrives,
    with their deadlines in the company's tax calendar. You are told by webhook.
  </Step>

  <Step title="A person approves the exact version">
    The company's owner approves through Melso's approval page, or inside your
    product under a partner agreement. A changed version needs a new approval. See
    [Approvals and filing](/api/approvals).
  </Step>

  <Step title="Melso's professionals file">
    They file under the mandate and record the administration's reference and
    receipt, which you read from the API and receive by webhook.
  </Step>
</Steps>

## What it covers

| Area | Obligations | Availability |
| - | - | - |
| Invoicing | Invoices registered with VERI\*FACTU or TicketBAI, corrective invoices, PDF, delivery and payment link | Live capability |
| Bookkeeping | Expenses and income with AEAT category, document reading, bank statements and reconciliation, journal, imported VAT books | Live capability |
| Financial statements | Trial balance, profit and loss, balance sheet | Live capability |
| VAT and withholdings | 303, 390, 349, 347, 111, 115, 190 and 180 calculated; AEAT import file for 303, 130, 111 and 115 | Live capability |
| Income and corporate tax | 130 for autónomos; corporate tax 200 and its 202 instalments calculated from the books | Live capability |
| Procedures | Gestiones: registration as autónomo, incorporation and other procedures Melso's professionals carry out | Live capability |
| Tax set-aside | What to keep aside for the period's returns, as of today | Preview |
| Representation | Mandates before the AEAT, the TGSS and the SEPE, signed in a hosted flow | Preview |
| Payroll | Payroll runs from your platform feed the 111, the 190 and the withholding certificates | Preview |
| Social Security | Altas, bajas and variaciones through the Sistema RED; monthly contribution settlements with RNT and RLC | Preview |
| Employment | Contrat@ contract notifications and Certific\@2 company certificates to the SEPE | Preview |
| Administration mailbox | Electronic notifications from the AEAT, the TGSS and the DGT, summarized and turned into cases | Preview |
| Certificates | Up to date with the AEAT and the Social Security, census situation | Preview |
| Events | Signed webhooks for every state change above | Preview |

## Three rules the API keeps

1. **Preparation is not approval.** Melso and your platform prepare. Only a
   person at the company approves an invoice or a return, at an exact version.
2. **Approval is not filing.** Melso's professionals file an approved return
   under the company's mandate. A calculated return, an approval or an AEAT
   import file is not a filing.
3. **Only the administration's receipt proves a filing.** A filed return
   carries the administration's reference, its CSV and the receipt.

## Become a design partner

Design partners shape the preview contracts, get a test environment with test
companies, and go live module by module. Write to
[hello@melso.ai](mailto:hello@melso.ai) with the module you need first and the
number of companies you serve.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/api/quickstart">From a company to its first calculated return.</Card>
  <Card title="API reference" icon="code" href="/api/reference/invoices/create-invoice">Every operation with its fields and availability.</Card>
</CardGroup>


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