Developers
Business API usage guide
Enterprise accounts can generate API keys to manage locations and free/busy data from external systems. Keys are issued in the dashboard; plaintext secrets are shown once.
Access
- Plan: Enterprise (quote-based) — request a quote
- Generate keys: Dashboard → API keys
- Auth header:
Authorization: Bearer ea_… - Base URL:
https://earliestappointment.com/api/v1
Authentication
Send your API key on every request. Revoked or non-Enterprise keys return 401/402.
curl -s https://earliestappointment.com/api/v1/businesses \ -H "Authorization: Bearer ea_YOUR_KEY"
List businesses
GET /api/v1/businesses — returns all locations owned by the key's account.
{
"data": [
{
"id": "clx…",
"name": "Riverside Dental",
"slug": "riverside-dental-nyc",
"city": "New York",
"state": "NY",
"nextAvailableDate": "2026-07-18T00:00:00.000Z",
"category": { "slug": "dental", "name": "Dental" }
}
]
}Get one business
GET /api/v1/businesses/:id — includes hours and specialties.
Update profile
PATCH /api/v1/businesses/:id — partial update. Allowed fields: name, description, phone, email, websiteUrl, bookingUrl, address fields, timezone, lat, lng, nextAvailableDate.
curl -X PATCH https://earliestappointment.com/api/v1/businesses/BUSINESS_ID \
-H "Authorization: Bearer ea_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "555-0100",
"bookingUrl": "https://example.com/book",
"nextAvailableDate": "2026-07-20T14:00:00.000Z"
}'Hours of operation
GET /api/v1/businesses/:id/hoursPUT /api/v1/businesses/:id/hours — replace the week. dayOfWeek is 0=Sunday … 6=Saturday.
{
"hours": [
{ "dayOfWeek": 1, "closed": false, "openTime": "09:00", "closeTime": "17:00" },
{ "dayOfWeek": 0, "closed": true }
]
}Availability (free/busy)
GET /api/v1/businesses/:id/availabilityPUT /api/v1/businesses/:id/availability — send busy intervals only. By default, replaces blocks with the same source (default api).
{
"source": "api",
"replace": true,
"nextAvailableDate": "2026-07-21T09:00:00.000Z",
"blocks": [
{
"startAt": "2026-07-16T13:00:00.000Z",
"endAt": "2026-07-16T14:00:00.000Z",
"isBusy": true
}
]
}Do not send patient names, event titles, or other personal data — free/busy intervals only.
Errors
401— missing or invalid key402— account is not on Enterprise404— business not found for this account400— validation error (errormessage in JSON)
Custom calendar connectors
Enterprise can also register an outbound free/busy endpoint under Dashboard → Calendar sync. For more than 20 connections/locations or enhanced connectors, contact us for a quote.