Docs: Tool reference
customers toolset

save_user

Create or update a customer. Creates or updates an end user. Matches by id, else external_id, else email, and creates them if none matches (email or external_id required then). Attributes are merged (null removes a key). company_ids links them to companies (IDs, external IDs or names; existing links stay). Team only; nobody is emailed. Pass expected_version when updating.

Toolset
customers
Who can call it
OwnersManagersContributorsAPI keys
REST
POST /api/v1/w/{workspace}/users
Behavior
changes dataidempotentaccepts idempotency_key

Input

FieldTypeDescription
idstringThe user's ID, to update a known user.
emailstring
external_idstring or null
namestring or null
avatar_urlstring (uri) or null
attributesobjectCustom attributes to set, merged into the existing ones; a null value removes that key.
company_idsarray of stringCompanies to link them to.
expected_versionintegerThe user's version from your last read; the call fails if it changed since.
idempotency_keystringRetry-safe key. Repeating a call with the same key returns the first result.

Output

FieldTypeDescription
userrequiredobject
createdrequiredboolean
linked_company_idsrequiredarray of stringCompanies newly linked by this call.

Calling it

// MCP: tools/call
{ "name": "save_user", "arguments": {} }

// Typed client
await carechannel.save_user({});