---
title: "Delete a formerly uploaded document"
method: DELETE
path: "/mortgages/applications/{applicationId}/documents/{documentId}"
tags: ["Mortgage Application"]
---

# Delete a formerly uploaded document

`DELETE /mortgages/applications/{applicationId}/documents/{documentId}`

## Request

- Base URL: `https://mortgage.common-api.ch`
- URL: `https://mortgage.common-api.ch/mortgages/applications/{applicationId}/documents/{documentId}`
- Auth: one of:
  - API key in header `X-API-Key`
  - OAuth 2
    - Authorization code: `https://example.com/oauth/authorize`
    - Token URL: `https://example.com/oauth/token` scopes: `read`, `write`

Deletes a specific document attached to a specific application. Note that deleting documents should not be possible after the
application has been accepted by the FI.

## Path parameters

- `applicationId` string, uuid, required: The application identifier (UUID v4) defined by FI.
- `documentId` string, uuid, required: Unique ID (uuid v4) of the document.

## Headers

- `X-CorAPI-Client-ID` string, required
- `X-Correlation-ID` string, required
- `User-Agent` string, required

## Response `200`

OK.

- object
  - `status` string

## Other responses

- `400`: Bad Request - The server cannot or will not process the request due to something that is perceived to be a client error as malformed request syntax.
- `401`: Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
- `403`: Forbidden - The server understood the request but refuses to authorize it.
- `404`: Not Found - The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
- `405`: Method Not Allowed - The method received in the request-line is known by the origin server but not supported by the target resource.
- `500`: Internal Server Error - The server encountered an unexpected condition that prevented it from fulfilling the request.
- `501`: Not Implemented - The server does not support the functionality required to fulfill the request.
- `503`: Service Unavailable - The server is currently unable to handle the request due to a temporary overload or scheduled maintenance.

## Changes

- **2025-07-28** `735bf0a87227`: 1 info
  - api operation id `deleteApplicationDocument` was added
- **2023-06-06** `13f87d5f5f25`: 2 breaking, 2 warning
  - added the new path request parameter `applicationId`
  - added the new path request parameter `documentId`
  - deleted the `path` request parameter `Application ID`
  - deleted the `path` request parameter `Document ID`
- **2023-03-13** `3661aeb7386e`: 2 breaking, 2 warning
  - added the new path request parameter `Application ID`
  - added the new path request parameter `Document ID`
  - deleted the `path` request parameter `applicationId`
  - deleted the `path` request parameter `documentId`
- **2022-11-04** `e7e09b626662`: 8 breaking
  - the `detail` response's property type changed from `string` to `array` for status `400`
  - the `detail` response's property type changed from `string` to `array` for status `401`
  - the `detail` response's property type changed from `string` to `array` for status `403`
  - the `detail` response's property type changed from `string` to `array` for status `404`
  - …4 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/swissfintechinnovations/apis/common-mortgage-api-public-2/changes/mortgages/applications/:applicationId/documents/:documentId/delete.md)

---

[API](https://skmtc.dev/swissfintechinnovations/apis/common-mortgage-api-public-2.md) - [All operations](https://skmtc.dev/swissfintechinnovations/apis/common-mortgage-api-public-2/llms.txt) - [OpenAPI document](https://skmtc.dev/swissfintechinnovations/apis/common-mortgage-api-public-2/revisions/32dae0ff8520?raw)
