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 secret API key (sk_…), created in Settings → Applications. Sent as Authorization: Bearer sk_…. The X-Api-Key: sk_… header is also accepted and takes precedence. Never expose a secret key in a browser.
Path Parameters
The target object — its id (obj_…), key, or name (e.g. contacts).
Body
The property that identifies the record — its id, key, or name. Must be a text, email, phone, or website property, and fields must carry its value.
"email"
A {property: value} map, as on create. Select and status values may be option labels.
A {property: value} map written only when the upsert creates the record, merged over fields; ignored when it updates one. Use it for a first stage or owner that people may change later.
An optional record name.