AI Sync

Setup Contact Fields

Add Contact Field

POSThttps://app.aisync.link/api/contacts/fields
Add Contact Field
curl --request POST \
  --url https://app.aisync.link/api/contacts/fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "lead_source",
  "ctype": "string",
  "length": 100
}'
{
  "data": {
    "key": "lead_source",
    "label": "Lead Source",
    "length": 100
  },
  "message": "Contact field created successfully.",
  "success": true
}

Add Contact Field#

Creates a custom column on Manage → Setup Contact Fields. The name is stored as lowercase letters, numbers, and underscores. Spaces become underscores.

Authorizationstringheaderrequired

Bearer token in the format: Bearer {access_token}

Content-Typestringheaderrequired

Must be set to application/json

namestringbodyrequired

Field name. fname is accepted as an alias. Example: lead_source

ctypestringbody

Column type: string, text, or longtext. Defaults to string

lengthintegerbody

Length for a string column. Defaults to 100. Extra phone columns (phone_number1, phone_number2) are stored as length 20

curl --location 'https://app.aisync.link/api/contacts/fields' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {{bearer_token}}' \
  --data '{
    "name": "lead_source",
    "ctype": "string",
    "length": 100
  }'
successboolean

true when the column was created

messagestring

Contact field created successfully.

data.keystring

Saved column key

data.labelstring

Display label

data.lengthinteger

Stored length

Reserved names cannot be created, including phone_number, email, first_name, last_name, id, and other system columns. A name that already exists returns 422.