Chat icon

Chat

Interact with the Chat API

Actions253

Contact → Find or Create

AI-generated

Summary

Create or update a Contact record based on provided criteria.

Inputs

  • accountId (required) — Select the account to use.
  • name — Name of the contact.
  • phoneNumber — Phone number of the contact in E.164 format.
  • email — Email of the contact.
  • specifyCustomAttributesCreate — Method for providing custom attributes during creation.
  • customAttributesDefinitionCreate — Custom attributes selected from predefined definitions.
  • customAttributesParametersCreate — Key‑value pairs for custom attributes defined by field entries.
  • customAttributesJsonCreate — JSON object containing custom attributes.
  • additionalFields — Additional contact fields such as avatar, company, etc.
  • identifier — External unique identifier for the contact.
  • socialProfiles — Social media profiles to attach to the contact.

Output shape

a single Contact object

Returns the created or retrieved contact record, including its generated ID and all set fields; if multiple matches are found the first is returned.

Examples

Example 1: Create a new contact named John Doe with email and phone number in account 123.

accountId: 123; name: 'John Doe'; email: 'john@example.com'; phoneNumber: '+5511999999999'

Example 2: Find or create a contact with external identifier 'external-42' using key‑value custom attributes.

identifier: 'external-42'; specifyCustomAttributesCreate: 'keypair'; customAttributesParametersCreate: [{name:'key',value:'department'},{name:'value',value:'support'}]

Example 3: Search for a contact by email and, if not found, create it with a JSON-defined custom attribute.

email: 'existing@example.com'; specifyCustomAttributesCreate: 'json'; customAttributesJsonCreate: '{"department":"sales"}'

Links

Discussion