Skip to main content
The ClinikAPI REST API gives you CRUD and search operations over 14 FHIR R4 resource types, plus bulk import/export and a FHIR passthrough. Every request is scoped to your tenant, and all responses follow a consistent envelope format.

Base URL

https://api.clinikehr.com/v1

Authentication

All endpoints except /health and /v1/metadata require an API key passed in the x-api-key header. Production keys are prefixed clk_live_; sandbox keys are prefixed clk_test_.
curl https://api.clinikehr.com/v1/patients \
  -H "x-api-key: clk_live_abc123"

Request format

Send request bodies as JSON and include the Content-Type: application/json header on all POST and PATCH requests.
HeaderValue
Content-Typeapplication/json
x-api-keyYour API key

Response envelope

Every response is wrapped in a data + meta envelope:
{
  "data": { },
  "meta": {
    "requestId": "req_k8f3a7x2",
    "timestamp": "2025-01-15T09:15:00.000Z",
    "status": 200,
    "rateLimitTotal": 500,
    "rateLimitRemaining": 498,
    "rateLimitReset": 3600
  }
}
data holds the resource or result payload. meta carries request-level metadata including your current rate limit state.

Pagination

List and search endpoints return cursor-based paginated results. The data payload for these endpoints has the following shape:
{
  "data": {
    "data": [ ],
    "total": 150,
    "cursor": "20",
    "hasMore": true
  }
}
ParameterTypeDefaultMaxDescription
countinteger20100Number of results per page
cursorstringOpaque cursor from the previous response
Pass the cursor value from a response back as a query parameter to retrieve the next page. When hasMore is false, you have reached the last page.

Rate limiting

Rate limits are plan-based. The current window state is returned in every response under meta, and also in HTTP headers:
HeaderDescription
X-RateLimit-LimitTotal requests allowed in the current window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetSeconds until the window resets
Requests beyond your plan limit are charged at $0.003 per request.

Error format

Errors follow a consistent shape across all endpoints. See the error reference for a full list of codes and how to handle them.
{
  "error": "VALIDATION_ERROR",
  "message": "Request body validation failed",
  "code": "422",
  "requestId": "req_k8f3a7x2",
  "issues": [
    {
      "severity": "error",
      "code": "required",
      "diagnostics": "firstName is required"
    }
  ]
}