company logo

Help center

Go to DMLY
FacebookInstagramXLinkedIn
All collectionsIntegrations & APIREST API ReferenceREST API EndpointsContact Tag API

Contact Tag API

Organize and manage your contact tags for segmentation and advanced filtering using the Contact Tag API endpoints.

Organize and manage your contact tags for segmentation, filtering, and automation using DMLY’s Contact Tag API.

Base URL:

https://api.dmly.io/rest

All endpoints require authentication using the x-api-key header.

VIDEO GUIDE:


🔐 Authentication

Every request must include:

x-api-key: YOUR_API_KEY

Generate your API key from:

DMLY → Integrations → REST API → Edit Setup


📌 Contact Tag Endpoints Overview

Method

Endpoint

Description

GET

/v1/contactTags

List/Search contact tags

POST

/v1/contactTags

Create a contact tag

GET

/v1/contactTags/{contactTagId}

Get contact tag by ID

DELETE

/v1/contactTags/{contactTagId}

Delete contact tag by ID


1⃣ List / Search Contact Tags

Endpoint

GET /v1/contactTags

Description

Retrieve a list of contact tags with optional filtering and pagination.

Query Parameters

Name

Type

Required

Description

limit

string

No

Max number of results

page

string

No

Page number for pagination

searchText

string

No

Free-text search

Example Request

curl -X GET "https://api.dmly.io/rest/v1/contactTags?limit=20" \
  -H "x-api-key: YOUR_API_KEY"

Response

200 OK → Returns an array of contact tag objects


2⃣ Create Contact Tag

Endpoint

POST /v1/contactTags

Description

Create a new contact tag.

Headers

x-api-key: YOUR_API_KEY
Content-Type: application/json

Example Request

curl -X POST "https://api.dmly.io/rest/v1/contactTags" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "VIP"
  }'

Response

200 OK → Returns the created contact tag object


3⃣ Get Contact Tag by ID

Endpoint

GET /v1/contactTags/{contactTagId}

Path Parameters

Name

Required

Description

contactTagId

Yes

Unique contact tag ID

Example Request

curl -X GET "https://api.dmly.io/rest/v1/contactTags/12345" \
  -H "x-api-key: YOUR_API_KEY"

Response

200 OK → Returns contact tag object


4⃣ Delete Contact Tag by ID

Endpoint

DELETE /v1/contactTags/{contactTagId}

Description

Delete a contact tag permanently.

Example Request

curl -X DELETE "https://api.dmly.io/rest/v1/contactTags/12345" \
  -H "x-api-key: YOUR_API_KEY"

Response

{
  "success": true
}

📦 Contact Tag Schema

{
  "id": "string",
  "name": "string",
  "canonical": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

Field Descriptions

Field

Description

id

Unique tag ID

name

Tag display name

canonical

System-normalized version of tag name

createdAt

Creation timestamp

updatedAt

Last updated timestamp


🗑 Delete Response Schema

{
  "success": true
}

💡 Best Practices

  • Use consistent naming conventions for tags.

  • Avoid duplicate tag creation — search before creating.

  • Keep tag names short and meaningful.

  • Use tags strategically for segmentation and broadcast targeting.

  • Do not delete tags actively used in automations unless necessary.


🔄 How Tags Work with Contacts

You can:

  • Create tags using the Contact Tag API

  • Assign tags to contacts using:

    POST /v1/contacts/{contactId}/tags/add
    
  • Remove tags from contacts using:

    POST /v1/contacts/{contactId}/tags/remove
    

This allows complete programmatic segmentation control.

Did this answer your question?
😞
😐
😁