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

# Cancel a case



## OpenAPI

````yaml /background-check-api/api-reference/openapi.json post /case/id/{caseId}/cancel
openapi: 3.1.0
info:
  title: KarmaCheck API
  description: >-
    All requests to the KarmaCheck API require a JSON Web Token (JWT) in the
    Authorization header. For an overview of the API and its authentication
    method, refer to the following topics:


    - [API basics](docs/overview/apis/api-overview.md)

    - [Authentication](docs/overview/apis/authentication.md)

    - [Environments](docs/overview/apis/environments.md)

    - [Status codes and errors](docs/overview/apis/errors.md)
  version: '1.0'
  contact:
    name: KarmaCheck
    email: customersuccess@karmacheck.com
servers:
  - description: Stage
    url: https://api-stage.karmacheck.io
  - description: Prod
    url: https://api.karmacheck.io
security:
  - JWT: []
tags:
  - name: Authentication
  - name: Cases
  - name: Candidate onboarding
  - name: Secure documents
  - name: Packages
  - name: Services
  - name: Users
  - name: Companies
  - name: Partner integrations
paths:
  /case/id/{caseId}/cancel:
    parameters:
      - schema:
          type: string
        name: caseId
        in: path
        required: true
        description: the case you'd like to cancel
    post:
      tags: []
      summary: Cancel a case
      operationId: post-case-id-caseId-cancel
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Returned if case is not found
          content: {}
        '422':
          description: Unprocessable Entity (WebDAV)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: string
                  statusCode:
                    type: integer
                x-examples:
                  Example 1:
                    message: Service cannot be canceled.
                    error: Unprocessable Entity
                    statusCode: 422
              examples:
                Example 1:
                  value:
                    message: Cannot cancel a case that has already started.
                    error: Unprocessable Entity
                    statusCode: 422
                Example 2:
                  value:
                    message: Unable to cancel case.
                    error: Unprocessable Entity
                    statusCode: 422
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: string
                  statusCode:
                    type: integer
                x-examples:
                  Example 1:
                    message: Service cannot be canceled.
                    error: Unprocessable Entity
                    statusCode: 422
              examples:
                Example 1:
                  value:
                    message: An error has occurred while canceling the case
                    error: Internal Server Error
                    statusCode: 500
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````