Skip to content

SDK method

tools.upsertContact

Add or update a contact. Convenience alias for upsert_contact, forwarding to tinbox.api.contacts.upsert.mutate.

Signature

ts
upsertContact(input: Parameters<TinboxTools["upsertContact"]>[0]): ReturnType<TinboxTools["upsertContact"]>

Parameters

NameTypeRequiredDescription
emailstringyesThe contact's email (the unique key).
nameunknownnoDisplay name.
vipbooleannoMark as VIP.
labelsstring[]noLabel names to apply (created if new).
sourceUrlunknownnoWhere this contact came from (e.g. a web-research URL).
confidencenumberno0–100 confidence in the data (for researched contacts).
lifecycle"prospect" | "active" | "invalid"noOverride the lifecycle (default: prospect for agent adds).

Returns

ReturnType<TinboxTools["upsertContact"]>

Example

ts
await tinbox.tools.upsertContact({
  "email": "ada@example.com"
});