Contacts API

Manage contacts in your EmacronAI CRM workspace. Create contacts from signups, imports, or lead forms. Update them when data changes. Use tags and custom fields for segmentation.

Endpoints

MethodPathScopeDescription
GET/api/v1/contactscontacts:readList contacts (paginated)
GET/api/v1/contacts/:idcontacts:readGet a single contact
POST/api/v1/contactscontacts:writeCreate a new contact
PATCH/api/v1/contacts/:idcontacts:writeUpdate contact fields

GET /api/v1/contacts

Returns a paginated list of contacts. Supports search by name, phone, or email.

Query parameters

ParamTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger25Results per page (max 100)
searchstring—Search by name, phone, or email
SDK
const { data, total, has_more } = await oa.contacts.list({
  page:   1,
  limit:  25,
  search: 'Rajesh',
});

POST /api/v1/contacts

Create a new contact. At minimum, name is required. Either phone or email is strongly recommended.

const contact = await oa.contacts.create({
  name:         'Rajesh Kumar',
  phone:        '+919876543210',
  email:        'rajesh@example.com',
  company_name: 'Acme Corp',
  designation:  'CTO',
  city:         'Pune',
  source:       'WhatsApp CTwA',
  tags:         ['enterprise', 'warm-lead'],
  custom_fields: {
    gst_number: '27AAPFU0939F1ZV',
    mrr:        '50000',
  },
});
// returns full Contact object with id, created_at, etc.

PATCH /api/v1/contacts/:id

Partially update a contact. Only send the fields you want to change. Updatable fields: name email phone company_name designation city status.

const updated = await oa.contacts.update('contact_id_here', {
  status: 'qualified',
  city:   'Mumbai',
});

Contact object schema

FieldTypeDescription
idstringUnique contact ID (UUID)
namestringFull name (required on create)
phonestringE.164 phone number e.g. +919876543210
emailstringEmail address
company_namestringCompany or organisation name
designationstringJob title or role
citystringCity of residence or work
sourcestringLead source tag e.g. "WhatsApp", "Website"
statusstringContact status e.g. "active", "unsubscribed"
tagsstring[]Array of tag strings for segmentation
custom_fieldsobjectKey-value map of custom field data
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last-updated timestamp

Next steps