AI Sync

Import Contacts

Automap Columns

POSThttps://app.aisync.link/api/contacts/import/automap
Automap Columns
curl --request POST \
  --url https://app.aisync.link/api/contacts/import/automap \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "headers": [
    "Phone",
    "First"
  ],
  "mapping": {},
  "sample_rows": [
    {
      "First": "Ada",
      "Phone": "15551212000"
    }
  ]
}'
{
  "mapping": {
    "First": "first_name",
    "Phone": "phone_number"
  },
  "success": true,
  "phone_mapped": true
}

Automap Columns#

Fills blank CSV mappings. One column must end up mapped to phone_number before an import can start.

Authorizationstringheaderrequired

Bearer token in the format: Bearer {access_token}

mappingobjectbodyrequired

CSV header to contact field. Send {} to let the server map them

headersstring[]body

CSV header row

sample_rowsobject[]body

A few data rows used to detect the phone column

curl --request POST \
  --url https://app.aisync.link/api/contacts/import/automap \
  --header 'Authorization: Bearer {{bearer_token}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "mapping": {},
  "headers": [
    "Phone",
    "First"
  ],
  "sample_rows": [
    {
      "Phone": "15551212000",
      "First": "Ada"
    }
  ]
}'
mappingobject

Resolved header-to-field map