# Returns all document types

`GET /api/configuration/document-types`

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

HTML version: [Returns all document types](https://support.gladstonesoftware.cloud/reference/configuration/returns-all-document-types)

## Overview

Lists the document types configured for the tenant — the categories a member document can be filed under, such as a photo ID, a medical certificate or a Direct Debit mandate. You need this before uploading a document for a member, because the upload requires a `documentTypeId` from this list.

The list mixes two kinds of record and the difference matters:

- **System types** (`isSystem` true) are supplied by Gladstone and behave specially. They cannot be renamed or deleted through the API — an attempt returns `409` — and at least one drives real behaviour: uploading against the type whose `key` is `DDMandate` also creates a Direct Debit mandate record for the member.
- **Operator types** (`isSystem` false) are created by the tenant. Their ids and names are local to that tenant, so nothing here is a platform-wide constant. Match on `key` if you need to recognise a type across environments, and never hard-code an `id`.

**Inactive and unused types are not filtered out** — there is no active flag on a document type at all, and the endpoint applies no filter. Every configured type comes back.

The text fields are the untranslated base values. Document types can carry per-language translations elsewhere in the platform, but this endpoint does not return or apply them, so do not present `name` directly to a member in a localised interface without checking it reads correctly.

Results can be up to six hours old, except that creating, updating or deleting a document type through this API refreshes them immediately.

## Endpoint

`GET {base_url}/api/configuration/document-types`

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

## Sample request

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

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].id` | integer (int32) | The value to send as `documentTypeId` when uploading or creating a document for a member. Assigned by Gladstone and unique within the tenant only, so the same number identifies a different type in another tenant's environment. |
| `[].key` | string | A short stable code for the type, maximum 55 characters and never null. Unlike `id` and `name`, a key is the thing platform logic recognises: `DDMandate` is the key the platform checks for when it decides to create a Direct Debit mandate alongside the uploaded document. Use `key` when your integration needs to spot a particular type across tenants. Uniqueness is not enforced, so treat a duplicate key as a configuration error rather than assuming one match. |
| `[].name` | string | The type's display name, and the field the API treats as its identity: it is required, at most 255 characters, and **unique across document types** — creating or renaming a type to a name already in use is rejected. This is the value shown to operators when filing a document. It is the untranslated base text. |
| `[].description` | string | A longer explanation of what the type is for, up to 500 characters. Optional, so `null` where the operator did not supply one. Distinct from `name`: `name` is the unique label, this is free-text detail and has no uniqueness constraint. |
| `[].isSensitive` | boolean | Marks the type as holding sensitive personal data, and acts as a floor rather than a default. When a document is uploaded against a type with this set, the document's own sensitivity is forced true even if the upload request asked for false — you can mark an individual document more sensitive than its type, never less. |
| `[].isAttachment` | boolean | Whether documents of this type are treated as email attachment content. Its recorded purpose is "Boolean if document is an email attachment type". |
| `[].isSystem` | boolean | Whether Gladstone supplied the type rather than the operator. `true` types are locked: [Updates a document type](updates-a-document-type.md) returns `409` with `Document Type ID {id} cannot be changed because it is system`, and [Deletes a document type](deletes-a-document-type.md) returns `409` with `The documentType ID {id} is system.` Do not build an editing interface that offers these rows as editable. |

## Sample response

```json title="200 OK"
[
  {
    "id": 12345,
    "key": "string",
    "name": "string",
    "description": "string",
    "isSensitive": true,
    "isAttachment": true,
    "isSystem": true
  }
]
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `200` | OK | Success. A tenant with no document types configured returns `200` with an empty JSON array `[]` — not `204` and not `404`. |
| `500` | Internal server error | Any unexpected server-side failure while reading the list, such as an outage. The response has no body. There is no request input to correct, so retry rather than adjust the call. |
