Skip to content

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.

Workspace records and shopper accounts

A Contact is a staff-managed person record. Linked CRM records, Inbox conversations and verified Store shopper accounts keep their own access rules. Matching an email address does not authorize a shopper account.

The client API uses https://api.crm.emacronai.com/api/v1 with a scoped API key. Administrator import and privacy-review endpoints use a signed-in workspace session, with current role and record permissions.

Administrator import, export and privacy review guide

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. Filters are exact-match; there is no free-text search parameter.

Query parameters

ParamTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger25Results per page (max 100)
emailstring—Exact-match email filter
phonestring—Exact-match phone filter
stagestring—Exact-match status/stage filter
SDK
const res = await oa.contacts.list({
  page:  1,
  limit: 25,
  email: 'rajesh@example.com',   // exact match
});
// res.data — contacts on this page
// res.pagination — { page, limit, total, total_pages }

POST /api/v1/contacts

Create a new contact. At least one of name, email or phone is required. The API accepts exactly these fields: name email phone company_name designation city source — other keys (tags, custom fields) are not part of this API and are not stored.

const contact = await oa.contacts.create({
  name:         'Rajesh Kumar',
  phone:        '+919876543210',
  email:        'rajesh@example.com',
  company_name: 'Acme Corp',
  designation:  'CTO',
  city:         'Pune',
  source:       'api',
});
// returns the created Contact object with id, created_at, etc.
// 409 if a contact with the same identity already exists

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 (at least one of name / email / phone is 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", "api"
statusstringContact status e.g. "active", "unsubscribed"
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last-updated timestamp

Next steps