Skip to main content
POST
Create an employee
Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
Without a profile the employee is saved and each month’s payroll lists them as incomplete. Melso’s professionals do the Social Security registration.

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.

Headers

Idempotency-Key
string

A unique key of yours, such as a UUID, that makes a retried create safe. For 24 hours a retry with the same key and body gets the first answer again, with Idempotent-Replayed: true. The same key with another body answers 422 idempotency_key_reused; while the first request runs, 409 idempotency_key_in_use. A 5xx answer is not kept, so its retry runs again. See Conventions.

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

Full name, as on the DNI or NIE.

Maximum string length: 200
start_date
string<date>
required

The day the contract starts.

end_date
string<date> | null

The agreed end of a fixed-term contract.

profile
object

The contract terms and the modelo 145. Send only what the person confirmed.

Response

The employee.

id
string<uuid>
required
name
string
required
start_date
string<date>
required
active
boolean
required
end_date
string<date> | null
settled_on
string<date> | null

The day an approved month's settlement (finiquito) ended the contract.

incomplete
string[]

What the payroll still needs from this employee.

profile
object

The contract terms and the modelo 145. Send only what the person confirmed.