Skip to main content
POST
Create a contact

Authorizations

Authorization
string
header
required

HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).

Headers

Idempotency-Key
string

Up to 255 characters naming this create. See Retries in the operation description.

Maximum string length: 255

Body

application/json
name
string
required
Required string length: 1 - 150
type
enum<string>
default:contact
Available options:
contact,
lead
title
string
Maximum string length: 255
company
string
Maximum string length: 100
industry
string
Maximum string length: 100
website
string
Maximum string length: 100
address
string
Maximum string length: 255
city
string
Maximum string length: 255
state
string
Maximum string length: 255
zip
string
Maximum string length: 15
countryCode
string

ISO 3166-1 alpha-2.

Example:

"GB"

phones
string[]

Up to 20 numbers in E.164. An invalid number is rejected, not dropped.

Maximum array length: 20
emails
string[]

Up to 20 valid addresses. An invalid address is rejected, not dropped.

Maximum array length: 20
tagIds
string[]

Up to 50 existing contact tag ids from List contact tags. Read-only tags are refused. To use a new tag, create it first with Create a contact tag.

Maximum array length: 50
customFields
object

Keys are field names from List contact fields. Values are strings of up to 255 characters. At most 100 keys.

favoriteUserId
string

A user in your account who owns the contact.

matchBy
enum<string>
default:none

none creates a new contact without a duplicate check. phone, email or emailOrPhone updates a matching contact instead (see the operation description).

Available options:
none,
phone,
email,
emailOrPhone

Response

matchBy found a contact, and it was updated with the fields you sent. Only when matchBy is not none.

A contact or lead, with every number, email, tag and custom field.

id
string
required

Contact id.

Example:

"44210"

type
enum<string>
required
Available options:
contact,
lead
name
string | null
required

The contact's name. null only for an older contact saved without one: contacts created through this API always have a name, and an update cannot clear it.

Required string length: 1 - 150
Example:

"Jane Doe"

title
string | null
required
Maximum string length: 255
company
string | null
required
Maximum string length: 100
industry
string | null
required
Maximum string length: 100
website
string | null
required
Maximum string length: 100
address
string | null
required
Maximum string length: 255
city
string | null
required
Maximum string length: 255
state
string | null
required
Maximum string length: 255
zip
string | null
required
Maximum string length: 15
country
object | null
required
phones
string[]
required

Every number on the contact, in E.164.

Example:
emails
string[]
required

Every email on the contact.

Example:
tags
object[]
required

The contact's contact tags. Integration tags are not listed.

customFields
object
required

Custom field values as strings, keyed by the field name from List contact fields.

Example:
favoriteUserId
string | null
required

The user who owns the contact.

Example:

"7"

source
string
required

Where the contact came from. Contacts created through this API have api. Read-only.

Example:

"api"

createdAt
string<date-time>
required
updatedAt
string<date-time>
required

Time of the last change. It moves on changes made through this API, the Dashboard contact form and CSV import. Dashboard bulk edits, CRM list sync, and renaming or deleting a contact tag do not move it.

dashboardUrl
string
required

Link to the contact's page in the CloudTalk Dashboard. It carries no credentials: the person must be signed in to your company's Dashboard, and your company must have Contacts in its menu, otherwise the Dashboard opens their default page. Read-only.

Example:

"https://dashboard.cloudtalk.io/menu/contacts/details/44210"