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

# Incorporate a business

> Ask Melso's team to incorporate a new S.L. or register someone as self-employed, and get the company once it has its NIF.

Use this guide when your customer's business does not exist yet. Melso's team
does the paperwork with the owner. When the business has its NIF, Melso
creates its company for you.

If the business already has a NIF, skip this and
[create the company](https://docs.melso.ai/api/partner/guides/existing-business.md).

| Call | What Melso's team does |
| - | - |
| [Incorporate an S.L.](https://docs.melso.ai/api/partner/reference/create-sl-incorporation.md) | Incorporates a new S.L. with the owner as sole partner: the name certificate, the deed before a notary and the registrations. |
| [Register a self-employed person](https://docs.melso.ai/api/partner/reference/create-autonomo-registration.md) | Registers the owner as self-employed with the AEAT and the Social Security. |

## 1. Send the request

> [tab] S.L.
>
> ```bash theme={null}
> curl https://api.melso.ai/v1/partner/incorporations/sl \
>   -H "Authorization: Bearer $MELSO_PARTNER_KEY" \
>   -H "Idempotency-Key: incorporation-ws_48215" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "external_id": "ws_48215",
>     "owner": {
>       "name": "Lucía Martín Pérez",
>       "email": "lucia@example.com",
>       "tax_id": "00000000T"
>     },
>     "activity": "Restaurante de cocina mediterránea",
>     "proposed_names": ["Brasa Sur", "Brasa Sur Mediterránea"],
>     "share_capital": "3000",
>     "postal_code": "08018"
>   }'
> ```

> [tab] Self-employed
>
> ```bash theme={null}
> curl https://api.melso.ai/v1/partner/incorporations/autonomo \
>   -H "Authorization: Bearer $MELSO_PARTNER_KEY" \
>   -H "Idempotency-Key: registration-ws_48216" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "external_id": "ws_48216",
>     "owner": {
>       "name": "Lucía Martín Pérez",
>       "email": "lucia@example.com",
>       "tax_id": "00000000T"
>     },
>     "activity": "Restaurante de cocina mediterránea",
>     "start_date": "2026-12-15",
>     "postal_code": "08018"
>   }'
> ```

Melso answers `202` with the incorporation, `requested`.

| Field | Notes |
| - | - |
| `owner` | `name`, `email` and `tax_id` (DNI or NIE), and optionally `phone`. For an S.L., the owner is its sole partner and administrator. |
| `activity` | What the business will do, in plain words. Melso's team picks the IAE heading and the CNAE. |
| `proposed_names` | S.L. only. One to five names, in order of preference, for the name certificate. |
| `share_capital` | S.L. only. Whole euros, as a string. The legal minimum is `1`; `3000` is usual. |
| `start_date` | Self-employed only. The day the activity starts. |
| `postal_code` | Where the business will be. It sets the tax territory. |

## 2. Melso works with the owner

Melso's team does the paperwork. Some steps need the owner, and the
incorporation tells you which one with `action_required`:

| `action_required` | What the owner does |
| - | - |
| `identity_verification` | [Verifies their identity](https://docs.melso.ai/api/partner/guides/identity.md) with a document and a selfie. |
| `documents` | Sends a document Melso's team asked for by email. |
| `bank_deposit` | S.L. only. Deposits the share capital and sends the bank certificate. |
| `notary_signature` | S.L. only. Signs the deed before the notary on the booked date. |

You get [`incorporation.action_required`](https://docs.melso.ai/api/partner/webhooks) each time, so
you can prompt the owner inside your product. Melso's team also writes to
`owner.email`.

| `status` | Meaning |
| - | - |
| `requested` | Received. Melso's team has not started yet. |
| `in_progress` | Melso's team is working with the owner. |
| `completed` | The business has its NIF. `company_id` names its company. |
| `cancelled` | It stopped. Nothing was created. |

### Fees

Melso's team agrees the incorporation's fees with your firm, and the notary's
and registry's fees with the owner, before it starts. Nothing is charged
through the API.

## 3. Pick up the company

[`incorporation.completed`](https://docs.melso.ai/api/partner/webhooks) carries the new
`company_id`. Without webhooks, poll
[Get an incorporation](https://docs.melso.ai/api/partner/reference/get-incorporation.md) at most every
few minutes.

```json theme={null}
{
  "id": "7c6b5a4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
  "type": "sl",
  "status": "completed",
  "company_id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f"
}
```

Store `company_id`. From here the company works like any other: complete its
[fiscal profile](https://docs.melso.ai/api/partner/guides/existing-business.md#2-complete-the-fiscal-profile)
and add its [digital certificate](https://docs.melso.ai/api/partner/guides/certificate.md).


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