- Upsert searches for an existing contact using the workspace identity field.
- If a match is found, only the attributes included in the request are updated.
- If no match is found, a new contact is created and subscribed by default.
- Use upsert to avoid duplicate identity errors when syncing contacts.
Upserting Contacts
Beta
Create new contacts or update existing ones in a single request. Upserts match on your workspace identity field (email by default) and only update attributes provided in the payload.
How Upsert Works
Understanding create-or-update behavior
POST
Upsert Contact
https://api.leadpush.io/v1/workspaces/{workspace_uuid}/contacts/upsertCreate or update a contact by identity
Path parameters
workspace_uuidstring Required ID of your workspace
Request body
attributesobject Required Show Object Properties
Identity Requirements
Ensure the correct identity attribute is provided
- The required identity field is determined by the workspace configuration.
- If the identity attribute is missing or invalid, the API returns a
422error. - If contact limits apply to your account, the API may return
403errors when limits are exceeded.