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

# List error traces

For paging and the difference between the list endpoints, see [Querying traces](https://docs.appsignal.com/api/v2/traces.md#list-traces).

```yaml POST /api/v2/tracing/traces/errors theme={null}
openapi: 3.1.0
info:
  title: AppSignal V2 API
  description: >-
    REST API for metrics, traces, logs, Kubernetes monitoring, and deployment
    tracking.
  license:
    name: ''
  version: 0.1.0
paths:
  /api/v2/tracing/traces/errors:
    post:
      tags:
        - Tracing
      summary: List error traces
      operationId: traces
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ErrorTracesQuery'
            example:
              site_ids:
                - abc123
              digests:
                - '1234567890'
              pagination:
                per_page: 50
                order: DESC
                cursor:
                  time: null
        required: true
      responses:
        '200':
          description: The matching trace summaries.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Trace'
        '400':
          description: Malformed request, or input the server cannot process.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Missing or invalid authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Route or resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: External query concurrency limit exceeded; retry shortly.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Unhandled server-side failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
        - token_query: []
components:
  schemas:
    BadRequestResponse:
      type: object
      description: >-
        Standard body for HTTP 400 Bad Request responses. Branch on the stable
        `error` slug, display `message` as-is, and read per-error structured
        data from `details`.
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Stable, machine-readable slug identifying the specific error case.
        message:
          type: string
          description: Human-readable message. Safe to log or display to end users.
        details:
          description: >-
            Per-error structured payload. Shape varies by
            [`error`](Self::error).
    ErrorResponse:
      type: object
      description: Error body returned for 401, 404 and 500 responses.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    ErrorTracesQuery:
      type: object
      description: Filters and pagination for listing the traces of error incidents.
      required:
        - site_ids
        - digests
        - pagination
      properties:
        site_ids:
          type: array
          items:
            type: string
          description: Sites to search; the caller must have access to all of them.
        digests:
          type: array
          items:
            type: string
          description: Digests of the error incidents to list traces for.
        query:
          type:
            - string
            - 'null'
          description: Filter query; supports revision and tag filters.
        pagination:
          $ref: '#/components/schemas/Pagination_TracePagination'
          description: Page size (capped at 100), order and cursor.
    Order:
      type: string
      description: |-
        Sort order for query results

        Used across multiple domains for paginated and ordered queries.
      enum:
        - ASC
        - DESC
    Pagination_TracePagination:
      type: object
      description: Keyset pagination settings, generic over each domain's cursor type.
      required:
        - per_page
        - order
        - cursor
      properties:
        per_page:
          type: integer
          format: int32
          description: Number of results per page.
          minimum: 1
        order:
          $ref: '#/components/schemas/Order'
          description: Sort order for results.
        cursor:
          oneOf:
            - type: object
              description: Page by trace time; `null` starts from the first page.
              required:
                - time
              properties:
                time:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: Page by trace time; `null` starts from the first page.
            - type: object
              description: >-
                Page by trace duration in milliseconds; `null` starts from the
                first page.
              required:
                - duration
              properties:
                duration:
                  type:
                    - number
                    - 'null'
                  format: double
                  description: >-
                    Page by trace duration in milliseconds; `null` starts from
                    the first page.
          description: Pagination cursor type for traces.
    TooManyRequestsResponse:
      type: object
      description: Error body returned for 429 responses.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
        suggestion:
          type:
            - string
            - 'null'
          description: >-
            A cheaper way to write the request's filter. Only the trace list

            endpoints set it, and only for a filter with a known indexed
            rewrite.
    Trace:
      type: object
      description: A trace summary representing a root span.
      required:
        - span_id
        - trace_id
        - site_id
        - time
        - duration
        - tags
        - has_npo
      properties:
        span_id:
          type: string
          description: Unique identifier for the root span.
        trace_id:
          type: string
          description: Unique identifier for the entire trace.
        site_id:
          type: string
          description: Site identifier this trace belongs to.
        namespace:
          type:
            - string
            - 'null'
          description: Namespace the trace belongs to (e.g. `"web"`, `"background"`).
        revision:
          type:
            - string
            - 'null'
          description: >-
            Git revision or deployment identifier active when the trace was
            recorded.
        action_name:
          type:
            - string
            - 'null'
          description: Action name for the trace (e.g. `"POST /api/users"`).
        time:
          type: string
          format: date-time
          description: Timestamp when the trace started.
        duration:
          type: number
          format: double
          description: Total duration of the trace in milliseconds.
        tags:
          type: object
          description: User-defined tags extracted from span attributes.
          additionalProperties:
            type: string
          propertyNames:
            type: string
        has_npo:
          type: boolean
          description: Whether this trace contains N+1 query detection results.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <token>`'
    token_query:
      type: apiKey
      in: query
      name: token
      description: >-
        Alternative to the Authorization header: pass the token as a
        `?token=<token>` query parameter.
```


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.appsignal.com/llms.txt).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.