> ## 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.

# commit staged changes

> apply the staged finding changes to the version. Returns the full analysis, since the HEAD moves.



## OpenAPI

````yaml /api-reference/security.json post /security/versions/{version_id}/commit
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/versions/{version_id}/commit:
    post:
      tags:
        - analysis version
      summary: commit staged changes
      description: >-
        apply the staged finding changes to the version. Returns the full
        analysis, since the HEAD moves.
      parameters:
        - name: version_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  id:
                    title: Id
                    type: string
                  name:
                    title: Name
                    type: string
                  created_at:
                    format: date-time
                    title: Created At
                    type: string
                  user:
                    $ref: '#/components/schemas/UserSchema'
                  project_id:
                    title: Project Id
                    type: string
                  project_name:
                    title: Project Name
                    type: string
                  project_slug:
                    title: Project Slug
                    type: string
                  is_owner:
                    title: Is Owner
                    type: boolean
                  head:
                    $ref: '#/components/schemas/AnalysisVersionSchema'
                required:
                  - id
                  - name
                  - created_at
                  - user
                  - project_id
                  - project_name
                  - project_slug
                  - is_owner
                  - head
                title: AnalysisSchema
                type: object
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - BearerAuth: []
components:
  schemas:
    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
    AnalysisVersionSchema:
      properties:
        id:
          title: Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        trigger:
          enum:
            - create
            - commit
            - fork
            - merge
            - push
          title: Trigger
          type: string
        n_findings:
          title: N Findings
          type: integer
        n_remediations:
          title: N Remediations
          type: integer
        is_head:
          title: Is Head
          type: boolean
        is_leaf:
          title: Is Leaf
          type: boolean
        is_root:
          title: Is Root
          type: boolean
        has_pipeline_processing:
          title: Has Pipeline Processing
          type: boolean
        has_pipeline_failed:
          title: Has Pipeline Failed
          type: boolean
        analysis_meta:
          $ref: '#/components/schemas/AnalysisMetadataSchema'
        code_version:
          $ref: '#/components/schemas/CodeVersionSchema'
        merged_from_version:
          $ref: '#/components/schemas/AnalysisVersionRef'
          nullable: true
        forked_from_version:
          $ref: '#/components/schemas/AnalysisVersionRef'
          nullable: true
        parent_version:
          $ref: '#/components/schemas/AnalysisVersionRef'
          nullable: true
        child_versions:
          items:
            $ref: '#/components/schemas/AnalysisVersionRef'
          title: Child Versions
          type: array
        merged_versions:
          items:
            $ref: '#/components/schemas/AnalysisVersionRef'
          title: Merged Versions
          type: array
        forked_versions:
          items:
            $ref: '#/components/schemas/AnalysisVersionRef'
          title: Forked Versions
          type: array
        actions:
          $ref: '#/components/schemas/AnalysisActions'
      required:
        - id
        - created_at
        - trigger
        - n_findings
        - n_remediations
        - is_head
        - is_leaf
        - is_root
        - has_pipeline_processing
        - has_pipeline_failed
        - analysis_meta
        - code_version
        - actions
      title: AnalysisVersionSchema
      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
    AnalysisMetadataSchema:
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        user:
          $ref: '#/components/schemas/UserSchema'
        project_id:
          title: Project Id
          type: string
        project_name:
          title: Project Name
          type: string
        project_slug:
          title: Project Slug
          type: string
        is_owner:
          title: Is Owner
          type: boolean
      required:
        - id
        - name
        - created_at
        - user
        - project_id
        - project_name
        - project_slug
        - is_owner
      title: AnalysisMetadataSchema
      type: object
    CodeVersionSchema:
      properties:
        id:
          title: Id
          type: string
        network:
          enum:
            - eth
            - bsc
            - polygon
            - base
            - avax
            - mode
            - arb
            - eth_sepolia
            - bsc_test
            - polygon_amoy
            - base_sepolia
            - avax_fuji
            - mode_testnet
            - arb_sepolia
          type: string
          nullable: true
        version_method:
          enum:
            - tag
            - commit
            - hash
            - address
          title: Version Method
          type: string
        version_fingerprint:
          title: Version Fingerprint
          type: string
        status:
          enum:
            - waiting
            - processing
            - failed
            - success
          title: Status
          type: string
        name:
          type: string
          nullable: true
        branch:
          type: string
          nullable: true
        commit:
          $ref: '#/components/schemas/GithubCommitSchema'
          nullable: true
        repository:
          $ref: '#/components/schemas/GithubRepositorySchema'
          nullable: true
      required:
        - id
        - version_method
        - version_fingerprint
        - status
      title: CodeVersionSchema
      type: object
    AnalysisVersionRef:
      properties:
        id:
          title: Id
          type: string
        analysis_id:
          title: Analysis Id
          type: string
      required:
        - id
        - analysis_id
      title: AnalysisVersionRef
      type: object
    AnalysisActions:
      properties:
        can_fork:
          title: Can Fork
          type: boolean
        can_create_child:
          title: Can Create Child
          type: boolean
        can_commit_changes:
          title: Can Commit Changes
          type: boolean
        can_delete:
          title: Can Delete
          type: boolean
        can_run_pipeline:
          title: Can Run Pipeline
          type: boolean
        can_retry_pipeline:
          title: Can Retry Pipeline
          type: boolean
        can_merge_to:
          title: Can Merge To
          type: boolean
        can_merge_from:
          title: Can Merge From
          type: boolean
        can_stage_changes:
          title: Can Stage Changes
          type: boolean
        can_set_as_head:
          title: Can Set As Head
          type: boolean
      required:
        - can_fork
        - can_create_child
        - can_commit_changes
        - can_delete
        - can_run_pipeline
        - can_retry_pipeline
        - can_merge_to
        - can_merge_from
        - can_stage_changes
        - can_set_as_head
      title: AnalysisActions
      type: object
    GithubCommitSchema:
      properties:
        sha:
          title: Sha
          type: string
        author:
          title: Author
          type: string
        message:
          title: Message
          type: string
        timestamp:
          format: date-time
          title: Timestamp
          type: string
      required:
        - sha
        - author
        - message
        - timestamp
      title: GithubCommitSchema
      type: object
    GithubRepositorySchema:
      properties:
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        is_private:
          title: Is Private
          type: boolean
        account:
          $ref: '#/components/schemas/GithubAccountSchema'
      required:
        - id
        - name
        - is_private
        - account
      title: GithubRepositorySchema
      type: object
    GithubAccountSchema:
      properties:
        id:
          title: Id
          type: integer
        login:
          title: Login
          type: string
        type:
          title: Type
          type: string
        avatar_url:
          title: Avatar Url
          type: string
      required:
        - id
        - login
        - type
        - avatar_url
      title: GithubAccountSchema
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key in Bearer token format

````