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

# Detach testimony from case

> Removes previously attached testimony from a case.

If the testimony is not attached to the supplied case, then calling this endpoint generates an error with 404. If the case has finished onboarding, then this call will fail with 403.
If the testimony has not been attached to any other case, then detaching will result in deletion of the testimony from the system.



## OpenAPI

````yaml /background-check-api/api-reference/openapi.json delete /testimony/id/{testimonyId}/detach/case/id/{caseId}
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:
  /testimony/id/{testimonyId}/detach/case/id/{caseId}:
    parameters:
      - in: path
        name: testimonyId
        required: true
        description: The ID of the testimony to remove from a case.
        schema:
          type: string
      - schema:
          type: string
        name: caseId
        in: path
        required: true
        description: The identifier of the case.
    delete:
      tags:
        - Candidate onboarding
      summary: Detach testimony from case
      description: >-
        Removes previously attached testimony from a case.


        If the testimony is not attached to the supplied case, then calling this
        endpoint generates an error with 404. If the case has finished
        onboarding, then this call will fail with 403.

        If the testimony has not been attached to any other case, then detaching
        will result in deletion of the testimony from the system.
      operationId: delete-testimony-id-testimonyId-detach-case-id-caseId
      parameters: []
      responses:
        '200':
          description: OK
        '403':
          description: 'Forbidden: Case has finished onboarding.'
        '404':
          description: 'Not Found: Testimony not attached to supplied case.'
        '500':
          description: Internal Server Error
      security:
        - JWT: []
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````