Upsert client

Create a Client if none exists with the given Tracking ID, 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

The Client is matched by the trackingId you supply in the request body. trackingId is required — requests without a trackingId are rejected with a 400 Bad Request. Use the regular Create Client endpoint if you want to create a Client without a Tracking ID.

Response

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

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

Field semantics

FieldCreateUpdate
trackingIdRequired (match key).Required (match key).
nameRequired.Replace if present; omit = unchanged.
tagsOptional; defaults to [].Replace if present (empty array clears); omit = unchanged.
clientGroupIdOptional; defaults to the Unassigned group.Reassign if present; omit = unchanged.
noteOptional.Replace if present; omit = unchanged.

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

Customer-supplied Tracking ID used to match an existing Client.
If a Client with this Tracking ID already exists in the firm, it will be updated.
Otherwise, a new Client will be created with this Tracking ID. Required.

string

Required when creating a new Client. On update, omit to leave the name unchanged.

tags
array of strings

On update, omit to leave the existing tags unchanged. Pass an empty array to clear all tags.

tags
string

Anduin ID of the Client group.
You can retrieve list of Client group with list Client groups API.
For newly created clients, will default to the Unassigned clients group if left empty.
For existing clients, the client group will only change if this field is provided.

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