---
title: "Return the configuration schema at a specific hash"
method: GET
path: "/api/schema/{hash}"
tags: ["Schema"]
---

# Return the configuration schema at a specific hash

`GET /api/schema/{hash}`

## Request

- Base URL: `https://mail.example.com`
- URL: `https://mail.example.com/api/schema/{hash}`
- Auth: one of:
  - HTTP bearer
  - HTTP basic
- TypeScript: <https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/docs/api/schema/:hash/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the JSON Schema describing the full Stalwart configuration tree.
The response is always gzip-encoded (`Content-Encoding: gzip`) and served
with an immutable cache policy — the schema for a given hash never
changes. If the hash does not match the server's current schema, the
server redirects to the correct URL.

## Path parameters

- `hash` string, required

## Response `200`

Gzipped JSON Schema document

- object: JSON Schema document describing Stalwart config

## Other responses

- `302`: Redirect to the current schema URL when the hash is stale
- `401`: Missing or invalid credentials

## Changes

- **2026-07-17** (v1) `a38a1bbfe8b2`: 1 info
  - endpoint added
- **2025-01-05** (v1) `fbbe298bfa82`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/changes/api/schema/:hash/get.md)

---

[API](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api.md) - [All operations](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stalwartlabs/apis/stalwart-management-api/revisions/a38a1bbfe8b2?raw)
