TheDocumentation Index
Fetch the complete documentation index at: https://usegately.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
GatelyContacts class gives you full programmatic access to Gately’s CRM — create and manage contacts, organise them into lists and segments, apply tags, track email activity, and handle unsubscribes.
Installation
Setup
GatelyContacts works in both browser and Node.js environments. It automatically selects the right internal client for each platform.Contacts
list(options?)
List contacts with optional filtering and pagination.
| Option | Type | Description |
|---|---|---|
page | number | Page number (default 1) |
limit | number | Results per page (default 50) |
search | string | Search by name or email |
status | ContactStatus | Filter by status |
tags | string | Comma-separated tag names to filter by |
segment_id | string | Filter to contacts in a segment |
get(contactId)
Fetch a single contact by ID.
create(data)
Create a new contact.
update(contactId, data)
Partially update a contact. Only the fields you pass are changed.
delete(contactId)
Permanently delete a contact.
bulkImport(contacts, options?)
Import up to 1,000 contacts in a single call. Duplicate emails are skipped by default.
Contact Sub-resources
getContactLists(contactId)
Get all lists and segments a contact belongs to.
getEmailActivity(contactId)
Get the email send/open/click history for a contact.
sent · delivered · opened · clicked · bounced · complained · unsubscribed
getCustomFields(contactId)
Retrieve the custom fields object for a contact.
updateCustomFields(contactId, fields)
Merge-update custom fields (PATCH — existing keys are preserved).
unsubscribeContact(contactId, data?)
Unsubscribe a contact and record the reason.
resubscribeContact(contactId)
Remove the unsubscribe record and re-enable email delivery.
getUnsubscribes(contactId)
Get all unsubscribe records for a contact.
Tags
listTags()
List all tags for the project.
createTag(data)
Create a new tag.
updateTag(tagId, data)
Update a tag’s name or colour.
deleteTag(tagId)
Delete a tag. It is automatically removed from all contacts.
addTagToContact(contactId, tagId)
Attach a tag to a contact.
removeTagFromContact(contactId, tagId)
Remove a tag from a contact.
Contact Lists
listContactLists()
List all contact lists for the project.
getContactList(listId)
Get a single list by ID.
createContactList(data)
Create a new list.
updateContactList(listId, data)
Update a list’s name or description.
deleteContactList(listId)
Delete a list. Contacts are not deleted.
getListMembers(listId, options?)
Get all contacts in a list.
addContactToList(listId, contactId)
Add a contact to a list.
removeContactFromList(listId, contactId)
Remove a contact from a list.
Segments
Segments are dynamic — they automatically include contacts that match a set of filter rules.listSegments()
getSegment(segmentId)
createSegment(data)
Create a segment with filter rules.
| Operator | Description |
|---|---|
eq | Equals |
neq | Not equals |
contains | String contains |
not_contains | String does not contain |
gt / lt | Greater / less than |
gte / lte | Greater / less than or equal |
exists | Field is present and non-null |
empty | Field is null or missing |
updateSegment(segmentId, data)
deleteSegment(segmentId)
TypeScript Types
All types are exported from@gately/sdk:
ContactStatus
Contact
SegmentRule
Complete Example
Related
List Contacts API
REST endpoint reference
Create Contact API
Create endpoint reference
Tags API
Tags endpoint reference
Segments API
Segments endpoint reference