Skip to main content
Tags are project-level labels you can attach to contacts for filtering, segmentation, and campaign targeting.

Authentication

All endpoints require:
  • Authorization: Bearer YOUR_API_KEY
  • X-Project-ID: YOUR_PROJECT_ID (or encoded in the API key)

Endpoints

MethodPathDescription
GET/api/v1/contacts/tagsList all tags
POST/api/v1/contacts/tagsCreate a tag
PUT/api/v1/contacts/tags/:idUpdate a tag
DELETE/api/v1/contacts/tags/:idDelete a tag
POST/api/v1/contacts/contact-tagsAdd a tag to a contact
DELETE/api/v1/contacts/contact-tagsRemove a tag from a contact

List Tags

GET https://api.usegately.com/api/v1/contacts/tags
SDK
const tags = await crm.listTags()
Response
[
  { "id": "tag-uuid-1", "name": "VIP", "color": "#ff6600", "project_id": "proj-uuid", "created_at": "2025-01-01T00:00:00.000Z" },
  { "id": "tag-uuid-2", "name": "Newsletter", "color": null, "project_id": "proj-uuid", "created_at": "2025-01-02T00:00:00.000Z" }
]

Create Tag

POST https://api.usegately.com/api/v1/contacts/tags
Body
{ "name": "VIP", "color": "#ff6600" }
SDK
const tag = await crm.createTag({ name: 'VIP', color: '#ff6600' })

Update Tag

PUT https://api.usegately.com/api/v1/contacts/tags/TAG_ID
Body
{ "color": "#0066ff" }
SDK
await crm.updateTag('TAG_ID', { color: '#0066ff' })

Delete Tag

Deletes the tag and removes it from all contacts.
DELETE https://api.usegately.com/api/v1/contacts/tags/TAG_ID
SDK
await crm.deleteTag('TAG_ID')

Add Tag to Contact

POST https://api.usegately.com/api/v1/contacts/contact-tags
Body
{ "contact_id": "CONTACT_ID", "tag_id": "TAG_ID" }
SDK
await crm.addTagToContact('CONTACT_ID', 'TAG_ID')

Remove Tag from Contact

DELETE https://api.usegately.com/api/v1/contacts/contact-tags?contact_id=CONTACT_ID&tag_id=TAG_ID
SDK
await crm.removeTagFromContact('CONTACT_ID', 'TAG_ID')

TypeScript Type

interface ContactTag {
  id: string
  project_id: string
  name: string
  color?: string | null
  created_at: string
}