Authentication
Hype Doc supports passwordless email sign-in, opaque API tokens, and OAuth 2.1
for MCP clients. API requests use a bearer token in the Authorization header.
Email code sign-in
Section titled “Email code sign-in”Request a code:
curl -X POST https://app.myhypedoc.com/api/v1/auth/code \ -H 'Content-Type: application/json' \ -d '{"email_address":"ada@example.com"}'The server returns 202 {} and sends a six-character code. Codes expire after
15 minutes and can be used once. Verify it:
curl -X POST https://app.myhypedoc.com/api/v1/auth/verify \ -H 'Content-Type: application/json' \ -d '{ "email_address":"ada@example.com", "code":"2K7MNP", "device_name":"CLI" }'The response contains a user and a raw API token:
{ "token": "<raw token, shown once>", "user": { "id": "user-uuid", "email_address": "ada@example.com", "name": "Ada Lovelace", "plan": "free", "email_verified": true, "unconfirmed_email": null, "onboarding_completed": true, "onboarding_goal": "career", "wins_remaining": 12, "spaces_remaining": 1, "created_at": "2026-10-27T15:30:00Z" }}Codes are case-insensitive, and non-alphanumeric characters are ignored. A
wrong or expired code returns 401. Save the token in a secure location.
Web sign-in uses the same endpoints and creates a signed cookie session. Native apps store the returned token in Keychain or Android secure storage.
Use a bearer token
Section titled “Use a bearer token”GET /api/v1/winsAuthorization: Bearer <token>For example:
export HYPEDOC_TOKEN='<token>'curl https://app.myhypedoc.com/api/v1/wins \ -H "Authorization: Bearer $HYPEDOC_TOKEN"Revoke the token used by the current request:
DELETE /api/v1/auth/sessionAuthorization: Bearer <token>A missing or invalid token returns 401 {"error":"Authentication required"}.
Named API tokens
Section titled “Named API tokens”Create a named token in Settings or with the API:
POST /api/v1/api_tokensAuthorization: Bearer <existing-token>Content-Type: application/json{"name":"Build script","expires_in_days":90}The raw token appears only in the creation response. The API stores a SHA-256
digest. List metadata with GET /api/v1/api_tokens and revoke a token with
DELETE /api/v1/api_tokens/{id}. See API tokens.
OAuth 2.1 for MCP
Section titled “OAuth 2.1 for MCP”MCP clients use OAuth 2.1 with S256 PKCE. Discovery requires no credentials:
| Endpoint | Purpose |
|---|---|
GET /.well-known/oauth-authorization-server | Authorization server metadata |
GET /.well-known/oauth-protected-resource | MCP protected resource metadata |
POST /oauth/register | Public dynamic client registration |
GET /oauth/authorize | User sign-in and consent |
POST /oauth/token | Authorization code or refresh exchange |
POST /oauth/revoke | Revoke an access or refresh token |
The server supports read and write scopes, requires S256 PKCE, returns
one-hour access tokens, and rotates refresh tokens. MCP write tools require the
write scope. Users can revoke authorized clients from Settings or through the
connected apps operations.
MCP clients should open:
https://app.myhypedoc.com/mcpThey handle discovery, registration, PKCE, consent, and token refresh. See the MCP OAuth flow for client configuration details.
Limits
Section titled “Limits”Unauthenticated API requests are limited to 10 per minute per IP. Authenticated API requests are limited to 100 per minute per token. The email code endpoint is limited to 5 requests per minute per IP. See Rate limits.