Create or update a record
Write a record by an identifying property: the record whose matchOn property holds the value in fields is updated, or created when none does. Send the same call twice and you get one record. createFields are written only when the record is created, so a first stage or owner never overwrites what people have changed since. Requires scope: records:write.
The match is exact and reads committed data, so an upsert straight after a create finds it. Two upserts of the same value at once are serialised, not duplicated. When two or more records already hold the value the call fails with match_ambiguous and writes nothing; update the one you mean by its id. matchOn must be a text, email, phone or website property (match_property_invalid otherwise), and fields must include its value (match_value_missing). Fields behave exactly as on create: unknown keys come back in ignoredFields, and an unknown option label fails with option_not_found.
Authorizations
A Custral API key, created in Settings → Developers → Applications, sent as Authorization: Bearer sk_…. The X-Api-Key header is also accepted and takes precedence. Use a secret key (sk_…) from your server; a publishable key (pk_…) may hold only objects:read and usage:write. Never expose a secret key in a browser.