Skip to main content
POST
/
v1
/
tags
/
contacts
/
{contactId}
/
create-assign
Create and assign tags to a contact
curl --request POST \
  --url https://api.prod.getdex.com/v1/tags/contacts/{contactId}/create-assign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tagNames": [
    "<string>"
  ]
}
'
{
  "error": true,
  "message": "<string>",
  "data": {
    "tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "color": "<string>",
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ]
  }
}

Use cases

  • Let users type new tags directly on a contact detail page
  • Quickly categorize a contact with new labels without a separate tag creation step
  • Import contacts with tags where the tags may not exist yet
If a tag with the same name already exists, it will be reused rather than creating a duplicate.

Authorizations

Authorization
string
header
required

Use your Dex API key (e.g. dex_abc123...) as the Bearer token.

Path Parameters

contactId
string<uuid>
required

Body

application/json
tagNames
string[]
required
Minimum string length: 1

Response

Successful response

error
boolean
required
message
string
required
data
object
required