Register a self-employed person
curl --request POST \
--url https://api.melso.ai/v1/partner/incorporations/autonomo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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",
"start_date": "2026-12-15",
"postal_code": "08018"
}
'import requests
url = "https://api.melso.ai/v1/partner/incorporations/autonomo"
payload = {
"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",
"start_date": "2026-12-15",
"postal_code": "08018"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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',
start_date: '2026-12-15',
postal_code: '08018'
})
};
fetch('https://api.melso.ai/v1/partner/incorporations/autonomo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "7c6b5a4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
"external_id": "ws_48215",
"type": "autonomo",
"status": "requested",
"owner": {
"name": "Lucía Martín Pérez",
"email": "lucia@example.com",
"tax_id": "00000000T"
},
"activity": "Restaurante de cocina mediterránea",
"company_id": null,
"created_at": "2026-12-01T09:30:00Z",
"updated_at": "2026-12-01T09:30:00Z",
"completed_at": null
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}Incorporations
Register a self-employed person
Asks Melso’s team to register the owner as self-employed, with the AEAT and the Social Security.
POST
/
partner
/
incorporations
/
autonomo
Register a self-employed person
curl --request POST \
--url https://api.melso.ai/v1/partner/incorporations/autonomo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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",
"start_date": "2026-12-15",
"postal_code": "08018"
}
'import requests
url = "https://api.melso.ai/v1/partner/incorporations/autonomo"
payload = {
"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",
"start_date": "2026-12-15",
"postal_code": "08018"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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',
start_date: '2026-12-15',
postal_code: '08018'
})
};
fetch('https://api.melso.ai/v1/partner/incorporations/autonomo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "7c6b5a4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
"external_id": "ws_48215",
"type": "autonomo",
"status": "requested",
"owner": {
"name": "Lucía Martín Pérez",
"email": "lucia@example.com",
"tax_id": "00000000T"
},
"activity": "Restaurante de cocina mediterránea",
"company_id": null,
"created_at": "2026-12-01T09:30:00Z",
"updated_at": "2026-12-01T09:30:00Z",
"completed_at": null
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}Early access. Your firm’s owner or an admin creates partner keys in Settings › Developers. See Partner API.
incorporations:write. Send an Idempotency-Key. The answer is 202 with the incorporation, requested. Melso’s team writes to owner.email for what needs the owner, such as their digital certificate to file the alta. Once the business has its NIF, the incorporation is completed and company_id names its new company: from then on, call the Melso API with it. Follow it with Get an incorporation.
A business that already has its NIF does not need this: use Create a company.Authorizations
A partner key of your firm, mk_live_…, which reaches every company of
the firm. Each key carries the permissions chosen when it was created.
Keep it on your servers. See Authentication.
Headers
Body
application/json
Response
The incorporation, requested.