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

# Create Data Qc Finding

> Create a finding attached to a spec, one of its tasks, or a trajectory for that task. Evidence can cite other resources in the same organization. Retrying with the same Idempotency-Key and request content returns the original finding.



## OpenAPI

````yaml /openapi.json post /api/v1/data-qc/findings
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
  x-trajectory-api-version: '2026-10-14'
  description: >-
    This contract is API version 2026-10-14. The optional Trajectory-API-Version
    header pins it, and tmp-contract is accepted as an alias. Requests without
    the header get this version. Version 2026-10-07 and the pre-launch legacy
    response formats are retired.
servers:
  - url: https://api.trajectory.ai
security: []
tags:
  - name: agents
    x-group: Agents
  - name: benchmarks
    x-group: Specs (benchmarks)
  - name: diagnostics
    x-group: Diagnostics
  - name: benchmark-ingestion
    x-group: Spec (benchmark) submissions
  - name: eval
    x-group: Evaluations
  - name: training
    x-group: Training
  - name: deployments
    x-group: Deployments
  - name: model-endpoints
    x-group: Model endpoints
  - name: inference
    x-group: Inference
  - name: trajectories
    x-group: Trajectories
  - name: artifacts
    x-group: Artifacts
  - name: telemetry
    x-group: Telemetry
  - name: supported-models
    x-group: Supported models
  - name: organizations
    x-group: Organizations
  - name: secrets
    x-group: Secrets
