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

# Delete Case

> Delete a compliance case and its draft regulatory reports. A finalized report blocks the deletion until you delete it.

Delete Case API Prompt
Copy prompt to clipboard

<pre>
  \`Delete a compliance case through the Management API.

  Endpoint:
  DELETE [https://verification.didit.me/v3/organization/\{organization\_id}/application/\{application\_id}/cases/\{case\_uuid}/](https://verification.didit.me/v3/organization/\{organization_id}/application/\{application_id}/cases/\{case_uuid}/)

  Authentication:
  Use the x-api-key header with my Didit API key. Use a full-access API key; the caller needs write:cases.

  Request body: none.

  Example call:
  curl -X DELETE "[https://verification.didit.me/v3/organization/\{organization\_id}/application/\{application\_id}/cases/\{case\_uuid}/](https://verification.didit.me/v3/organization/\{organization_id}/application/\{application_id}/cases/\{case_uuid}/)" \
  -H "x-api-key: YOUR\_API\_KEY"

  Response 204: the case is deleted.

  What is deleted:

  * The case.
  * Its draft regulatory reports.
    Linked verifications, people, companies and transactions are NOT deleted. There is no undelete endpoint.

  Failure modes:

  * 409 - the case has a finalized regulatory report. Nothing is deleted. The body has code: in\_filed\_report and names each report with uuid, report\_number, report\_type and case\_uuid. Delete the reports, then repeat this request.
  * 403 - the key cannot delete cases (requires a full-access key and write:cases).
  * 404 - the case does not exist in this application or was already deleted.

  For the full integration shape, see /integration/integration-prompt.\`
</pre>

Paste into

Delete a case permanently. Its draft regulatory reports are deleted with it.

Linked verifications, people, companies and transactions are **not** deleted. There is no undelete endpoint.

## Blocked by a finalized report

If the case has a finalized regulatory report, the whole request returns `409` and nothing is deleted:

```json theme={null}
{
  "detail": "This case has a finalized regulatory report, so it cannot be deleted.",
  "code": "in_filed_report",
  "reports": [
    {
      "uuid": "5ec00000-0000-4000-8000-000000000007",
      "report_number": "SAR-0001",
      "report_type": "SAR",
      "case_uuid": "c1a5e000-0000-4000-8000-000000000001"
    }
  ]
}
```

Delete each report with [Delete Report](https://docs.didit.me/management-api/regulatory-reports/delete.md), then repeat this request. The case can be deleted once no finalized report remains.

## Related

* [Get case](https://docs.didit.me/management-api/cases/get.md)
* [Update case](https://docs.didit.me/management-api/cases/update.md)
* [Delete report](https://docs.didit.me/management-api/regulatory-reports/delete.md)
* [Cases (Console)](https://docs.didit.me/console/case-management/cases.md)


## OpenAPI

````yaml DELETE /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/:
    delete:
      tags:
        - Cases
      summary: Delete case
      description: >-
        Delete a case permanently. Its draft regulatory reports are deleted with
        it. Linked verifications, people, companies and transactions are not
        deleted. There is no undelete endpoint.


        If the case has a finalized regulatory report, the whole request is
        refused with `409` and nothing is deleted. The body uses `code:
        in_filed_report` and names each report with `uuid`, `report_number`,
        `report_type` and `case_uuid`. Delete the reports, then repeat the
        request.
      operationId: delete_case
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Organization UUID.
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Application UUID.
        - name: case_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: c1a5e000-0000-4000-8000-000000000001
          description: Case UUID.
      responses:
        '204':
          description: Case deleted.
        '403':
          description: >-
            The key cannot delete cases. It requires a full-access key with
            `write:cases`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
        '404':
          description: The case does not exist in this application or was already deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
        '409':
          description: The case has a finalized regulatory report. Nothing is deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InFiledReportError'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X DELETE
            'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/'
            \
              -H 'x-api-key: YOUR_API_KEY'
components:
  schemas:
    InFiledReportError:
      type: object
      description: >-
        The deletion is refused because the selected data is in a finalized
        regulatory report. Nothing is deleted. Delete the report, then repeat
        the request.
      required:
        - detail
        - code
      properties:
        detail:
          type: string
        code:
          type: string
          enum:
            - in_filed_report
          description: >-
            Stable error code for a deletion blocked by a finalized regulatory
            report.
        reports:
          type: array
          items:
            $ref: '#/components/schemas/FiledRegulatoryReport'
          description: Reports that block a person, company, case or session deletion.
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/FiledReportTransaction'
          description: >-
            Transactions that block a transaction deletion, each with the
            reports that list it.
    FiledRegulatoryReport:
      type: object
      description: A finalized regulatory report that prevents the requested deletion.
      required:
        - uuid
        - report_number
        - report_type
        - case_uuid
      properties:
        uuid:
          type: string
          format: uuid
          description: Report UUID.
        report_number:
          type: string
          description: Report number shown in the Console (for example, SAR-0001).
        report_type:
          type: string
          enum:
            - SAR
            - STR
            - CTR
            - TTR
            - UTR
            - IFT
            - CBR
            - TFR
          description: Regulatory report type.
        case_uuid:
          type: string
          format: uuid
          description: Case the report belongs to.
    FiledReportTransaction:
      type: object
      description: >-
        A transaction that cannot be deleted because a finalized regulatory
        report lists it.
      required:
        - uuid
        - transaction_id
        - reports
      properties:
        uuid:
          type: string
          format: uuid
          description: Didit transaction UUID.
        transaction_id:
          type: string
          description: >-
            The transaction identifier supplied when the transaction was
            created.
        reports:
          type: array
          items:
            $ref: '#/components/schemas/FiledRegulatoryReport'
          description: Finalized reports that list this transaction.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your application's API key, from Developers -> API keys in the Business
        Console. The primary key has full access. A named key can be scoped:
        none, read or write per resource, limited to some workflows or to
        approved sessions, to a list of IP addresses, and to an expiry date. 401
        means the key is missing, wrong, revoked or expired; 403 means the key
        has no access to this resource or action, or the request came from an
        address outside its IP list; 404 on a session route means the session is
        outside the key's workflows or statuses. A key without media access
        receives image, video and PDF URLs as null, and a key without sessions
        write receives session links and tokens as null. See
        https://docs.didit.me/console/api-keys.

````

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