Skip to main content
POST
cURL

Overview

Upsert a record to keep data from another system current in Unify. A matching record is updated. If no record matches, a new record is created. The request body accepts the following properties which specify how to create or update the record: You must specify match and one of create, create_or_update, or create_or_update_if_empty. All other properties are optional.

Examples

Set UNIFY_API_KEY to your API key.
This request creates Northstar Labs if its domain is missing, or updates its name and description if it already exists:
Use create_or_update_if_empty to preserve populated attributes. In this example, both the person and the referenced company are created if needed:
“Empty” means the current value is null. The response returns the resulting record in data.
For a product_user object with a unique user_id, use the external user’s ID as the match key:
Create the custom object and attributes before sending this request. The attribute values must match their configured types and select options.

Authorizations

x-api-key
string
header
required

Path Parameters

object_name
string
required

The API name of an object, e.g. company, person, opportunity, or a custom object's API name.

Query Parameters

validation_mode
enum<string>

Validation mode for request data.

  • strict: Reject requests if any attribute is invalid or unrecognized.
  • ignore_invalid: Ignore unknown attributes and omit invalid values for optional attributes. Reject requests with an invalid body structure or invalid required attributes.
Available options:
strict,
ignore_invalid

Body

application/json

Request body for upserting a record.

At least one of create, create_or_update, or create_or_update_if_empty must be provided. Together, these properties must include all required attributes.

match
object
required

Attribute values used to find an existing record. Include at least one unique attribute. Additional attributes narrow the match.

create
object

Attribute values used when no record matches. These take precedence over other creation values.

update
object

Attribute values used when a record matches. These take precedence over other update values.

update_if_empty
object

Attribute values applied to a matching record only where the existing value is null. Values in update and create_or_update take precedence.

create_or_update
object

Attribute values used for both creation and updates. Values in create or update take precedence.

create_or_update_if_empty
object

Attribute values used for creation, or for updates where the existing value is null. Values in all other properties take precedence.

Response

Response for a successful update operation.

Response for a successful update operation.

status
enum<string>
required
Available options:
success
data
object
required