Skip to main content
Use this endpoint to search for appointments within your tenant. Filter by patient, status, or date range. Use sort to order results and paginate with count and cursor.

Request

GET https://api.clinikapi.com/v1/appointments

Headers

x-api-key
string
required
Your ClinikAPI secret key (clk_live_* or clk_test_*).

Query Parameters

patientId
string
Filter by patient ID.
status
string
Filter by appointment status.
dateFrom
string
Return appointments starting on or after this date (YYYY-MM-DD).
dateTo
string
Return appointments starting on or before this date (YYYY-MM-DD).
sort
string
Sort field. Prefix with - for descending order (e.g. -start).
count
integer
Results per page. Default: 20. Maximum: 100.
cursor
string
Pagination cursor from the previous response.

Response

Returns 200 OK with a paginated list of appointments.
data.data
array
Array of appointment objects.
data.total
integer
Total matching appointments.
data.cursor
string
Cursor for the next page.
data.hasMore
boolean
true if more pages exist.
meta
object
Standard response metadata.

Examples

curl

curl "https://api.clinikapi.com/v1/appointments?patientId=pt_abc123&status=booked&dateFrom=2025-02-01&sort=start" \
  -H "x-api-key: clk_live_abc123"

TypeScript SDK

import { ClinikAPI } from "@clinikapi/sdk";

const client = new ClinikAPI({ apiKey: "clk_live_abc123" });

const results = await client.appointments.search({
  patientId: "pt_abc123",
  status: "booked",
  dateFrom: "2025-02-01",
  sort: "start",
});