Skip to main content
POST
Create or update a record

Authorizations

Authorization
string
header
required

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

object
string
required

The target object — its id (obj_…), key, or name (e.g. contacts).

Body

application/json
matchOn
string
required

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.

Example:

"email"

fields
object
required

A {property: value} map, as on create. Select and status values may be option labels.

createFields
object

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.

name
string

An optional record name.

Response

The record's id, and whether it was created or updated.

data
object
reqId
string

A per-request id (req_…). Quote it to support when reporting a problem.

Example:

"req_2a1f9c8e7b6d5"