Create or update a contact based on phone (primary) or email (fallback) matching against active (non-deleted) contacts. Returns 201 for new contacts and 200 for updates.At least one of phone or email must be provided.
Matching only considers active contacts. If the only match is a soft-deleted contact, it is ignored and a brand new contact is created — the deleted record stays deleted with its data intact.
By default, on a match, provided values in the request overwrite the existing contact’s scalar fields and custom field values; fields you omit from the request are left untouched. Set preserveExisting: true to merge instead — only empty fields and missing custom field values are filled. Tags are always additive regardless of preserveExisting.
workspaceId is required for account-scoped API keys and inferred from the key for workspace-scoped keys. See Workspace ID and Request Scope.
IANA timezone identifier (e.g. America/New_York). Used by features that respect the contact’s local time.
Only applied when creating a new contact. When matching an existing contact, the existing timezone is preserved (or merged per preserveExisting); auto-derivation does not run on updates.
On create, when omitted, the timezone is auto-derived from the phone number with the workspace default as fallback. Caller-supplied values always win.
Must be a valid IANA timezone identifier; bogus strings are rejected with 400 Bad Request.
When true, populated fields on the matched contact are preserved — only empty fields and missing custom field values are filled in. When false (default), the request values overwrite the existing fields and custom field values. Tag attachment is always additive regardless of this flag.
Do Not Disturb. true turns it on. false turns it off only when the API or a person in the dashboard turned it on. If the contact asked for it (for example by replying STOP), or Lead Connector, a workflow or an import set it, it stays on and you get a 409 saying who set it. It also stays on with a 409 if the contact’s phone or email is on the Do Not Contact list (for example after a STOP reply). That includes a phone or email the same request sets. If the contact changes while DND is being turned off, you also get a 409. Send the request again.
Tag names to attach to the contact. Tags that don’t exist yet are auto-created in your workspace. Tags are always additive — this endpoint never removes a tag from a contact, regardless of preserveExisting. Names are matched case-sensitively, trimmed, and must be 1–255 characters. Tags in the response are returned in alphabetical order.Adding a tag fires a workflow trigger. On a new contact it fires Contact created with the tags already attached. On a matched existing contact it fires Contact tagged, once per tag the contact didn’t already have. Re-sending tags the contact already carries fires nothing, so repeated syncs of the same contact won’t re-trigger your workflows.
Custom field values keyed by the custom field name as displayed in the dashboard (e.g. "Lead Source" — including spaces and original casing; not a slug). Accepts string, number, boolean, or null (null clears a stored value). Behavior on a match follows preserveExisting: when false (default), provided values overwrite; when true, only fill custom fields the contact doesn’t have a value for. Unknown keys are rejected with a 400. Values are persisted as text and returned as strings.
This endpoint strictly validates the request body. Unknown top-level fields are rejected with 400 Bad Request. Custom field values must use the customFields object.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Nedzo","colors":{"primary":"#2e79ff","light":"#5a9aff","dark":"#2e79ff"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/nedzoai/favicon.png","logo":{"light":"https://mintcdn.com/nedzoai/0cscfgNlBg1KdrWc/logo/logo.png?fit=max\u0026auto=format\u0026n=0cscfgNlBg1KdrWc\u0026q=85\u0026s=e06023604ef01b7035733cfb69ef32be","dark":"https://mintcdn.com/nedzoai/0cscfgNlBg1KdrWc/logo/logo.png?fit=max\u0026auto=format\u0026n=0cscfgNlBg1KdrWc\u0026q=85\u0026s=e06023604ef01b7035733cfb69ef32be"},"api":{"openapi":"https://api.nedzo.ai/v1/openapi.json","mdx":{"server":"https://api.nedzo.ai/v1","auth":{"method":"bearer","name":null}}},"navbar":{"links":[{"label":"Support","href":"mailto:support@nedzo.ai"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.nedzo.ai"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/nedzo"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","href":"https://www.skool.com/nedzo-ai","icon":"users"},{"anchor":"Academy","href":"https://www.skool.com/nedzo-ai/classroom","icon":"graduation-cap"},{"anchor":"Status","href":"https://status.nedzo.ai","icon":"signal-bars"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nedzoai","hasAudioNarration":false,"actualSubdomain":"nedzoai","customDomains":["docs.nedzo.ai"],"gitSource":{"type":"github","owner":"nedzoai","repo":"nedzo-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":true},"entitlements":{},"buildId":"6acf60378cb1216fb5d15001","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":87},{"language":"default","tag":"Documentation","count":52},{"language":"default","tag":"Workflows","count":29},{"language":"default","tag":"Agents","count":25},{"language":"default","tag":"Workspaces","count":13},{"language":"default","tag":"Billing","count":12},{"language":"default","tag":"Contacts","count":10},{"language":"default","tag":"Integrations","count":10},{"language":"default","tag":"Campaigns","count":9},{"language":"default","tag":"Actions","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/contacts/upsert","slug":"/api-reference/contacts/upsert","pageMetadata":{"title":"Upsert contact","api":"POST /contacts/upsert","description":"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.","href":"/api-reference/contacts/upsert"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Note,ParamField,Tip}=_components;if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create or update a contact based on phone (primary) or email (fallback) matching against active (non-deleted) contacts. Returns `,_jsx(_components.code,{children:`201`}),` for new contacts and `,_jsx(_components.code,{children:`200`}),` for updates.`]}),`\n`,_jsxs(_components.p,{children:[`At least one of `,_jsx(_components.code,{children:`phone`}),` or `,_jsx(_components.code,{children:`email`}),` must be provided.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Matching only considers active contacts. If the only match is a soft-deleted contact, it is ignored and a brand new contact is created — the deleted record stays deleted with its data intact.`})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`By default, on a match, `,_jsx(_components.strong,{children:`provided`}),` values in the request overwrite the existing contact’s scalar fields and custom field values; fields you omit from the request are left untouched. Set `,_jsx(_components.code,{children:`preserveExisting: true`}),` to merge instead — only empty fields and missing custom field values are filled. `,_jsx(_components.strong,{children:`Tags are always additive`}),` regardless of `,_jsx(_components.code,{children:`preserveExisting`}),`.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`workspaceId`}),` is required for `,_jsx(_components.strong,{children:`account-scoped`}),` API keys and inferred from the key for `,_jsx(_components.strong,{children:`workspace-scoped`}),` keys. See `,_jsx(_components.a,{href:`/authentication#workspace-id-and-request-scope`,children:`Workspace ID and Request Scope`}),`.`]})}),`\n`,_jsx(ParamField,{body:`workspaceId`,type:`string`,id:`param-workspace-id`,children:_jsx(_components.p,{children:`Workspace UUID (required for account API keys, optional for workspace API keys)`})}),`\n`,_jsx(ParamField,{body:`firstName`,type:`string`,id:`param-first-name`,children:_jsx(_components.p,{children:`First name`})}),`\n`,_jsx(ParamField,{body:`lastName`,type:`string`,id:`param-last-name`,children:_jsx(_components.p,{children:`Last name`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,id:`param-email`,children:_jsx(_components.p,{children:`Email address (used for matching if phone is not provided)`})}),`\n`,_jsx(ParamField,{body:`phone`,type:`string`,id:`param-phone`,children:_jsx(_components.p,{children:`Phone number in E.164 format (primary matching field)`})}),`\n`,_jsxs(ParamField,{body:`timezone`,type:`string`,id:`param-timezone`,children:[_jsxs(_components.p,{children:[`IANA timezone identifier (e.g. `,_jsx(_components.code,{children:`America/New_York`}),`). Used by features that respect the contact’s local time.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Only applied when creating a new contact.`}),` When matching an existing contact, the existing timezone is preserved (or merged per `,_jsx(_components.code,{children:`preserveExisting`}),`); auto-derivation does not run on updates.`]}),`\n`,_jsx(_components.li,{children:`On create, when omitted, the timezone is auto-derived from the phone number with the workspace default as fallback. Caller-supplied values always win.`}),`\n`,_jsxs(_components.li,{children:[`Must be a valid IANA timezone identifier; bogus strings are rejected with `,_jsx(_components.code,{children:`400 Bad Request`}),`.`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`preserveExisting`,type:`boolean`,default:`false`,id:`param-preserve-existing`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, populated fields on the matched contact are preserved — only empty fields and missing custom field values are filled in. When `,_jsx(_components.code,{children:`false`}),` (default), the request values overwrite the existing fields and custom field values. Tag attachment is always additive regardless of this flag.`]})}),`\n`,_jsx(ParamField,{body:`dnd`,type:`boolean`,id:`param-dnd`,children:_jsxs(_components.p,{children:[`Do Not Disturb. `,_jsx(_components.code,{children:`true`}),` turns it on. `,_jsx(_components.code,{children:`false`}),` turns it off only when the API or a person in the dashboard turned it on. If the contact asked for it (for example by replying STOP), or Lead Connector, a workflow or an import set it, it stays on and you get a `,_jsx(_components.code,{children:`409`}),` saying who set it. It also stays on with a `,_jsx(_components.code,{children:`409`}),` if the contact’s phone or email is on the Do Not Contact list (for example after a STOP reply). That includes a phone or email the same request sets. If the contact changes while DND is being turned off, you also get a `,_jsx(_components.code,{children:`409`}),`. Send the request again.`]})}),`\n`,_jsxs(ParamField,{body:`tags`,type:`string[]`,id:`param-tags`,children:[_jsxs(_components.p,{children:[`Tag names to attach to the contact. Tags that don’t exist yet are auto-created in your workspace. Tags are always `,_jsx(_components.strong,{children:`additive`}),` — this endpoint never removes a tag from a contact, regardless of `,_jsx(_components.code,{children:`preserveExisting`}),`. Names are matched case-sensitively, trimmed, and must be 1–255 characters. Tags in the response are returned in alphabetical order.`]}),_jsxs(_components.p,{children:[`Adding a tag fires a workflow trigger. On a `,_jsx(_components.strong,{children:`new`}),` contact it fires `,_jsx(_components.a,{href:`/workflows/triggers/contact-created`,children:`Contact created`}),` with the tags already attached. On a `,_jsx(_components.strong,{children:`matched existing`}),` contact it fires `,_jsx(_components.a,{href:`/workflows/triggers/contact-tagged`,children:`Contact tagged`}),`, once per tag the contact didn’t already have. Re-sending tags the contact already carries fires nothing, so repeated syncs of the same contact won’t re-trigger your workflows.`]})]}),`\n`,_jsx(ParamField,{body:`customFields`,type:`object`,id:`param-custom-fields`,children:_jsxs(_components.p,{children:[`Custom field values keyed by the custom field name `,_jsx(_components.strong,{children:`as displayed in the dashboard`}),` (e.g. `,_jsx(_components.code,{children:`\"Lead Source\"`}),` — including spaces and original casing; not a slug). Accepts `,_jsx(_components.code,{children:`string`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`boolean`}),`, or `,_jsx(_components.code,{children:`null`}),` (null clears a stored value). Behavior on a match follows `,_jsx(_components.code,{children:`preserveExisting`}),`: when `,_jsx(_components.code,{children:`false`}),` (default), provided values overwrite; when `,_jsx(_components.code,{children:`true`}),`, only fill custom fields the contact doesn’t have a value for. Unknown keys are rejected with a `,_jsx(_components.code,{children:`400`}),`. Values are persisted as text and returned as strings.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This endpoint `,_jsx(_components.strong,{children:`strictly validates the request body`}),`. Unknown top-level fields are rejected with `,_jsx(_components.code,{children:`400 Bad Request`}),`. Custom field values must use the `,_jsx(_components.code,{children:`customFields`}),` object.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upsert contact","api":"POST /contacts/upsert","description":"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.","href":"/api-reference/contacts/upsert"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Note,ParamField,RequestExample,ResponseExample,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create or update a contact based on phone (primary) or email (fallback) matching against active (non-deleted) contacts. Returns `,_jsx(_components.code,{children:`201`}),` for new contacts and `,_jsx(_components.code,{children:`200`}),` for updates.`]}),`\n`,_jsxs(_components.p,{children:[`At least one of `,_jsx(_components.code,{children:`phone`}),` or `,_jsx(_components.code,{children:`email`}),` must be provided.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Matching only considers active contacts. If the only match is a soft-deleted contact, it is ignored and a brand new contact is created — the deleted record stays deleted with its data intact.`})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`By default, on a match, `,_jsx(_components.strong,{children:`provided`}),` values in the request overwrite the existing contact’s scalar fields and custom field values; fields you omit from the request are left untouched. Set `,_jsx(_components.code,{children:`preserveExisting: true`}),` to merge instead — only empty fields and missing custom field values are filled. `,_jsx(_components.strong,{children:`Tags are always additive`}),` regardless of `,_jsx(_components.code,{children:`preserveExisting`}),`.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`workspaceId`}),` is required for `,_jsx(_components.strong,{children:`account-scoped`}),` API keys and inferred from the key for `,_jsx(_components.strong,{children:`workspace-scoped`}),` keys. See `,_jsx(_components.a,{href:`/authentication#workspace-id-and-request-scope`,children:`Workspace ID and Request Scope`}),`.`]})}),`\n`,_jsx(ParamField,{body:`workspaceId`,type:`string`,id:`param-workspace-id`,children:_jsx(_components.p,{children:`Workspace UUID (required for account API keys, optional for workspace API keys)`})}),`\n`,_jsx(ParamField,{body:`firstName`,type:`string`,id:`param-first-name`,children:_jsx(_components.p,{children:`First name`})}),`\n`,_jsx(ParamField,{body:`lastName`,type:`string`,id:`param-last-name`,children:_jsx(_components.p,{children:`Last name`})}),`\n`,_jsx(ParamField,{body:`email`,type:`string`,id:`param-email`,children:_jsx(_components.p,{children:`Email address (used for matching if phone is not provided)`})}),`\n`,_jsx(ParamField,{body:`phone`,type:`string`,id:`param-phone`,children:_jsx(_components.p,{children:`Phone number in E.164 format (primary matching field)`})}),`\n`,_jsxs(ParamField,{body:`timezone`,type:`string`,id:`param-timezone`,children:[_jsxs(_components.p,{children:[`IANA timezone identifier (e.g. `,_jsx(_components.code,{children:`America/New_York`}),`). Used by features that respect the contact’s local time.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Only applied when creating a new contact.`}),` When matching an existing contact, the existing timezone is preserved (or merged per `,_jsx(_components.code,{children:`preserveExisting`}),`); auto-derivation does not run on updates.`]}),`\n`,_jsx(_components.li,{children:`On create, when omitted, the timezone is auto-derived from the phone number with the workspace default as fallback. Caller-supplied values always win.`}),`\n`,_jsxs(_components.li,{children:[`Must be a valid IANA timezone identifier; bogus strings are rejected with `,_jsx(_components.code,{children:`400 Bad Request`}),`.`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`preserveExisting`,type:`boolean`,default:`false`,id:`param-preserve-existing`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, populated fields on the matched contact are preserved — only empty fields and missing custom field values are filled in. When `,_jsx(_components.code,{children:`false`}),` (default), the request values overwrite the existing fields and custom field values. Tag attachment is always additive regardless of this flag.`]})}),`\n`,_jsx(ParamField,{body:`dnd`,type:`boolean`,id:`param-dnd`,children:_jsxs(_components.p,{children:[`Do Not Disturb. `,_jsx(_components.code,{children:`true`}),` turns it on. `,_jsx(_components.code,{children:`false`}),` turns it off only when the API or a person in the dashboard turned it on. If the contact asked for it (for example by replying STOP), or Lead Connector, a workflow or an import set it, it stays on and you get a `,_jsx(_components.code,{children:`409`}),` saying who set it. It also stays on with a `,_jsx(_components.code,{children:`409`}),` if the contact’s phone or email is on the Do Not Contact list (for example after a STOP reply). That includes a phone or email the same request sets. If the contact changes while DND is being turned off, you also get a `,_jsx(_components.code,{children:`409`}),`. Send the request again.`]})}),`\n`,_jsxs(ParamField,{body:`tags`,type:`string[]`,id:`param-tags`,children:[_jsxs(_components.p,{children:[`Tag names to attach to the contact. Tags that don’t exist yet are auto-created in your workspace. Tags are always `,_jsx(_components.strong,{children:`additive`}),` — this endpoint never removes a tag from a contact, regardless of `,_jsx(_components.code,{children:`preserveExisting`}),`. Names are matched case-sensitively, trimmed, and must be 1–255 characters. Tags in the response are returned in alphabetical order.`]}),_jsxs(_components.p,{children:[`Adding a tag fires a workflow trigger. On a `,_jsx(_components.strong,{children:`new`}),` contact it fires `,_jsx(_components.a,{href:`/workflows/triggers/contact-created`,children:`Contact created`}),` with the tags already attached. On a `,_jsx(_components.strong,{children:`matched existing`}),` contact it fires `,_jsx(_components.a,{href:`/workflows/triggers/contact-tagged`,children:`Contact tagged`}),`, once per tag the contact didn’t already have. Re-sending tags the contact already carries fires nothing, so repeated syncs of the same contact won’t re-trigger your workflows.`]})]}),`\n`,_jsx(ParamField,{body:`customFields`,type:`object`,id:`param-custom-fields`,children:_jsxs(_components.p,{children:[`Custom field values keyed by the custom field name `,_jsx(_components.strong,{children:`as displayed in the dashboard`}),` (e.g. `,_jsx(_components.code,{children:`\"Lead Source\"`}),` — including spaces and original casing; not a slug). Accepts `,_jsx(_components.code,{children:`string`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`boolean`}),`, or `,_jsx(_components.code,{children:`null`}),` (null clears a stored value). Behavior on a match follows `,_jsx(_components.code,{children:`preserveExisting`}),`: when `,_jsx(_components.code,{children:`false`}),` (default), provided values overwrite; when `,_jsx(_components.code,{children:`true`}),`, only fill custom fields the contact doesn’t have a value for. Unknown keys are rejected with a `,_jsx(_components.code,{children:`400`}),`. Values are persisted as text and returned as strings.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This endpoint `,_jsx(_components.strong,{children:`strictly validates the request body`}),`. Unknown top-level fields are rejected with `,_jsx(_components.code,{children:`400 Bad Request`}),`. Custom field values must use the `,_jsx(_components.code,{children:`customFields`}),` object.`]})}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`16`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.nedzo.ai/v1/contacts/upsert\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"workspaceId\": \"789e4567-e89b-12d3-a456-426614174000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phone\": \"+14155551234\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"john@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"firstName\": \"John\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"lastName\": \"Doe\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tags\": [\"vip\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dnd\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customFields\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Lead Source\": \"Website\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"MRR\": 250`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"workspaceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"789e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"firstName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lastName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Doe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"john@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+14155551234\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timezone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"America/Los_Angeles\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tags\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vip\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dnd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customFields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Lead Source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"MRR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"250\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upsert contact","api":"POST /contacts/upsert","description":"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.","href":"/api-reference/contacts/upsert"}}}},"mdxExtracts":{"tableOfContents":[],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.nedzo.ai/v1/contacts/upsert\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer YOUR_API_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"workspaceId\": \"789e4567-e89b-12d3-a456-426614174000\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"phone\": \"+14155551234\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"john@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"firstName\": \"John\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"lastName\": \"Doe\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"tags\": [\"vip\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"dnd\": false,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customFields\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Lead Source\": \"Website\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"MRR\": 250\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"123e4567-e89b-12d3-a456-426614174000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"workspaceId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"789e4567-e89b-12d3-a456-426614174000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"firstName\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"John\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"lastName\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Doe\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"john@example.com\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"phone\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+14155551234\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"timezone\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"America/Los_Angeles\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"tags\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"vip\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"dnd\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customFields\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"Lead Source\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Website\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"MRR\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"250\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-01-15T10:30:00Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"updatedAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-01-15T10:30:00Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Upsert contact","path":"/contacts/upsert","servers":[{"url":"https://api.nedzo.ai/v1"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"workspaceId":[{"type":"string","description":"Workspace UUID (required for account API keys, optional for workspace API keys)"}],"firstName":[{"type":"string","description":"First name"}],"lastName":[{"type":"string","description":"Last name"}],"email":[{"type":"string","description":"Email address (used for matching if phone is not provided)"}],"phone":[{"type":"string","description":"Phone number in E.164 format (primary matching field)"}],"timezone":[{"type":"string","description":"IANA timezone identifier (e.g. `America/New_York` ). Used by features that respect the contact’s local time. Only applied when creating a new contact. When matching an existing contact, the existing timezone is preserved (or merged per `preserveExisting` ); auto-derivation does not run on updates. On create, when omitted, the timezone is auto-derived from the phone number with the workspace default as fallback. Caller-supplied values always win. Must be a valid IANA timezone identifier; bogus strings are rejected with `400 Bad Request` ."}],"preserveExisting":[{"type":"boolean","description":"When `true` , populated fields on the matched contact are preserved — only empty fields and missing custom field values are filled in. When `false` (default), the request values overwrite the existing fields and custom field values. Tag attachment is always additive regardless of this flag."}],"dnd":[{"type":"boolean","description":"Do Not Disturb. `true` turns it on. `false` turns it off only when the API or a person in the dashboard turned it on. If the contact asked for it (for example by replying STOP), or Lead Connector, a workflow or an import set it, it stays on and you get a `409` saying who set it. It also stays on with a `409` if the contact’s phone or email is on the Do Not Contact list (for example after a STOP reply). That includes a phone or email the same request sets. If the contact changes while DND is being turned off, you also get a `409` . Send the request again."}],"tags":[{"type":"array","items":[{"type":"string"}],"description":"Tag names to attach to the contact. Tags that don’t exist yet are auto-created in your workspace. Tags are always additive — this endpoint never removes a tag from a contact, regardless of `preserveExisting` . Names are matched case-sensitively, trimmed, and must be 1–255 characters. Tags in the response are returned in alphabetical order. Adding a tag fires a workflow trigger. On a new contact it fires Contact created with the tags already attached. On a matched existing contact it fires Contact tagged , once per tag the contact didn’t already have. Re-sending tags the contact already carries fires nothing, so repeated syncs of the same contact won’t re-trigger your workflows."}],"customFields":[{"type":"object","properties":{},"description":"Custom field values keyed by the custom field name as displayed in the dashboard (e.g. `\"Lead Source\"` — including spaces and original casing; not a slug). Accepts `string` , `number` , `boolean` , or `null` (null clears a stored value). Behavior on a match follows `preserveExisting` : when `false` (default), provided values overwrite; when `true` , only fill custom fields the contact doesn’t have a value for. Unknown keys are rejected with a `400` . Values are persisted as text and returned as strings."}]}}],"examples":{"example":{"value":{"workspaceId":"\u003cstring>","firstName":"\u003cstring>","lastName":"\u003cstring>","email":"\u003cstring>","phone":"\u003cstring>","timezone":"\u003cstring>","preserveExisting":true,"dnd":true,"tags":["\u003cstring>"],"customFields":{}}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"nedzoai","siteName":"Nedzo","title":"Upsert contact - Nedzo","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-12T13:36:59.771Z","originalFileLocation":"api-reference/contacts/upsert.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nedzo\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/nedzoai/favicon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/nedzoai/favicon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/nedzoai/favicon.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/nedzoai/favicon.png\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upsert contact - Nedzo\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nedzo\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nedzo.ai/api-reference/contacts/upsert\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nedzoai.mintlify.site/_mintlify/api/og/v2?division=Contacts\u0026amp;title=Upsert+contact\u0026amp;description=Create+or+update+a+contact+via+the+Nedzo+REST+API.+Matches+existing+active+contacts+by+phone+first%2C+falling+back+to+email.\u0026amp;theme=48b8b2f0aab03f12b2c27694\u0026amp;signature=c0287951488942481ca53d8dcab51f837b11086a611cae57fd9eb06e30369e1b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upsert contact - Nedzo\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nedzoai.mintlify.site/_mintlify/api/og/v2?division=Contacts\u0026amp;title=Upsert+contact\u0026amp;description=Create+or+update+a+contact+via+the+Nedzo+REST+API.+Matches+existing+active+contacts+by+phone+first%2C+falling+back+to+email.\u0026amp;theme=48b8b2f0aab03f12b2c27694\u0026amp;signature=c0287951488942481ca53d8dcab51f837b11086a611cae57fd9eb06e30369e1b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/nedzoai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nedzo\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2e79ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nedzo.ai/api-reference/contacts/upsert\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/contacts/upsert.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nedzo.ai/#organization\",\"name\":\"Nedzo\",\"url\":\"https://docs.nedzo.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nedzoai/0cscfgNlBg1KdrWc/logo/logo.png?fit=max\u0026auto=format\u0026n=0cscfgNlBg1KdrWc\u0026q=85\u0026s=e06023604ef01b7035733cfb69ef32be\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nedzo.ai#website\",\"name\":\"Nedzo\",\"url\":\"https://docs.nedzo.ai\",\"publisher\":{\"@id\":\"https://docs.nedzo.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nedzo.ai/api-reference/contacts/upsert#webpage\",\"url\":\"https://docs.nedzo.ai/api-reference/contacts/upsert\",\"name\":\"Upsert contact\",\"description\":\"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.\",\"dateModified\":\"2026-10-12T13:36:59.771Z\",\"isPartOf\":{\"@id\":\"https://docs.nedzo.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nedzo.ai/api-reference/contacts/upsert#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nedzo.ai/api-reference/contacts/upsert#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Contacts\",\"item\":\"https://docs.nedzo.ai/api-reference/contacts/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upsert contact\",\"item\":\"https://docs.nedzo.ai/api-reference/contacts/upsert\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.nedzo.ai/api-reference/contacts/upsert#apireference\",\"headline\":\"Upsert contact\",\"name\":\"Upsert contact\",\"description\":\"Create or update a contact via the Nedzo REST API. Matches existing active contacts by phone first, falling back to email.\",\"url\":\"https://docs.nedzo.ai/api-reference/contacts/upsert\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nedzo.ai/api-reference/contacts/upsert#webpage\"},\"dateModified\":\"2026-10-12T13:36:59.771Z\",\"publisher\":{\"@id\":\"https://docs.nedzo.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nedzo.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nedzo\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Nedzo","nav":{"global":{"anchors":[{"anchor":"Community","href":"https://www.skool.com/nedzo-ai","icon":"users"},{"anchor":"Academy","href":"https://www.skool.com/nedzo-ai/classroom","icon":"graduation-cap"},{"anchor":"Status","href":"https://status.nedzo.ai","icon":"signal-bars"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"group":"Workspaces","pages":[{"title":"List workspaces","api":"GET /workspaces","href":"/api-reference/workspaces/list"},{"title":"Create workspace","api":"POST /workspaces","href":"/api-reference/workspaces/create"},{"title":"Get workspace","api":"GET /workspaces/{id}","href":"/api-reference/workspaces/get"},{"title":"Update workspace","api":"PATCH /workspaces/{id}","href":"/api-reference/workspaces/update"},{"title":"Delete workspace","api":"DELETE /workspaces/{id}","href":"/api-reference/workspaces/delete"},{"group":"Billing","pages":[{"title":"Get wallet balance","api":"GET /workspaces/{workspaceId}/billing/balance","href":"/api-reference/workspace-billing/get-balance"},{"title":"Credit wallet","api":"POST /workspaces/{workspaceId}/billing/wallet/credit","href":"/api-reference/workspace-billing/credit-wallet"},{"title":"Debit wallet","api":"POST /workspaces/{workspaceId}/billing/wallet/debit","href":"/api-reference/workspace-billing/debit-wallet"},{"title":"List wallet transactions","api":"GET /workspaces/{workspaceId}/billing/transactions","href":"/api-reference/workspace-billing/list-transactions"},{"title":"Get usage summary","api":"GET /workspaces/{workspaceId}/billing/usage","href":"/api-reference/workspace-billing/get-usage"},{"title":"List payment methods","api":"GET /workspaces/{workspaceId}/billing/payment-methods","href":"/api-reference/workspace-billing/list-payment-methods"},{"title":"Create setup intent","api":"POST /workspaces/{workspaceId}/billing/payment-methods/setup-intent","href":"/api-reference/workspace-billing/create-setup-intent"},{"title":"Attach payment method","api":"POST /workspaces/{workspaceId}/billing/payment-methods/attach","href":"/api-reference/workspace-billing/attach-payment-method"}]}]},{"group":"Agents","pages":[{"title":"List agents","api":"GET /agents","href":"/api-reference/agents/list"},{"title":"Create agent","api":"POST /agents","href":"/api-reference/agents/create"},{"title":"Get agent","api":"GET /agents/{id}","href":"/api-reference/agents/get"},{"title":"Update agent","api":"PATCH /agents/{id}","href":"/api-reference/agents/update"},{"title":"Delete agent","api":"DELETE /agents/{id}","href":"/api-reference/agents/delete"},{"title":"Duplicate agent","api":"POST /agents/{agentId}/duplicate","href":"/api-reference/agents/duplicate"},{"title":"Test agent webhook","api":"POST /agents/{agentId}/test-webhook","href":"/api-reference/agents/test-webhook"},{"title":"Agent knowledge","href":"/api-reference/agents/knowledge"},{"title":"Agent actions","href":"/api-reference/agents/actions"},{"title":"Custom actions","href":"/api-reference/agents/custom-actions"},{"title":"MCP servers","href":"/api-reference/agents/mcp-servers"},{"title":"Extraction fields","href":"/api-reference/agents/extraction-fields"},{"title":"List calendars","api":"GET /calendars","href":"/api-reference/agents/calendars"},{"title":"Give an agent a phone number","api":"PUT /agents/{agentId}/phone-number","href":"/api-reference/agents/assign-phone-number"},{"title":"Take an agent's phone numbers away","api":"DELETE /agents/{agentId}/phone-number","href":"/api-reference/agents/unassign-phone-number"}]},{"group":"Phone Numbers","pages":[{"title":"List phone numbers","api":"GET /phone-numbers","href":"/api-reference/phone-numbers/list"},{"title":"Search numbers","api":"POST /phone-numbers/search","href":"/api-reference/phone-numbers/search"},{"title":"Buy a phone number","api":"POST /phone-numbers","href":"/api-reference/phone-numbers/buy"},{"title":"Get a phone number","api":"GET /phone-numbers/{id}","href":"/api-reference/phone-numbers/get"},{"title":"Update a phone number","api":"PATCH /phone-numbers/{id}","href":"/api-reference/phone-numbers/update"},{"title":"Release a phone number","api":"DELETE /phone-numbers/{id}","href":"/api-reference/phone-numbers/release"}]},{"group":"Contacts","pages":[{"title":"List contacts","api":"GET /contacts","href":"/api-reference/contacts/list"},{"title":"Create contact","api":"POST /contacts","description":"Create a new contact in a Nedzo workspace via the REST API. Provide a phone number, name, email, tags, and custom field values to add a contact record.","href":"/api-reference/contacts/create"},{"title":"Upsert contact","api":"POST /contacts/upsert","href":"/api-reference/contacts/upsert"},{"title":"Get contact","api":"GET /contacts/{id}","description":"Retrieve a single contact by UUID via the Nedzo REST API. Returns the contact name, phone number, email, tags, metadata, and workspace details.","href":"/api-reference/contacts/get"},{"title":"Update contact","api":"PATCH /contacts/{id}","href":"/api-reference/contacts/update"},{"title":"Delete contact","api":"DELETE /contacts/{id}","href":"/api-reference/contacts/delete"},{"title":"Import contacts in bulk","href":"/api-reference/contacts/bulk"},{"title":"Contact tags","href":"/api-reference/contacts/tags"},{"title":"Contact custom fields","href":"/api-reference/contacts/custom-fields"},{"title":"Contact views","href":"/api-reference/contacts/views"}]},{"group":"Knowledge","pages":[{"title":"List knowledge","api":"GET /knowledge","href":"/api-reference/knowledge/list"},{"title":"Add knowledge","api":"POST /knowledge","href":"/api-reference/knowledge/create"},{"title":"Get a file upload link","api":"POST /knowledge/uploads","href":"/api-reference/knowledge/upload"},{"title":"Get knowledge","api":"GET /knowledge/{id}","href":"/api-reference/knowledge/get"},{"title":"Update knowledge","api":"PATCH /knowledge/{id}","href":"/api-reference/knowledge/update"},{"title":"Delete knowledge","api":"DELETE /knowledge/{id}","href":"/api-reference/knowledge/delete"}]},{"group":"Templates","pages":[{"title":"List templates","api":"GET /templates","href":"/api-reference/templates/list"},{"title":"Create template","api":"POST /templates","href":"/api-reference/templates/create"},{"title":"Get template","api":"GET /templates/{id}","href":"/api-reference/templates/get"},{"title":"Update template","api":"PATCH /templates/{id}","href":"/api-reference/templates/update"},{"title":"Delete template","api":"DELETE /templates/{id}","href":"/api-reference/templates/delete"},{"title":"Import template","api":"POST /templates/{id}/import","href":"/api-reference/templates/import"},{"title":"Duplicate template","api":"POST /templates/{id}/duplicate","href":"/api-reference/templates/duplicate"}]},{"group":"Campaigns","pages":[{"title":"List campaigns","api":"GET /campaigns","href":"/api-reference/campaigns/list"},{"title":"Create a campaign","api":"POST /campaigns","href":"/api-reference/campaigns/create"},{"title":"Get a campaign","api":"GET /campaigns/{id}","href":"/api-reference/campaigns/get"},{"title":"Update, start or pause a campaign","api":"PATCH /campaigns/{id}","href":"/api-reference/campaigns/update"},{"title":"Delete a campaign","api":"DELETE /campaigns/{id}","href":"/api-reference/campaigns/delete"},{"title":"List campaign contacts","api":"GET /campaigns/{id}/contacts","href":"/api-reference/campaigns/contacts"},{"title":"Get campaign results","api":"GET /campaigns/{id}/results","href":"/api-reference/campaigns/results"},{"title":"Stop calling a contact","api":"POST /campaigns/{id}/contacts/{contactId}/stop","href":"/api-reference/campaigns/stop-contact"}]},{"group":"Calls","pages":[{"title":"Make a call","api":"POST /call","deprecated":true,"href":"/api-reference/calls"}]},{"group":"Workflows","pages":[{"title":"List workflows","api":"GET /workflows","href":"/api-reference/workflows/list"},{"title":"Create a workflow","api":"POST /workflows","href":"/api-reference/workflows/create"},{"title":"Get a workflow","api":"GET /workflows/{id}","href":"/api-reference/workflows/get"},{"title":"Replace a workflow","api":"PUT /workflows/{id}","href":"/api-reference/workflows/replace"},{"title":"Turn a workflow on or off","api":"PATCH /workflows/{id}","href":"/api-reference/workflows/turn-on-off"},{"title":"Delete a workflow","api":"DELETE /workflows/{id}","href":"/api-reference/workflows/delete"},{"title":"Publish or unpublish a workflow","api":"POST /workflows/{id}/publish","href":"/api-reference/workflows/publish"},{"title":"Versions","api":"GET /workflows/{id}/versions","href":"/api-reference/workflows/versions"},{"title":"Step types","api":"GET /workflows/action-types","href":"/api-reference/workflows/step-types"},{"title":"Add contacts to a workflow","api":"POST /workflows/{id}/enroll","href":"/api-reference/workflows/enroll"},{"title":"Runs","api":"GET /workflows/{id}/runs","href":"/api-reference/workflows/runs"}]},{"group":"Conversations","pages":[{"title":"List conversations","api":"GET /conversations","href":"/api-reference/conversations/list"},{"title":"Get a conversation","api":"GET /conversations/{id}","href":"/api-reference/conversations/get"},{"title":"Start a call","api":"POST /conversations/call","href":"/api-reference/conversations/send-call"},{"title":"Send an SMS","api":"POST /conversations/sms","href":"/api-reference/conversations/send-sms"},{"title":"Send an email","api":"POST /conversations/email","href":"/api-reference/conversations/send-email"},{"title":"Send a WhatsApp message","api":"POST /conversations/whatsapp","href":"/api-reference/conversations/send-whatsapp"},{"title":"Reply on Instagram","api":"POST /conversations/instagram","href":"/api-reference/conversations/send-instagram"},{"title":"Reply on Messenger","api":"POST /conversations/messenger","href":"/api-reference/conversations/send-messenger"}]}]}]},"basePath":"","title":"Upsert contact - Nedzo","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js"]}