V3 Charts

List chart fields

Changed on

Returns the field catalog for a Feedback Dataset: every field a chart query may use, with its kind, type, label, description, filter operators and granularities, plus the date presets. Write chart queries against this list — the chart query validator refuses any field that is not in it, so the catalog cannot drift from what the API accepts.

Needs read access to the workspace and to the Feedback Dataset. Session cookie, x-api-key, or a Bearer token.

get/api/v3/charts/fields

Request

  • Base URL
    https://app.formbricks.com
  • URL
    https://app.formbricks.com/api/v3/charts/fields
  • Auth
    • API key in cookie next-auth.session-token
    • or API key in header x-api-key
    • or HTTP bearer

Query parameters

workspaceIdstring cuid2 required

Workspace identifier. This is the canonical container ID for v3 APIs.

datasetIdstring cuid2 required

The Feedback Dataset the chart reads. Access to a dataset is granted per workspace it is assigned to, so it is always authorized together with workspaceId: a dataset that is not assigned to the workspace, or that the caller may not use, answers 403.

Response

Field catalog

Example response

{
  "data": {
    "fields": [
      {
        "name": "FeedbackRecords.npsScore",
        "label": "NPS: Score"
      }
    ],
    "datePresets": [
      "today",
      "last 7 days",
      "this month",
      "all-time"
    ]
  }
}

Changes