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
| Name | Type | Required | Description |
|---|---|---|---|
email | string | yes | The contact's email (the unique key). |
name | unknown | no | Display name. |
vip | boolean | no | Mark as VIP. |
labels | string[] | no | Label names to apply (created if new). |
sourceUrl | unknown | no | Where this contact came from (e.g. a web-research URL). |
confidence | number | no | 0–100 confidence in the data (for researched contacts). |
lifecycle | "prospect" | "active" | "invalid" | no | Override the lifecycle (default: prospect for agent adds). |
Returns
ReturnType<TinboxTools["upsertContact"]>
Example
ts
await tinbox.tools.upsertContact({
"email": "ada@example.com"
});