---
title: "Discover the OpenID Connect provider for an email address"
method: GET
path: "/api/discover/{email}"
tags: ["Authentication"]
---

# Discover the OpenID Connect provider for an email address

`GET /api/discover/{email}`

## Request

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

Returns the OpenID Connect discovery document for the directory that
owns the domain part of `email`. If the domain is not bound to an
external OIDC directory, the server's own OIDC discovery document
(equivalent to `/.well-known/openid-configuration`) is returned.
Anonymous endpoint, rate-limited.

## Path parameters

- `email` string, email, required

## Response `200`

OpenID Connect discovery document

- object: OIDC discovery metadata (RFC 8414)

## Other responses

- `404`: Resource not found
- `429`: Anonymous-request rate limit exceeded

## 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/discover/:email/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)
