Upsert contact

Create a Contact if none exists with the given match key, or update the existing one otherwise.

This is an idempotent operation: calling it twice with the same payload results in the same end state. Safe to retry on network failure, or to replay as part of a scheduled sync from your CRM or source system.

Matching rule

Contacts are matched by Tracking ID (primary), with email (fallback):

  1. If trackingId is provided, the Contact with that Tracking ID is updated. A new Contact is created (with the supplied Tracking ID) if no match exists.
  2. If trackingId is not provided, the Contact with the matching email (case-insensitive) is updated. A new Contact is created if no email match exists.
  3. If neither trackingId nor email is provided, the request is rejected with a 400 Bad Request.
  4. If both are provided, only the trackingId is used to locate the Contact. The supplied email is not cross-checked against the matched Contact, so a mismatch will not be flagged.

Response

The response always includes the full Contact object plus a result field:

  • "result": "created" — no match was found, a new Contact was created.
  • "result": "updated" — an existing Contact was found and its fields were updated.

Field semantics

FieldCreateUpdate
trackingIdOptional; primary match key when present.Primary match key.
emailRequired. Used as fallback match key when trackingId is absent.Not updatable — use the regular update endpoint to change a Contact's email.
firstName, lastNameRequired.Replace if present; omit = unchanged.
phone, company, title, country, numberAndStreet, city, state, zipCode, prefix, suffixOptional.Replace if present; omit = unchanged.
noteOptional.Replace if present; omit = unchanged.

Client and Investment Entity assignments are not affected by upsert; use the dedicated assign/unassign endpoints.

Validation errors return 400 Bad Request with the offending field name.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The ID of the Firm object

Body Params
string

Required when creating a new Contact. On update, omit to leave unchanged.

string

Required when creating a new Contact. On update, omit to leave unchanged.

string

Contact email address. Required when creating a new Contact. Used as the match key only when trackingId is omitted. On update, the existing Contact's email is not changed by this endpoint.

string

Customer-supplied Tracking ID. When provided, it is the sole match key — if it does not match an existing Contact, a new Contact is created (and the request will fail if the supplied email is already in use by another Contact). The email field is only consulted as a match key when trackingId is omitted.

string
string
string
string
string
string
string
string
string
string
string
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json