Merran documentation API & integrations
Make your first API request
The web app, browser extension, and external integrations use the same API. The endpoint reference is generated from the server’s committed OpenAPI schema.
Recipe share links are read through public GET /api/shared/{token}, which returns the shared recipe’s trimmed contents, and GET /api/shared/{token}/photo, which returns its photo. Neither needs sign-in, and both ignore cookies and API keys, so the token in the share link is the only credential: keep it private. Every failure to find a link, whether it was stopped, sharing was turned off by the household, or the recipe is in Recently deleted, answers the same 404. The recipe and its photo are each limited to 120 reads a minute per link, with 429 and Retry-After. Responses use Cache-Control: no-store (the photo is cached privately when its v matches the recipe’s photo) and Referrer-Policy: no-referrer. Making a link is POST /api/recipes/{recipe}/share and stopping it is DELETE on the same path; both need recipes:write from API keys. Reading a recipe’s link is GET with recipes:read. Household admins see every shared recipe at GET /api/households/current/shares, which needs a browser session.
Webhooks
Section titled “Webhooks”Merran can also call your tool when something happens. Household owners and admins add webhooks in Settings → Webhooks, which is session-only: API keys can’t manage them. Each event, such as recipe.created, and its body is described in the API reference under Webhooks, signed as Standard Webhooks describes, and the integration guide shows how to check signatures.
Create a key
Section titled “Create a key”Sign in to Merran and open your personal API key settings. Create a key for the intended household and grant only the permissions your integration needs. Store the returned secret securely.
Keys are scoped to a household. A key’s permissions determine which areas it can read or change. Routes without API-key support require a browser session instead; check each endpoint’s security requirements.
OAuth connections
Section titled “OAuth connections”OAuth-enabled servers also accept Authorization: Bearer mro_… on routes that support delegated access. Register an application in Settings → Apps and devices → Whole server → OAuth applications, then use authorization code with S256 PKCE and the https://meals.example.com/api resource. Permissions use scopes such as recipes:read and list:write; offline_access requests a rotating refresh token. The person chooses one household and approves the permissions. REST write scopes permit direct changes.
Discovery is available at /.well-known/oauth-protected-resource/api and /.well-known/oauth-authorization-server/api/auth. Authorization, token exchange, revocation and client registration live under /api/auth/oauth2/; the generated endpoint reference describes them. Token exchange uses form encoding and the registered client’s authentication method. Client-credentials grants and identity scopes are unavailable.
An MCP resource token cannot call REST routes. Delegated credentials cannot use session-only account or administrator operations, even when their owner is an administrator. Connected apps → Disconnect revokes the grant and its tokens. See Authentication and connected apps for setup, sign-in policy and token lifetimes.
Check the key
Section titled “Check the key”Replace the address and placeholder key with your own:
curl --fail-with-body http://localhost:3000/api/auth/api-keys/current \ -H "Authorization: Bearer YOUR_MERRAN_API_KEY"This endpoint returns the current key’s details. A successful response confirms that the server accepted it.
Read your recipes
Section titled “Read your recipes”Grant recipes:read to the key, then call:
curl --fail-with-body http://localhost:3000/api/recipes \ -H "Authorization: Bearer YOUR_MERRAN_API_KEY"Check the generated reference for response fields and pagination parameters. Missing permissions produce an error rather than access to another household.
Explore the API
Section titled “Explore the API”For permission examples, pagination, errors, rate limits, and a runnable script, follow Build a recipe-index integration. Then listen for live changes to keep a client refreshed.
- Endpoint reference: routes, schemas, permissions, and examples.
- Download OpenAPI JSON: use it in an API client or generate types.
- Your server’s /api/docs: interactive API explorer.
- Your server’s /api/openapi.json: schema for the version you actually run.
This public site does not need your key. Use your own instance’s explorer for authenticated requests. During alpha, the API may change between releases; prefer your running instance’s schema when versions differ.
MCP and proposal permissions
Section titled “MCP and proposal permissions”The separate /mcp endpoint uses Streamable HTTP and the same bearer keys as REST; it is not part of this REST OpenAPI document. See MCP setup for its tools and review workflow.
Proposal REST routes retain their Recipes permission and additionally check the proposal’s affected area: Plan for meals and tastes, Shopping list for list items, Imports for imports, and Recipes for recipe proposals. Listing omits kinds the key cannot read; reading a specific proposal requires read access, and applying or dismissing it requires write access. Browser sessions continue to review their household’s proposals.
© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.