Developer API keys
Create and manage API keys to build LeyApp search, availability and booking flows into your own product.
Last updated: July 16, 2026
This article is about **API keys** (leyk_...) for developers calling LeyApp's REST API from their own software. If you just want to connect an AI assistant like Claude or ChatGPT to your LeyApp account, you don't need an API key — see "Connect your AI assistant to LeyApp" instead.
What is the developer API?
LeyApp exposes a public REST API under /api/v1 that lets you search lawyers, read availability, and start bookings from your own website, app, or internal tool. Basic read access works without any credentials, but an API key raises your rate limits, unlocks additional endpoints, and gives you a dashboard with your keys and usage.
Any LeyApp account can create API keys — you don't need a special account type. Bookings started through the API are never charged automatically: the client always confirms and pays on leyapp.es, so your integration never handles money or card details.
Creating an API key
Keys are managed from your dashboard:
- Open Dashboard → Developer from the sidebar.
- Click "Create key" and give it a descriptive name, e.g. "Website widget (production)".
- Choose the key type: Live for real requests, or Test to experiment safely.
- Copy the key immediately and store it somewhere safe, like a password manager or your hosting provider's secret storage.
The full key is shown exactly once, right after creation. LeyApp only stores a fingerprint of it, so it can never be displayed again. If you lose a key, revoke it and create a new one.
Test keys vs live keys
Test keys (leyk_test_...) behave exactly like live keys — same endpoints, same responses, same validation — with one crucial difference: nothing real happens. A test booking request is fully checked against real availability, but no booking intent is created and no lawyer is notified.
Live keys (leyk_...) create real booking intents. When a client follows the confirmation link of a live intent, they are taken to the normal LeyApp payment and confirmation flow.
Build your integration against a test key first. When everything works, swap in a live key — no code changes needed beyond the key itself.
Using your key
Send the key in the Authorization header of every request: "Authorization: Bearer leyk_...". Requests without a key still work for public endpoints, but at lower anonymous rate limits.
Every response includes an X-Request-Id header. If something behaves unexpectedly, include that ID when you contact support — it lets us find your exact request in seconds.
Rate limits
New keys start on the free tier: 60 requests per minute and 5,000 per day. Every response tells you where you stand via the X-RateLimit-Limit and X-RateLimit-Remaining headers; if you exceed the limit you receive a 429 response with a Retry-After header telling you when to try again.
Higher tiers for partners exist and are granted by the LeyApp team — contact us through the support form if your integration needs more headroom.
Keeping keys safe
An API key is a password for your integration. Treat it like one:
- Never put a key in client-side code, mobile apps, or public repositories — anyone who can read it can spend your rate limit and act within the key's scopes.
- Use a separate key per integration or environment, so you can revoke one without breaking the others.
- Revoke keys you no longer use. Revocation is immediate — requests with a revoked key fail on the next call.
- If a key may have leaked, revoke it right away in Dashboard → Developer and create a replacement. Rotation is zero-downtime: create the new key first, deploy it, then revoke the old one.
Troubleshooting
I get a 401 "Invalid API key".
Check that the header is exactly "Authorization: Bearer leyk_..." with no extra spaces, and that the key hasn't been revoked. Note that MCP tokens (ley_...) from Settings → API Tokens are a different credential and are not valid on the REST API.
I get a 429 "Rate limit exceeded".
You've hit your tier's per-minute or per-day window. Honour the Retry-After header and retry with exponential backoff. If you hit the daily cap regularly, ask us about a higher tier.
My test bookings never appear anywhere.
That's by design — test keys validate everything but create nothing. Switch to a live key to create real booking intents.
Full endpoint reference, request and response examples, and integration guides live on the developer portal at leyapp.es/developers.