> ## Documentation Index
> Fetch the complete documentation index at: https://dev.writer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List agent feedback

> Read thumbs-up and thumbs-down ratings on agent messages, including optional comments. Uses the same authentication, cursor, rate limit, and errors as the logs export. The response is always native JSON.

> [!NOTE]
>
> Each API key can export logs only for its own organization. See [Export logs](https://dev.writer.com/home/logs-export.md) for start points, cursor handling, delivery guarantees, and polling examples.


## OpenAPI

````yaml get /api/observability/v1/organization/{organizationId}/agent-feedback/export
openapi: 3.0.3
info:
  title: Logs Export API
  version: '1.0'
  description: >-
    Poll captured LLM-call, agent-run, and agent-feedback records for an
    organization, and resume the feed from a cursor.
servers:
  - url: https://api.writer.com
security:
  - bearerAuth: []
tags:
  - name: Logs Export API
paths:
  /api/observability/v1/organization/{organizationId}/agent-feedback/export:
    get:
      tags:
        - Logs Export API
      summary: List agent feedback
      description: >-
        Read thumbs-up and thumbs-down ratings on agent messages, including
        optional comments. Uses the same authentication, cursor, rate limit, and
        errors as the logs export. The response is always native JSON.
      operationId: exportAgentFeedback
      parameters:
        - $ref: '#/components/parameters/organization_id'
        - $ref: '#/components/parameters/order'
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque resume token from a prior `x-next-cursor` header. Cursors
            from the logs export aren't accepted.
          schema:
            type: string
        - name: start_date
          in: query
          required: false
          description: >-
            ISO 8601 timestamp, epoch seconds, or epoch milliseconds. Tail
            backfill start; defaults to now. Can't be combined with `cursor`.
          schema:
            type: string
        - name: end_date
          in: query
          required: false
          description: >-
            ISO 8601 timestamp, epoch seconds, or epoch milliseconds. Browse
            only. Rejected when `order=tail`.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Page size.
          schema:
            type: integer
            minimum: 1
            default: 100
      responses:
        '200':
          description: One page of feedback records.
          headers:
            x-next-cursor:
              $ref: '#/components/headers/x_next_cursor'
            x-has-more:
              $ref: '#/components/headers/x_has_more'
            x-tail-watermark:
              $ref: '#/components/headers/x_tail_watermark'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/agent_feedback_page'
              example:
                result:
                  - feedback_id: 0b1e4c2a-7f3d-4e8b-9a1c-5d6e7f8a9b0c
                    message_id: msg_123
                    agent_run_id: run_456
                    root_agent_run_id: run_456
                    workflow_id: null
                    rating: negative
                    qualitative_comment: Missed the second question.
                    emitted_at_ms: 1759600000000
                    inserted_at_ms: 1759600012345
                    user_id: u_789
                    team_id: t_12
                    thread_id: th_345
                    session_id: null
                    request_id: req_678
                    action_id: null
                    trace_id: 4bf92f3577b34da6a3ce929d0e0e4736
                    source_service: writer-agent
                pagination:
                  limit: 100
                  has_more: false
                  next_cursor: null
        '400':
          $ref: '#/components/responses/validation_error'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '429':
          $ref: '#/components/responses/rate_limited'
components:
  parameters:
    organization_id:
      name: organizationId
      in: path
      required: true
      description: ID of the organization the API key belongs to.
      schema:
        type: integer
        format: int64
    order:
      name: order
      in: query
      required: false
      description: >-
        `tail` reads the incremental stream in `(inserted_at, id)` order.
        `browse` reads a date window.
      schema:
        type: string
        enum:
          - browse
          - tail
        default: browse
  headers:
    x_next_cursor:
      description: >-
        Opaque resume token. Present on every tail response. Store it unchanged
        and send it as `cursor` on the next request.
      schema:
        type: string
    x_has_more:
      description: >-
        `true` when another page is available. `false` when the stream is caught
        up to the settled boundary.
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
    x_tail_watermark:
      description: >-
        Tail only. Settled boundary in epoch milliseconds: now minus a 5-minute
        settle lag. Rows inserted after this time are withheld from the page.
      schema:
        type: integer
        format: int64
  schemas:
    agent_feedback_page:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/agent_feedback_record'
        pagination:
          $ref: '#/components/schemas/pagination'
    agent_feedback_record:
      type: object
      description: >-
        One revision of a rating. Upsert by `feedback_id`, keeping the newest
        `inserted_at_ms`.
      properties:
        feedback_id:
          type: string
          description: >-
            Stable identity and upsert key. A re-rating is a new revision of
            this ID.
        message_id:
          type: string
          description: Agent message the feedback is about.
        agent_run_id:
          type: string
          nullable: true
          description: Agent run that produced the message.
        root_agent_run_id:
          type: string
          nullable: true
          description: Root run when the feedback sits in a nested run.
        workflow_id:
          type: string
          nullable: true
          description: Workflow that produced the message, if any.
        rating:
          type: string
          enum:
            - positive
            - negative
          description: Thumbs up or thumbs down.
        qualitative_comment:
          type: string
          nullable: true
          description: Free text the user entered. Always included.
        emitted_at_ms:
          type: integer
          format: int64
          description: Rating event time in epoch milliseconds. Browse ordering axis.
        inserted_at_ms:
          type: integer
          format: int64
          description: Ingestion time in epoch milliseconds. Tail ordering axis.
        user_id:
          type: string
          nullable: true
          description: User who submitted the feedback.
        team_id:
          type: string
          nullable: true
          description: Team associated with the feedback.
        thread_id:
          type: string
          nullable: true
          description: Conversation thread.
        session_id:
          type: string
          nullable: true
          description: Session ID, if available.
        request_id:
          type: string
          nullable: true
          description: Request ID, if available.
        action_id:
          type: string
          nullable: true
          description: Action ID, if available.
        trace_id:
          type: string
          nullable: true
          description: Trace ID for correlating with logs.
        source_service:
          type: string
          nullable: true
          description: Service that emitted the feedback.
    pagination:
      type: object
      properties:
        limit:
          type: integer
          description: Page size used for this response.
        has_more:
          type: boolean
          description: Matches the `x-has-more` header.
        next_cursor:
          type: string
          nullable: true
          description: '`null` in tail mode; read the resume token from `x-next-cursor`.'
    problem:
      type: object
      description: Problem+JSON error body.
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
            - UNAUTHORIZED
            - FORBIDDEN
            - RATE_LIMITED
          description: Error code.
        detail:
          type: string
          description: Readable description of the error.
  responses:
    validation_error:
      description: >-
        The request parameters are invalid. For example, the cursor was tampered
        with, `start_date` is older than the retention window, `start_date` was
        sent with `cursor`, or `include_bodies=true` was sent with `limit` above
        50.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem'
    unauthorized:
      description: >-
        The API key is missing, malformed, or rejected. Gateway errors can use a
        different body than the service error shape.
    forbidden:
      description: The API key belongs to a different organization, or access is denied.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem'
    rate_limited:
      description: >-
        The organization exceeded 120 requests in 60 seconds. Wait for
        `retry-after` seconds, then retry.
      headers:
        retry-after:
          description: >-
            Whole seconds until the rate-limit window resets, with a minimum of
            one.
          schema:
            type: integer
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your [Writer API
        key](https://dev.writer.com/api-reference/api-keys). Each key can export
        logs only for its own organization.

````