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

# Cancel a reconciliation run

> Cancels the reconciliation's batch run that is pending or running. A running run stops at its next checkpoint, between two batches of matches, which can take a few minutes on a large reconciliation. The matches the run has already made stay; unmatch them if you do not want them. The cancelled run no longer appears as `current_run` or `last_run` on `GET /reconciliations/{id}`, and a new run can be started with `POST /reconciliations/{id}/run`.



## OpenAPI

````yaml /openapi.json post /reconciliations/{id}/cancel_run
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /reconciliations/{id}/cancel_run:
    post:
      summary: Cancel a reconciliation run
      description: >-
        Cancels the reconciliation's batch run that is pending or running. A
        running run stops at its next checkpoint, between two batches of
        matches, which can take a few minutes on a large reconciliation. The
        matches the run has already made stay; unmatch them if you do not want
        them. The cancelled run no longer appears as `current_run` or `last_run`
        on `GET /reconciliations/{id}`, and a new run can be started with `POST
        /reconciliations/{id}/run`.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The reconciliation ID
      responses:
        '200':
          description: Run cancelled
          content:
            application/json:
              schema:
                type: object
                properties:
                  reconciliation_id:
                    type: string
                  run:
                    $ref: '#/components/schemas/ReconciliationRun'
        '404':
          description: Reconciliation not found
        '409':
          description: No run of this reconciliation is pending or running
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  schemas:
    ReconciliationRun:
      type: object
      description: >-
        A single execution of a reconciliation's batch or continuous matching
        pipeline.
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - batch
            - continuous
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - cancelled
        trigger:
          type: string
          enum:
            - manual
            - rule_activated
            - agent
            - record_created
            - ingestion
          description: >-
            What initiated this run. `ingestion` runs are queued automatically
            once an import lands, so rollup (many_to_one) rules apply to the new
            records.
        total_records:
          type: integer
          description: Total records considered by the run
        processed_records:
          type: integer
          description: Records processed so far
        matched_records:
          type: integer
          description: Records that were matched during the run
        rule_summary:
          type: object
          nullable: true
          description: Per-rule match counts, populated as the run progresses
        progress:
          type: integer
          description: Processing progress as a percentage (0-100)
        started_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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