LeyApp offers a public API to check lawyer availability and initiate consultation bookings. Designed for AI assistants, integrations, and third-party tools.
Sign up for early access to API keys, higher rate limits, and new endpoints as we roll them out.
We'll notify developers when API keys become available.
/api/v1/lawyers/{lawyer_id}/availabilityReturns available consultation time slots for a specific lawyer. No authentication required. Date range limited to 14 days.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | YYYY-MM-DD | No | Start of date range (default: today) |
| end_date | YYYY-MM-DD | No | End of date range (default: today + 13 days) |
{
"lawyer_id": "a1b2c3d4-...",
"lawyer_name": "Ana García López",
"hourly_rate_cents": 12000,
"currency": "EUR",
"booking_fee_cents": 200,
"slots": [
{
"date": "2026-03-02",
"start_time": "09:00:00",
"end_time": "10:00:00",
"available": true
}
],
"booking_url": "https://leyapp.es/lawyer/a1b2c3d4#book",
"profile_url": "https://leyapp.es/lawyer/a1b2c3d4"
}/api/v1/bookings/initiateCreates a booking intent and returns a confirmation URL. The user must visit this URL to authenticate and complete payment. Bookings cannot be completed via API alone.
POST /api/v1/bookings/initiate
Content-Type: application/json
{
"lawyer_id": "a1b2c3d4-...",
"date": "2026-03-02",
"start_time": "09:00:00",
"end_time": "10:00:00",
"source": "ai_agent",
"agent_name": "ChatGPT"
}{
"booking_intent_id": "intent_xyz789",
"confirmation_url": "https://leyapp.es/book/confirm?intent=intent_xyz789",
"expires_at": "2026-03-02T08:00:00Z",
"slot": { "date": "2026-03-02", "start_time": "09:00:00", "end_time": "10:00:00" },
"lawyer": { "id": "a1b2c3d4-...", "name": "Ana García López", "hourly_rate_cents": 12000 },
"message": "To confirm this booking, the user must visit the confirmation URL."
}User authentication always required
AI assistants should present the confirmation URL to the user. The user must always sign in and confirm payment on LeyApp.
Rate limits
Availability: 10 requests/min per IP. Booking initiation: 5 requests/hour per IP.
Intents expire in 15 minutes
Booking confirmation links expire after 15 minutes. Always check availability before creating a new intent.
Prices are in EUR cents
All amounts are in cents (e.g., 12000 = €120.00). Currency is always EUR.
API keys and authentication
Developer registration with API keys for higher rate limits and usage tracking.
Lawyer search endpoint
Search lawyers by specialty, city, language, and price range via the API.
Webhook notifications
Receive real-time notifications when bookings are confirmed, canceled, or modified.
OAuth 2.1 authentication
Delegated OAuth flow for trusted AI partners to complete bookings on behalf of users.
Need more information or want to integrate the LeyApp API?