Create Tag
Create a new tag.
POST
/v2/tags
Request Body
Writeable fields
| Field | Type | Status | Format | Notes |
|---|---|---|---|---|
| data | object | required | - | - |
| data.user_id | string (uuid) | optional | uuid | UUID of the user who owns the tag; defaults to the caller. |
| data.tag_name | string | required | - | Human-readable tag name. Must be unique per team. |
| data.color | string (hex RGB) | optional | - | Hex RGB (e.g., #FD7E14). If omitted, a default color may be assigned. |
cURl example
curl -X POST 'https://lunarsend.com/api/v2/tags' \
-H 'x-api-key: $LUNARSEND_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"tag_name": "VIP",
"color": "#FD7E14"
}'Response
[
{
status: "success",
data: {
id: "7b2b6f49-1a4a-4a1a-9b3a-7f2a7a0b7a11",
user_id: "77f463d7-4107-1957-8b71-ab03acc319a2",
tag_name: "VIP",
owner: "John",
color: "#FD7E14",
created_at: "2025-10-04T14:17:28.266864+00:00"
}
}
]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. |
| data.user_id | string (uuid) | optional nullable | uuid | UUID of the user who owns the tag; defaults to the caller. |
| data.tag_name | string | required | - | Human-readable tag name. Must be unique per team. |
| data.owner | string | read-only optional | - | Server-assigned based on user_id; resolves to the user's display name. |
| data.color | string (hex RGB) | optional nullable | - | Hex RGB (e.g., #FD7E14). If omitted, a default color may be assigned. |
| data.created_at | string (ISO 8601) | read-only optional | date-time | Server-assigned ISO timestamp. |