Search Tags

Search tags by term and field. Supports pagination.
GET
/v2/tags/search
Query Parameters
search_term string

Term to search for (e.g., 'VIP' or '#FD7E14').

search_by string

Field to search by (e.g., 'tag_name' or 'color').

query_amount number

Max results per page (alias for per_page).

page number

Zero-based page index (default 0).

cURl example
curl -X GET 'https://lunarsend.com/api/v2/tags/search?query_amount=5' \
  -H 'x-api-key: $LUNARSEND_API_KEY' \
  -H 'Accept: application/json'
Response
{
  data: [
    {
      id: "7b1b6f49-1a4a-4a1a-9b3a-7f2a7a0b7a11",
      user_id: "77f463d7-4107-1957-8b71-ab03acc319a2",
      tag_name: "VIP",
      owner: "John",
      color: "#23FD7E14",
      created_at: "2025-10-04T14:17:28.266864+00:00"
    },
    {
      id: "9d8fa0ad-c3e6-4f7a-8c88-0a7a6f0c2c33",
      user_id: "77f463d7-4107-1957-8b71-ab03acc319a2",
      tag_name: "Warm Lead",
      owner: "John",
      color: "#0D6EFD",
      created_at: "2025-09-30T10:05:41.000+00:00"
    },
    {
      id: "a44a203d-431c-4201-b1f2-d049cd458c99",
      user_id: "f446e4f9-5110-4a75-92bd-73a4a0c54196",
      tag_name: "Lead",
      owner: "Joshua",
      color: "#28A745",
      created_at: "2025-09-25T14:12:03.000+00:00"
    }
  ],
  total_count: 46,
  page: 0,
  per_page: 5
}
Response Fields
FieldTypeStatusFormatNotes
total_countint
read-only optional
-Total tags matching the search; mirrored top-level and available for UI pagination.
pageint
read-only optional
-Zero-based page index.
per_pageint
read-only optional
-Results per page.
dataobject
required
--
data.idstring (uuid)
read-only optional
uuidTag ID (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 timestamp.