Upload a certificate
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/certificate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "MIIKvAIBAzCCCnYGCSqGSIb3DQEHAaCCCmcEggpjMIIKXzCCBQ8GCSqGSIb3...",
"password": "your-certificate-password"
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/certificate"
payload = {
"file": "MIIKvAIBAzCCCnYGCSqGSIb3DQEHAaCCCmcEggpjMIIKXzCCBQ8GCSqGSIb3...",
"password": "your-certificate-password"
}
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({
file: 'MIIKvAIBAzCCCnYGCSqGSIb3DQEHAaCCCmcEggpjMIIKXzCCBQ8GCSqGSIb3...',
password: 'your-certificate-password'
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/certificate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "valid",
"holder_name": "LUCIA MARTIN PEREZ",
"holder_tax_id": "00000000T",
"represents_tax_id": "B00000000",
"expires_at": "2028-03-14",
"uploaded_at": "2026-12-01T10:12:40Z"
}Digital certificate
Upload a certificate
Uploads the digital certificate Melso files the company’s taxes with, from your own system.
POST
/
companies
/
{company_id}
/
certificate
Upload a certificate
curl --request POST \
--url https://api.melso.ai/v1/companies/{company_id}/certificate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "MIIKvAIBAzCCCnYGCSqGSIb3DQEHAaCCCmcEggpjMIIKXzCCBQ8GCSqGSIb3...",
"password": "your-certificate-password"
}
'import requests
url = "https://api.melso.ai/v1/companies/{company_id}/certificate"
payload = {
"file": "MIIKvAIBAzCCCnYGCSqGSIb3DQEHAaCCCmcEggpjMIIKXzCCBQ8GCSqGSIb3...",
"password": "your-certificate-password"
}
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({
file: 'MIIKvAIBAzCCCnYGCSqGSIb3DQEHAaCCCmcEggpjMIIKXzCCBQ8GCSqGSIb3...',
password: 'your-certificate-password'
})
};
fetch('https://api.melso.ai/v1/companies/{company_id}/certificate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "valid",
"holder_name": "LUCIA MARTIN PEREZ",
"holder_tax_id": "00000000T",
"represents_tax_id": "B00000000",
"expires_at": "2028-03-14",
"uploaded_at": "2026-12-01T10:12:40Z"
}Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
certificates:write. Send the .p12 or .pfx file in base64, at most 1 MB, and its password. Melso uses the password only to read the certificate and store it encrypted, and never returns it or the file.
Melso checks the holder. A self-employed person’s certificate must be of their own NIF. A company’s must be a representative certificate for its CIF, a certificate whose holder is the CIF, or the personal certificate of a current administrator. A company without its NIF yet answers 409 tax_id_missing.
Melso keeps every valid certificate it receives and files with the one that expires last. When the owner should upload it themselves instead, create a certificate link.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 certificate status, with the certificate Melso now files with.