Syntext DOCS
Get Started
API List Audience Tags
GET/v1/projects/{projectId}/audiences/tags

List Audience Tags

Retrieve all unique audience tags used across all profiles in a project. Useful for understanding which tags are available when creating or editing profiles.

Path Parameters

The project ID.

Response

Returns an array of unique audience tags with usage counts.

Tag Object

The audience tag name.

Number of profiles that include this tag.

Number of pages that require this tag (from the latest build).

Example

curl https://api.syntext.dev/v1/projects/proj_abc123/audiences/tags \
-H "Authorization: Bearer stx_abc12345_..."
import { Syntext } from '@syntext/sdk'

const client = new Syntext('stx_abc12345_...')

const tags = await client.audiences.listTags('proj_abc123')
from syntext import Syntext

client = Syntext("stx_abc12345_...")

tags = client.audiences.list_tags("proj_abc123")

Response

{
  "data": [
    {
      "tag": "otc",
      "profileCount": 3,
      "pageCount": 12
    },
    {
      "tag": "virtual-accounts",
      "profileCount": 2,
      "pageCount": 8
    },
    {
      "tag": "enterprise",
      "profileCount": 1,
      "pageCount": 5
    },
    {
      "tag": "beta",
      "profileCount": 1,
      "pageCount": 3
    },
    {
      "tag": "transfers",
      "profileCount": 2,
      "pageCount": 15
    }
  ]
}

Use Cases

Validate Tag Coverage

Before adding a new audience tag to a profile, check if any pages actually use it:

const tags = await client.audiences.listTags('proj_abc123')
const betaTag = tags.find(t => t.tag === 'beta')

if (!betaTag || betaTag.pageCount === 0) {
  console.warn('No pages are tagged with "beta" - adding this to a profile will have no effect')
}

Find Orphaned Tags

Identify tags that exist in page frontmatter but aren't assigned to any profile:

const tags = await client.audiences.listTags('proj_abc123')
const orphanedTags = tags.filter(t => t.profileCount === 0 && t.pageCount > 0)

console.log('Pages gated but no profiles can access:', orphanedTags)
Assistant
Responses are generated using AI and may contain mistakes.

Ask me anything about the documentation.

ESC