Introducing the Feedback API Endpoint for Mastra Observability

Query feedback by region, environment, thread and source.

Paul ScanlonPaul Scanlon·

Sep 18, 2026

·

4 min read

You can now query and evaluate human-generated feedback with the feedback API endpoint. Using HTTP endpoints and standard query parameters, you can filter by region, environment, thread, source, trace, entity, or experiment.

Human feedback comes in many forms — a thumbs up / thumbs down, a star rating, or a detailed comment. The feedback API gives you the parameters to construct powerful, fine-grained queries to see how well your agents are performing in the real world.

We shipped the TypeScript API in @mastra/core@1.18.0 (PR #14842). The new feedback API endpoint is language-agnostic and can be called from other services.

As of today, the feedback API endpoint is read-only. For writes, review-status updates, and deletes, use the TS API.

Get started

Each request needs two headers, a region-specific endpoint, and a project ID. Mastra platform currently supports two regions:

GNU BashTerminal
export MASTRA_PLATFORM_ACCESS_TOKEN=/* ... */
export MASTRA_PROJECT_ID=/* ... */
GNU BashTerminal
curl -H "Authorization: Bearer $MASTRA_PLATFORM_ACCESS_TOKEN" \
     -H "X-Mastra-Project-Id: $MASTRA_PROJECT_ID" \
     <endpoint>/feedback

The examples below use <endpoint> as shorthand for the region endpoint:

  • EU: https://observability.eu.mastra.ai/api/observability
  • US: https://observability.mastra.ai/api/observability

Query parameters

Both feedback and OLAP queries accept the same set of parameters. Use one, or combine several, to fine-tune your queries:

  • Environment: environment, serviceName
  • Identity: threadId, resourceId, userId, sessionId, feedbackUserId
  • Trace: traceId, spanId, runId, requestId
  • Entity: entityName, entityType, entityVersionId, parentEntityName, parentEntityType, rootEntityName, rootEntityType
  • Content: feedbackType, feedbackSource, reviewStatus (needs-review | reviewed), tags, source
  • Experiment: experimentId, executionSource

See the types reference for full details.

List feedback

Example: A query for rating feedback in production:

GNU BashTerminal
curl -H "Authorization: Bearer $MASTRA_PLATFORM_ACCESS_TOKEN" \
     -H "X-Mastra-Project-Id: $MASTRA_PROJECT_ID" \
     "<endpoint>/feedback?environment=production&feedbackType=rating"

OLAP queries

Each OLAP endpoint is a POST request with a JSON body. The body has two parts: a filters object that accepts any of the query parameters mentioned above, and operation params specific to each endpoint (covered below).

Aggregate

Example: A query for the average rating in production from user-submitted feedback:

Body params:

  • aggregationavg | sum | min | max | count.
GNU BashTerminal
curl -X POST
      -H // ...
      -H // ...
      -d '{
       "filters": { "environment": "production" },
       "feedbackType": "rating",
       "feedbackSource": "user",
       "aggregation": "avg"
     }' \
     <endpoint>/feedback/aggregate

Breakdown

Example: A query for the average rating in production, grouped by feedback source:

Body params:

  • aggregation — same options as Aggregate.
  • groupBy — array of grouping keys (feedbackSource, feedbackType, entityName, entityType, environment, etc.).
GNU BashTerminal
curl -X POST
      -H // ...
      -H // ...
      -d '{
       "filters": { "environment": "production" },
       "feedbackType": "rating",
       "aggregation": "avg",
       "groupBy": ["feedbackSource"]
     }' \
     <endpoint>/feedback/breakdown

Timeseries

Example: A query for the average rating in production, bucketed by day:

Body params:

  • aggregation — same options as Aggregate.
  • interval1m | 5m | 15m | 1h | 1d.
GNU BashTerminal
curl -X POST
      -H // ...
      -H // ...
      -d '{
       "filters": { "environment": "production" },
       "feedbackType": "rating",
       "aggregation": "avg",
       "interval": "1d"
     }' \
     <endpoint>/feedback/timeseries

Percentiles

Example: A query for the p50, p90, p95, and p99 rating in production, bucketed by day:

Body params:

  • percentiles — array in [0, 1], e.g. [0.5, 0.9, 0.95, 0.99].
  • interval — same options as Timeseries.
GNU BashTerminal
curl -X POST
      -H // ...
      -H // ...
      -d '{
       "filters": { "environment": "production" },
       "feedbackType": "rating",
       "percentiles": [0.5, 0.9, 0.95, 0.99],
       "interval": "1d"
     }' \
     <endpoint>/feedback/percentiles

For more information and full configuration options, see:

Share on X or LinkedIn
Paul Scanlon
Paul ScanlonTechnical Product Marketing Manager

Paul Scanlon sits between Developer Education and Product Marketing at Mastra. Previously, he was a Technical Product Marketing Manager at Neon and worked in Developer Relations at Gatsby, where he created educational content and developer experiences.

All articles by Paul Scanlon