Create a tag

POST/api/v2/contacts/tags

Creates a tag. Returns 201 when created, or 200 when an archived tag with the same name is reactivated.

Rate limit 300 requests per minute

Headers

  • x-api-keyheaderRequired

    Your API key.

  • Content-TypeheaderRequired

    application/json

Body

  • namestringRequired

    Up to 50 characters: letters a to z, numbers, spaces, hyphens and underscores. Saved in lowercase.

  • colorstring

    Hex code (#2563eb) or color name (blue). Unknown names and no value fall back to gray (#6B7280).

  • created_bystring

    Email of the team member who created it.

Errors

ErrorWhen
400invalid_name
name is missing, too long or has characters that are not allowed.
400invalid_color
color is not a 6-digit hex code or color name.
400invalid_created_by
created_by is not a valid email address.
403user_not_in_organization
The created_by email belongs to someone outside your organization.
404unknown_created_by
No user with the created_by email.
409tag_already_exists
An active tag with this name exists.
Request
curl -X POST "https://app.dmtracker.ai/api/v2/contacts/tags" \
  -H "x-api-key: $DMTRACKER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "webinar lead",
    "color": "#2563eb"
  }'
Response 201
{
  "status": "success",
  "message": "Tag created",
  "data": {
    "id": 301,
    "name": "webinar lead",
    "color": "#2563eb",
    "status": "active",
    "contact_count": 0,
    "contact_count_precision": "exact",
    "created_at": "2026-10-29T10:11:45.000+00:00",
    "updated_at": "2026-10-29T10:11:45.000+00:00"
  }
}
Link copied