paths:
  /api/v1/data-qc/findings:
    post:
      tags:
        - data-qc
      summary: Create Data Qc Finding
      description: >-
        Create a finding attached to a spec, one of its tasks, or a trajectory
        for that task. Evidence can cite other resources in the same
        organization. Retrying with the same Idempotency-Key and request content
        returns the original finding.
      operationId: createDataQcFinding
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 256
            title: Idempotency-Key
          description: >-
            Optional. Without a key, repeated submissions are treated as
            separate actions. A blank or over-long key is rejected. Reuse this
            key when retrying a submission; the SDK generates one per call and
            reuses it across automatic retries.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDataQcFindingRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataQcFinding'
        '400':
          description: The request is malformed or cannot be processed.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestErrorResponse'
        '404':
          description: >-
            The requested resource does not exist or is not visible to the
            caller.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundErrorResponse'
        '409':
          description: >-
            The key identifies an existing finding with different create request
            fields.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DataQcFindingIdempotencyConflictErrorResponse
        default:
          $ref: '#/components/responses/ApiErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateDataQcFindingRequest:
      properties:
        bench_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Bench Id
        task_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Task Id
        trajectory_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Trajectory Id
        title:
          type: string
          maxLength: 512
          minLength: 1
          title: Title
        explanation:
          type: string
          maxLength: 16384
          minLength: 1
          title: Explanation
        suggested_fix:
          anyOf:
            - type: string
              maxLength: 16384
              minLength: 1
            - type: 'null'
          title: Suggested Fix
        detector_name:
          type: string
          maxLength: 256
          minLength: 1
          title: Detector Name
        evidence:
          items:
            oneOf:
              - $ref: '#/components/schemas/SpecEvidence'
              - $ref: '#/components/schemas/TaskEvidence'
              - $ref: '#/components/schemas/TrajectoryEvidence'
            discriminator:
              propertyName: kind
              mapping:
                spec: '#/components/schemas/SpecEvidence'
                task: '#/components/schemas/TaskEvidence'
                trajectory: '#/components/schemas/TrajectoryEvidence'
          type: array
          maxItems: 64
          title: Evidence
      additionalProperties: false
      type: object
      required:
        - bench_id
        - title
        - explanation
        - detector_name
      title: CreateDataQcFindingRequest
    DataQcFinding:
      properties:
        bench_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Bench Id
        task_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Task Id
        trajectory_id:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 1
            - type: 'null'
          title: Trajectory Id
        title:
          type: string
          maxLength: 512
          minLength: 1
          title: Title
        explanation:
          type: string
          maxLength: 16384
          minLength: 1
          title: Explanation
        suggested_fix:
          anyOf:
            - type: string
              maxLength: 16384
              minLength: 1
            - type: 'null'
          title: Suggested Fix
        detector_name:
          type: string
          maxLength: 256
          minLength: 1
          title: Detector Name
        evidence:
          items:
            oneOf:
              - $ref: '#/components/schemas/SpecEvidence'
              - $ref: '#/components/schemas/TaskEvidence'
              - $ref: '#/components/schemas/TrajectoryEvidence'
            discriminator:
              propertyName: kind
              mapping:
                spec: '#/components/schemas/SpecEvidence'
                task: '#/components/schemas/TaskEvidence'
                trajectory: '#/components/schemas/TrajectoryEvidence'
          type: array
          maxItems: 64
          title: Evidence
        finding_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Finding Id
        state:
          type: string
          enum:
            - open
            - resolved
          title: State
        created_by:
          type: string
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        resolved_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolved By
        resolved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Resolved At
        resolution_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution Note
      additionalProperties: false
      type: object
      required:
        - bench_id
        - title
        - explanation
        - detector_name
        - finding_id
        - state
        - created_by
        - created_at
      title: DataQcFinding
    InvalidRequestErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/InvalidRequestErrorBody'
      type: object
      required:
        - error
      title: InvalidRequestErrorResponse
    ResourceNotFoundErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ResourceNotFoundErrorBody'
      type: object
      required:
        - error
      title: ResourceNotFoundErrorResponse
    DataQcFindingIdempotencyConflictErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/DataQcFindingIdempotencyConflictErrorBody'
      type: object
      required:
        - error
      title: DataQcFindingIdempotencyConflictErrorResponse
    SpecEvidence:
      properties:
        kind:
          type: string
          const: spec
          title: Kind
        bench_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Bench Id
        explanation:
          type: string
          maxLength: 16384
          minLength: 1
          title: Explanation
      additionalProperties: false
      type: object
      required:
        - kind
        - bench_id
        - explanation
      title: SpecEvidence
    TaskEvidence:
      properties:
        kind:
          type: string
          const: task
          title: Kind
        bench_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Bench Id
        task_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Task Id
        explanation:
          type: string
          maxLength: 16384
          minLength: 1
          title: Explanation
      additionalProperties: false
      type: object
      required:
        - kind
        - bench_id
        - task_id
        - explanation
      title: TaskEvidence
    TrajectoryEvidence:
      properties:
        kind:
          type: string
          const: trajectory
          title: Kind
        trajectory_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Trajectory Id
        step_indices:
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: 0
          type: array
          maxItems: 64
          title: Step Indices
          description: Zero-based recorded step indices.
        tool_call_ids:
          items:
            type: string
            maxLength: 64
            minLength: 1
          type: array
          maxItems: 64
          title: Tool Call Ids
          description: Tool calls visible in the referenced steps. Requires step_indices.
        explanation:
          type: string
          maxLength: 16384
          minLength: 1
          title: Explanation
      additionalProperties: false
      type: object
      required:
        - kind
        - trajectory_id
        - explanation
      title: TrajectoryEvidence
    InvalidRequestErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: invalid_request
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: InvalidRequestErrorBody
    ResourceNotFoundErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: resource_not_found
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ResourceNotFoundErrorBody
    DataQcFindingIdempotencyConflictErrorBody:
      properties:
        type:
          type: string
          const: conflict_error
          title: Type
        code:
          type: string
          const: data_qc_finding_idempotency_conflict
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: DataQcFindingIdempotencyConflictErrorBody
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    EmptyErrorContext:
      properties: {}
      additionalProperties: false
      type: object
      title: EmptyErrorContext
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - billing_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key

````

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