Create Contact-Tag Link
Create an association between a contact and a tag.
POST
/v2/tag/contacts
Request Body
contact_id uuid
Required
The Contact to link.
tag_id uuid
Required
The Tag to link.
cURl example
curl -X POST 'https://lunarsend.com/api/v2/tag/contacts' \
-H 'x-api-key: $LUNARSEND_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"contact_id": "40de0a85-b09f-41a5-9935-c2746a8f10bb",
"tag_id": "a0cb441b-afc6-4b5c-8689-0c4577193f99"
}'Response
[
{
"status": "success",
"data": {
"id": "fac6c552-16ae-496e-8bf7-b3093ddb84fe",
"tag_id": "a0cb441b-afc6-4b5c-8689-0c4577193f99",
"contact_id": "40de0a85-b09f-41a5-9935-c2746a8f10bb",
"created_at": "2025-10-05T00:03:55.625158+00:00",
"tag_name": "VIP",
"user_id": "f446e4f9-5110-4a75-92bd-73a4a0c54196",
"owner": "Joshua"
}
}
]Response Fields
| Field | Type | Status | Format | Notes |
|---|---|---|---|---|
| status | enum successerror | read-only optional | - | - |
| error | string - Error description (only present on error) | read-only optional | - | - |
| data | object | required | - | - |
| data.id | string (uuid) | read-only optional | uuid | Server-assigned UUID of the link. |
| data.tag_id | string (uuid) | required | uuid | UUID of the Tag to link (required). |
| data.contact_id | string (uuid) | required | uuid | UUID of the Contact to link (required). |
| data.created_at | string (ISO 8601) | read-only optional | date-time | Server-assigned timestamp for when the link was created. |
| data.tag_name | string | read-only optional | - | Resolved from the tag; not writable. |
| data.user_id | string (uuid) | read-only optional | uuid | Owning user's UUID (derived from context). |
| data.owner | string | read-only optional | - | Resolved display name for the owning user. |