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

# add findings

> stage one or more new findings on an analysis version. Changes are not applied until the version is committed.



## OpenAPI

````yaml /api-reference/security.json post /security/findings
openapi: 3.1.2
info:
  title: Bevor Security API
  version: 1.0.0
servers: []
security: []
tags:
  - name: analysis
    description: Analyses, which own a lineage of versions and track a HEAD.
  - name: analysis version
    description: 'Versions of an analysis: creation, lineage, diffs, and pipeline runs.'
  - name: finding
    description: Findings on an analysis version, their staged edits, and comments.
  - name: remediation
    description: Remediations generated for findings.
  - name: summary
    description: Aggregated reporting over analyses, projects, and users.
  - name: chat
    description: Audit chat threads and messages.
paths:
  /security/findings:
    post:
      tags:
        - finding
      summary: add findings
      description: >-
        stage one or more new findings on an analysis version. Changes are not
        applied until the version is committed.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                version_id:
                  title: Version Id
                  type: string
                findings:
                  items:
                    $ref: '#/components/schemas/FindingBody'
                  title: Findings
                  type: array
              required:
                - version_id
                - findings
              title: AddFindingsBody
              type: object
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  results:
                    items:
                      $ref: '#/components/schemas/FindingSchema'
                    title: Results
                    type: array
                title: ResultsResponse[FindingSchema]
                type: object
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - BearerAuth: []
components:
  schemas:
    FindingBody:
      properties:
        location:
          discriminator:
            mapping:
              logical:
                $ref: '#/components/schemas/FindingLocationLogical'
              node_id:
                $ref: '#/components/schemas/FindingLocationNodeId'
              physical:
                $ref: '#/components/schemas/FindingLocationPhysical'
            propertyName: strategy
          oneOf:
            - $ref: '#/components/schemas/FindingLocationNodeId'
            - $ref: '#/components/schemas/FindingLocationPhysical'
            - $ref: '#/components/schemas/FindingLocationLogical'
          title: Location
        source:
          type: string
          nullable: true
        metadata:
          $ref: '#/components/schemas/FindingMetadataBody'
          nullable: true
      required:
        - location
      title: FindingBody
      type: object
    FindingSchema:
      properties:
        version:
          $ref: '#/components/schemas/AnalysisVersionRef'
        created_at:
          format: date-time
          title: Created At
          type: string
        origin_finding_id:
          title: Origin Finding Id
          type: string
        is_acknowledged:
          title: Is Acknowledged
          type: boolean
        type:
          title: Type
          type: string
        level:
          enum:
            - critical
            - high
            - medium
            - low
          title: Level
          type: string
        name:
          title: Name
          type: string
        explanation:
          title: Explanation
          type: string
        recommendation:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
        source:
          title: Source
          type: string
        id:
          title: Id
          type: string
        node_id:
          title: Node Id
          type: string
        is_borrowed:
          title: Is Borrowed
          type: boolean
        location_id:
          type: string
          nullable: true
        created_by_user:
          $ref: '#/components/schemas/UserSchema'
        project_id:
          title: Project Id
          type: string
        project_slug:
          title: Project Slug
          type: string
        code_version_id:
          title: Code Version Id
          type: string
        operation:
          enum:
            - add
            - update
            - delete
          type: string
          nullable: true
        actions:
          $ref: '#/components/schemas/FindingActions'
      required:
        - version
        - created_at
        - origin_finding_id
        - is_acknowledged
        - type
        - level
        - name
        - explanation
        - source
        - id
        - node_id
        - is_borrowed
        - created_by_user
        - project_id
        - project_slug
        - code_version_id
        - actions
      title: FindingSchema
      type: object
    ApiError:
      properties:
        code:
          enum:
            - auth.session_expired
            - auth.session_revoked
            - auth.session_invalid
            - auth.user_does_not_exist
            - auth.invalid_team_membership
            - auth.unauthorized
            - auth.key_revoked
            - auth.key_invalid
            - auth.payment_required
            - auth.team_required
            - auth.invalid_permissions
            - error.not_found
            - error.invalid_scope
            - error.limit
            - error.entity_deleted
            - error.invalid_state
            - error.conflict
            - error.integrity
            - error.database
            - error.validation
            - error.server
            - analysis.entrypoint_failure
            - code.unsupported
            - code.node_invalid
            - code.conflict
            - app.rate_limit
            - payment.error
            - payment.failed
          title: Code
          type: string
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ApiError
      type: object
    FindingLocationLogical:
      description: Caller has a fully qualified symbol name. Bevor resolves to nodes.
      properties:
        strategy:
          const: logical
          default: logical
          title: Strategy
          type: string
        fully_qualified_name:
          title: Fully Qualified Name
          type: string
      required:
        - fully_qualified_name
      title: FindingLocationLogical
      type: object
    FindingLocationNodeId:
      description: Caller knows Bevor node IDs directly.
      properties:
        strategy:
          const: node_id
          default: node_id
          title: Strategy
          type: string
        scope_id:
          type: string
          nullable: true
        location_id:
          type: string
          nullable: true
      title: FindingLocationNodeId
      type: object
    FindingLocationPhysical:
      description: Caller has file path + region. Bevor resolves to nodes.
      properties:
        strategy:
          const: physical
          default: physical
          title: Strategy
          type: string
        uri:
          title: Uri
          type: string
        startLine:
          type: integer
          nullable: true
        startColumn:
          type: integer
          nullable: true
        endLine:
          type: integer
          nullable: true
        endColumn:
          type: integer
          nullable: true
        charOffset:
          type: integer
          nullable: true
        charLength:
          type: integer
          nullable: true
        byteOffset:
          type: integer
          nullable: true
        byteLength:
          type: integer
          nullable: true
      required:
        - uri
      title: FindingLocationPhysical
      type: object
    FindingMetadataBody:
      properties:
        type:
          title: Type
          type: string
        level:
          enum:
            - critical
            - high
            - medium
            - low
          title: Level
          type: string
        name:
          title: Name
          type: string
        explanation:
          title: Explanation
          type: string
        recommendation:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
      required:
        - type
        - level
        - name
        - explanation
      title: FindingMetadataBody
      type: object
    AnalysisVersionRef:
      properties:
        id:
          title: Id
          type: string
        analysis_id:
          title: Analysis Id
          type: string
      required:
        - id
        - analysis_id
      title: AnalysisVersionRef
      type: object
    UserSchema:
      properties:
        id:
          title: Id
          type: string
        is_self:
          title: Is Self
          type: boolean
        created_at:
          format: date-time
          title: Created At
          type: string
        username:
          title: Username
          type: string
      required:
        - id
        - is_self
        - created_at
        - username
      title: UserSchema
      type: object
    FindingActions:
      properties:
        can_edit:
          title: Can Edit
          type: boolean
        can_revert:
          title: Can Revert
          type: boolean
        can_delete:
          title: Can Delete
          type: boolean
      required:
        - can_edit
        - can_revert
        - can_delete
      title: FindingActions
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key in Bearer token format

````