Skip to main content
POST
Upload a certificate
Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
Permission: 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

Authorization
string
header
required

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

company_id
string<uuid>
required

The company's ID. Every company-scoped call works in exactly this company.

Body

application/json
file
string
required

The .p12 or .pfx file in base64, at most 1 MB before encoding.

Maximum string length: 1398104
password
string
required
write-only

The certificate's password. Melso uses it only to read the certificate and store it encrypted, and never returns it.

Response

The certificate status, with the certificate Melso now files with.

status
enum<string>
required

expiring has under 30 days left.

Available options:
missing,
valid,
expiring,
expired
holder_name
string | null
holder_tax_id
string | null
represents_tax_id
string | null

The company a representative certificate represents.

expires_at
string<date> | null
uploaded_at
string<date-time> | null