Approve a tax return
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/tax-returns/{tax_return_id}/approval \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": "9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f",
"approved_by": {
"name": "Lucía Martín Pérez",
"email": "lucia@brasanorte.example",
"tax_id": "00000000T",
"role": "administrator"
},
"approved_at": "2027-01-14T17:32:08Z",
"ip": "203.0.113.24",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15",
"reference": "apv_000184"
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/tax-returns/{tax_return_id}/approval"
payload = {
"version": "9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f",
"approved_by": {
"name": "Lucía Martín Pérez",
"email": "lucia@brasanorte.example",
"tax_id": "00000000T",
"role": "administrator"
},
"approved_at": "2027-01-14T17:32:08Z",
"ip": "203.0.113.24",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15",
"reference": "apv_000184"
}
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({
version: '9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f',
approved_by: {
name: 'Lucía Martín Pérez',
email: 'lucia@brasanorte.example',
tax_id: '00000000T',
role: 'administrator'
},
approved_at: '2027-01-14T17:32:08Z',
ip: '203.0.113.24',
user_agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15',
reference: 'apv_000184'
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/tax-returns/{tax_return_id}/approval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "5e4d3c2b-1a0f-4e9d-8c7b-6a5f4e3d2c1b",
"model": "303",
"period": "2026-Q4",
"status": "approved",
"amount": "2210.40",
"due_date": "2027-01-30",
"version": "9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f",
"approval": {
"method": "delegated",
"approved_at": "2027-01-14T17:32:08Z",
"approved_by": {
"name": "Lucía Martín Pérez",
"email": "lucia@brasanorte.example",
"role": "administrator"
},
"reference": "apv_000184"
},
"filing": null
}Tax returns
Approve a tax return
Records that the company’s owner or an administrator approved the exact version of a return in your product.
POST
/
companies
/
{company_id}
/
tax-returns
/
{tax_return_id}
/
approval
Approve a tax return
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/tax-returns/{tax_return_id}/approval \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": "9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f",
"approved_by": {
"name": "Lucía Martín Pérez",
"email": "lucia@brasanorte.example",
"tax_id": "00000000T",
"role": "administrator"
},
"approved_at": "2027-01-14T17:32:08Z",
"ip": "203.0.113.24",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15",
"reference": "apv_000184"
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/tax-returns/{tax_return_id}/approval"
payload = {
"version": "9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f",
"approved_by": {
"name": "Lucía Martín Pérez",
"email": "lucia@brasanorte.example",
"tax_id": "00000000T",
"role": "administrator"
},
"approved_at": "2027-01-14T17:32:08Z",
"ip": "203.0.113.24",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15",
"reference": "apv_000184"
}
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({
version: '9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f',
approved_by: {
name: 'Lucía Martín Pérez',
email: 'lucia@brasanorte.example',
tax_id: '00000000T',
role: 'administrator'
},
approved_at: '2027-01-14T17:32:08Z',
ip: '203.0.113.24',
user_agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15',
reference: 'apv_000184'
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/tax-returns/{tax_return_id}/approval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "5e4d3c2b-1a0f-4e9d-8c7b-6a5f4e3d2c1b",
"model": "303",
"period": "2026-Q4",
"status": "approved",
"amount": "2210.40",
"due_date": "2027-01-30",
"version": "9b2f4e6a8c0d1e3f5a7b9c1d3e5f7a9b2c4d6e8f0a1b3c5d7e9f1a2b4c6d8e0f",
"approval": {
"method": "delegated",
"approved_at": "2027-01-14T17:32:08Z",
"approved_by": {
"name": "Lucía Martín Pérez",
"email": "lucia@brasanorte.example",
"role": "administrator"
},
"reference": "apv_000184"
},
"filing": null
}Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
taxes:write. Only a partner key of a firm Melso has enabled for delegated approval; any other key answers 403 delegated_approval_not_enabled. When the company approves in Melso instead, create an approval link.
Send the version you showed the approver. If the return changed since, the answer is 409 version_changed with current_version: show the new return and ask again. approved_by must be an owner or administrator Melso has for the company, or the answer is 422 approver_not_recognized. Keep your own evidence of the approval and send its reference.
The answer is the return, approved. Melso’s professionals then file it with the administration; the API never files it. Show it as filed only once filing.reference is present.Authorizations
companyApiKeypartnerApiKey
A company API key, mk_live_…, that the company's owner creates in the
Melso app under Settings, Connect your AI, API keys. It works in that
one company with the owner's authority. Test keys (mk_test_…) are not
issued. Keep the key on your servers. See
Authentication.
Path Parameters
Body
application/json
Response
The return, approved.