Create Tag

Create a new tag.
POST
/v2/tags
Request Body
Writeable fields
FieldTypeStatusFormatNotes
dataobject
required
--
data.user_idstring (uuid)
optional
uuidUUID of the user who owns the tag; defaults to the caller.
data.tag_namestring
required
-Human-readable tag name. Must be unique per team.
data.colorstring (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
FieldTypeStatusFormatNotes
statusenum
successerror
read-only optional
--
errorstring - Error description (only present on error)
read-only optional
--
dataobject
required
--
data.idstring (uuid)
read-only optional
uuidServer-assigned UUID.
data.user_idstring (uuid)
optional nullable
uuidUUID of the user who owns the tag; defaults to the caller.
data.tag_namestring
required
-Human-readable tag name. Must be unique per team.
data.ownerstring
read-only optional
-Server-assigned based on user_id; resolves to the user's display name.
data.colorstring (hex RGB)
optional nullable
-Hex RGB (e.g., #FD7E14). If omitted, a default color may be assigned.
data.created_atstring (ISO 8601)
read-only optional
date-timeServer-assigned ISO timestamp.