Skip to main content
POST
/
api
/
contacts
Create or update a contact
curl --request POST \
  --url https://core-api.getaptly.com/api/contacts \
  --header 'Content-Type: application/json' \
  --header 'x-token: <api-key>' \
  --data '
{
  "firstname": "Jane",
  "lastname": "Smith",
  "email": "[email protected]",
  "phone": [
    {
      "number": "+15555550100",
      "type": "mobile"
    }
  ],
  "contactType": "Tenant"
}
'
{
  "_id": "<string>",
  "uuid": "<string>",
  "firstname": "<string>",
  "lastname": "<string>",
  "fullName": "<string>",
  "duogram": "<string>",
  "photoId": "<string>",
  "imageUrl": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "typeId": "<string>",
  "companyId": "<string>",
  "address": {},
  "title": "<string>",
  "alerts": [
    {}
  ],
  "company": "<string>",
  "isCompany": true
}

Authorizations

x-token
string
header
required

Body

application/json
_id
string

Existing contact ID — when provided, updates that contact.

firstname
string
lastname
string
email

One or more email addresses.

phone
object[]
typeId
string

Contact type ID.

contactType
string

Contact type name (alternative to typeId — resolved to an ID automatically).

isCompany
boolean
title
string
company
string
imageUrl
string

Absolute URL to a JPG or PNG photo.

customFields
object

Map of custom field ID to value. Unknown field IDs are rejected.

Response

Contact created or updated.

_id
string

MongoDB ObjectId of the contact.

uuid
string
firstname
string
lastname
string
fullName
string

Computed display name (first + last, or company name for org records).

duogram
string

Two-letter initials derived from first and last name.

photoId
string | null
imageUrl
string | null

CDN thumbnail URL for the contact's photo, or null if none.

email
string
phone
string
typeId
string
companyId
string
address
object
title
string
alerts
object[]
company
string

Company name — populated when isCompany is true.

isCompany
boolean