# Deletes a document type

`DELETE /api/configuration/document-types/{documentTypeId}`

- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Deletes a document type](https://support.gladstonesoftware.cloud/reference/configuration/deletes-a-document-type)

## Overview

Deletes a document type — the category assigned to member documents such as proof of address or a direct debit mandate. It is deleted permanently; there is no inactive flag and no undo.

Two guards run before the delete, and **both return `409`, not `404` or `400`**:

- The type is in use. If any member document is filed under this type you get `The documentType ID {id} is linked to a member.` Reassign or delete those documents first.
- The type is a system type. Types the platform ships and depends on cannot be removed: `The documentType ID {id} is system.`

Note that this endpoint reports *every* refusal as `409`, so a conflict body is the only place the real reason appears — read it rather than relying on the status code. Deleting a document type that does not exist returns `404`. A successful call returns `204 No Content` with an empty body.

## Endpoint

`DELETE {base_url}/api/configuration/document-types/{documentTypeId}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `documentTypeId` | integer (int32) | Yes | The document type to delete, matching the `id` returned by [Retrieve all document types](returns-all-document-types.md). System types listed there cannot be deleted and will return `409`. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/document-types/{documentTypeId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | The id path segment is empty. The body is the literal string `Id cannot be null or empty`. |
| `404` | Not found | No document type exists with that id, including when you repeat a delete that has already succeeded. The body is empty. |
| `409` | Conflict | `The documentType ID {id} is linked to a member.` when member documents still use the type, or `The documentType ID {id} is system.` when the type is a built-in one. A third form, `There are records linked to the ID {documentTypeId} that are stopping the operation being completed`, is returned when other records still depend on the type and block the delete. |
| `500` | Internal server error | Any other unexpected server-side failure. |
