post
https://api.anduin.app/api/v1/idm//contacts/upsert
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):
- If
trackingIdis provided, the Contact with that Tracking ID is updated. A new Contact is created (with the supplied Tracking ID) if no match exists. - If
trackingIdis not provided, the Contact with the matchingemail(case-insensitive) is updated. A new Contact is created if no email match exists. - If neither
trackingIdnoremailis provided, the request is rejected with a400 Bad Request. - If both are provided, only the
trackingIdis used to locate the Contact. The suppliedemailis 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
| Field | Create | Update |
|---|---|---|
trackingId | Optional; primary match key when present. | Primary match key. |
email | Required. Used as fallback match key when trackingId is absent. | Not updatable — use the regular update endpoint to change a Contact's email. |
firstName, lastName | Required. | Replace if present; omit = unchanged. |
phone, company, title, country, numberAndStreet, city, state, zipCode, prefix, suffix | Optional. | Replace if present; omit = unchanged. |
note | Optional. | 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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…