Skip to main content
POST
Create or update a customer
Live capability. Melso runs this in production today. Partner keys reach it once your partner account is enabled. See Availability.
Updating a customer never changes an invoice already issued to it: an invoice keeps the customer’s name and tax ID as they were when it was drafted.

Authorizations

Authorization
string
header
required

Your partner secret key, mk_live_… for real companies or mk_test_… for test companies. Keep it on your servers. See Authentication.

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes a retried create safe. Reusing a key with a different body is refused.

Maximum string length: 255

Path Parameters

company_id
string<uuid>
required

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

Body

application/json
name
string
required
Required string length: 1 - 300
kind
enum<string>
required

company for a business, professional for an autónomo, individual for a consumer.

Available options:
company,
professional,
individual
id
string<uuid>

Send it to update that customer instead of creating one.

tax_id
string

NIF or CIF. Required unless kind is individual. One customer per tax ID and country.

country
string
default:ES

ISO 3166-1 alpha-2. Melso invoices customers in Spain (ES) today.

address
string
email
string<email>

Where the issued invoice is emailed.

Response

The updated customer.

id
string<uuid>
required
name
string
required
country
string
required
kind
enum<string>
required

company for a business, professional for an autónomo, individual for a consumer.

Available options:
company,
professional,
individual
created_at
string<date-time>
required
tax_id
string
address
string
email
string