Skip to content

Create a contact

POST/v1/contacts

Creates a new contact record.

After creation, Lightfield automatically enriches the contact in the background.

Supports idempotency via the Idempotency-Key header.

Required scope: contacts:create

Rate limit category: Write

Body ParametersJSONExpand Collapse
fields: object { "$email", "$name", "$profilePhotoUrl" } or map[string or number or boolean or 2 more]

Field values for the new contact. System fields use a $ prefix (e.g. $email, $name); custom attributes use their bare slug. Note: $name is an object { firstName, lastName }, not a plain string. Call the definitions endpoint to discover available fields and their types. See Fields and relationships for value type details.

Accepts one of the following:
UnionMember0 = object { "$email", "$name", "$profilePhotoUrl" }
"$email": optional array of string

List of email addresses for the contact (EMAIL, multi-value).

"$name": optional object { firstName, lastName }

The contact's name. Unlike other resources, this is an object: { firstName?: string, lastName?: string }, not a plain string.

firstName: optional string

The contact's first name.

lastName: optional string

The contact's last name.

"$profilePhotoUrl": optional string

URL of the contact's profile photo (URL).

UnionMember1 = map[string or number or boolean or 2 more]
Accepts one of the following:
UnionMember0 = string
UnionMember1 = number
UnionMember2 = boolean
UnionMember3 = array of string or number or boolean or 2 more
Accepts one of the following:
UnionMember0 = string
UnionMember1 = number
UnionMember2 = boolean
UnionMember3 = array of unknown
UnionMember4 = map[unknown]
UnionMember4 = map[string or number or boolean or 2 more]
Accepts one of the following:
UnionMember0 = string
UnionMember1 = number
UnionMember2 = boolean
UnionMember3 = array of unknown
UnionMember4 = map[unknown]
relationships: optional object { "$account" } or map[string or array of string]

Relationships to set on the new contact. System relationships use a $ prefix (e.g. $account); custom relationships use their bare slug. Each value is a single entity ID or an array of IDs. Call the definitions endpoint to list available relationship keys.

Accepts one of the following:
Account = object { "$account" }
"$account": optional string or array of string

ID(s) of accounts to associate with this contact.

Accepts one of the following:
UnionMember0 = string
UnionMember1 = array of string
UnionMember1 = map[string or array of string]
Accepts one of the following:
UnionMember0 = string
UnionMember1 = array of string
ReturnsExpand Collapse
ContactCreateResponse = object { id, createdAt, fields, 2 more }
id: string

Unique identifier for the entity.

createdAt: string

ISO 8601 timestamp of when the entity was created.

fields: map[object { value, valueType } ]

Map of field names to their typed values. System fields are prefixed with $ (e.g. $name, $email); custom attributes use their bare slug.

value: string or number or boolean or 2 more

The field value, or null if unset.

Accepts one of the following:
UnionMember0 = string
UnionMember1 = number
UnionMember2 = boolean
UnionMember3 = array of string or number or boolean or 2 more
Accepts one of the following:
UnionMember0 = string
UnionMember1 = number
UnionMember2 = boolean
UnionMember3 = array of unknown
UnionMember4 = map[unknown]
UnionMember4 = map[string or number or boolean or 2 more]
Accepts one of the following:
UnionMember0 = string
UnionMember1 = number
UnionMember2 = boolean
UnionMember3 = array of unknown
UnionMember4 = map[unknown]
valueType: "ADDRESS" or "CHECKBOX" or "CURRENCY" or 11 more

The data type of the field.

Accepts one of the following:
"ADDRESS"
"CHECKBOX"
"CURRENCY"
"DATETIME"
"EMAIL"
"FULL_NAME"
"MARKDOWN"
"MULTI_SELECT"
"NUMBER"
"SINGLE_SELECT"
"SOCIAL_HANDLE"
"TELEPHONE"
"TEXT"
"URL"
relationships: map[object { cardinality, objectType, values } ]

Map of relationship names to their associated entities. System relationships are prefixed with $ (e.g. $owner, $contact).

cardinality: string

Whether the relationship is has_one or has_many.

objectType: string

The type of the related object (e.g. account, contact).

values: array of string

IDs of the related entities.

Create a contact

curl https://api.lightfield.app/v1/contacts \
    -H 'Content-Type: application/json' \
    -H 'Lightfield-Version: 2026-03-01' \
    -H "Authorization: Bearer $API_KEY" \
    -d '{
          "fields": {}
        }'
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ]
    }
  }
}
Returns Examples
{
  "id": "id",
  "createdAt": "createdAt",
  "fields": {
    "foo": {
      "value": "string",
      "valueType": "ADDRESS"
    }
  },
  "httpLink": "httpLink",
  "relationships": {
    "foo": {
      "cardinality": "cardinality",
      "objectType": "objectType",
      "values": [
        "string"
      ]
    }
  }
}