Documentation
Sign In

Contacts

Manage the people your organization works with. Contacts can be linked to a company and referenced from deals, tasks, and notes.

Required scopes:contacts:readcontacts:write

All endpoints require authentication with an API key via Authorization: Bearer anch_... — see Authentication. A :write scope implicitly includes its :read scope.

Quick example

curl https://your-domain.com/api/contacts?companyId=cmp_123 \
  -H "Authorization: Bearer anch_your_api_key"

Endpoints

GET/api/contacts
POST/api/contacts
GET/api/contacts/{id}
PATCH/api/contacts/{id}
DELETE/api/contacts/{id}

GET/api/contacts

Query parameters

FieldTypeDescription
searchstringFull-text search across name and email
companyIdstringFilter to contacts at a specific company
sortBystringlastName, email, or createdAt (default: lastName)
sortOrderstringasc or desc
limitintegerPage size (default: 50)
offsetintegerPagination offset (default: 0)

Response (200)

{
  "data": [ { "id": "cnt_...", "firstName": "Jane", "lastName": "Doe", ... } ],
  "meta": { "total": 128, "limit": 50, "offset": 0 }
}

POST/api/contacts

Body fields

FieldTypeDescription
firstNamerequiredstringFirst name
lastNamerequiredstringLast name
emailstringEmail address
phonestringPhone number
positionstringJob title / role
companyIdstringID of the company this contact belongs to
notesstringFree-form notes

Response (201)

{ "id": "cnt_V1StGXR8Z5jdHi6B" }

GET/api/contacts/{id}

Response (200)

{
  "data": {
    "id": "cnt_V1StGXR8Z5jdHi6B",
    "organizationId": "org_4f90...",
    "firstName": "Jane",
    "lastName": "Doe",
    "email": "jane@acme.com",
    "phone": "+1 (555) 222-1234",
    "position": "VP of Operations",
    "companyId": "cmp_...",
    "notes": null,
    "createdAt": 1736899200000,
    "updatedAt": 1736899200000,
    "deletedAt": null
  }
}

PATCH/api/contacts/{id}

PUT is also accepted. All fields are optional; only provided fields are updated.

Body fields

FieldTypeDescription
firstNamestringFirst name
lastNamestringLast name
emailstringEmail address
phonestringPhone number
positionstringJob title / role
companyIdstringID of the company this contact belongs to
notesstringFree-form notes

Response (200)

{ "ok": true }

DELETE/api/contacts/{id}

Contacts are soft-deleted and excluded from subsequent list and get requests.

Response (200)

{ "ok": true }

Notes

  • IDs are nanoid strings, not UUIDs.
  • Timestamps are Unix epoch milliseconds.