Skip to content
Support

List taxonomy-capable fields

client.taxonomy.listFields(TaxonomyListFieldsParams { tenant_id } query, RequestOptionsoptions?): TaxonomyListFieldsResponse { data }
GET/v1/taxonomy/fields

Returns the feedback fields that can be used to generate a taxonomy for a tenant, along with the number of text records and embedded records available per field scope (source_type, source_id, field_id). A field with no attributed source is exposed under the canonical "no source" bucket (empty source_id). Requires Hub embeddings to be configured; otherwise the endpoint returns 503.

ParametersExpand Collapse
query: TaxonomyListFieldsParams { tenant_id }
tenant_id: string

Tenant whose taxonomy-capable fields should be listed.

minLength1
maxLength255
ReturnsExpand Collapse
TaxonomyListFieldsResponse { data }
data: Array<Data>
embedding_count: number

Number of those records that have an embedding.

formatint64
embedding_failed_count: number

Number of missing taxonomy embeddings whose latest bounded attempts failed transiently and can be retried.

formatint64
embedding_failed_terminal_count: number

Number of missing taxonomy embeddings rejected permanently for the current model and record revision.

formatint64
field_id: string
record_count: number

Number of text feedback records in the scope.

formatint64
source_id: string

Empty string is the canonical "no source" bucket.

source_type: string
tenant_id: string
field_label?: string
source_name?: string

List taxonomy-capable fields

import FormbricksHub from '@formbricks/hub';

const client = new FormbricksHub({
  apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});

const response = await client.taxonomy.listFields({ tenant_id: 'org-123' });

console.log(response.data);
{
  "data": [
    {
      "embedding_count": 0,
      "embedding_failed_count": 0,
      "embedding_failed_terminal_count": 0,
      "field_id": "field_id",
      "record_count": 0,
      "source_id": "source_id",
      "source_type": "source_type",
      "tenant_id": "tenant_id",
      "field_label": "field_label",
      "source_name": "source_name"
    }
  ]
}
Returns Examples
{
  "data": [
    {
      "embedding_count": 0,
      "embedding_failed_count": 0,
      "embedding_failed_terminal_count": 0,
      "field_id": "field_id",
      "record_count": 0,
      "source_id": "source_id",
      "source_type": "source_type",
      "tenant_id": "tenant_id",
      "field_label": "field_label",
      "source_name": "source_name"
    }
  ]
}