> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clinikehr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the FHIR capability statement

> FHIR R4 CapabilityStatement — exactly what this gateway supports, nothing more. No bearer key required (this is the same discovery document for every caller); Content-Type is application/fhir+json, not the {data} envelope. Lists ONLY the resources/interactions this gateway actually serves — Patient, Appointment, DocumentReference (notes), Condition, AllergyIntolerance, MedicationStatement, MedicationRequest, Practitioner (providers), Coverage, Organization (insurance payers) and MedicationKnowledge (inventory items), search parameters limited to the query filters the plain JSON routes already accept. There is no _include/_revinclude and no general /fhir passthrough — see the developer guide (api-docs/fhir.mdx) for what a partner will not find.



## OpenAPI

````yaml /openapi/ehr-api.v1.yaml get /v1/metadata
openapi: 3.1.0
info:
  title: ClinikEHR API
  version: 1.0.0
  description: >-
    Server-to-server REST API for a clinic's own data, reached with a key the
    clinic (or a developer workspace) creates in the developer portal.


    Authenticate every request with `Authorization: Bearer <key>`. Test keys
    reach only your workspace's own synthetic sandbox; live keys reach the
    clinic that created them. Lists wrap their rows as `{ data, has_more,
    next_cursor }`; single resources are returned directly. Errors are
    `application/problem+json` (RFC 9457) with a stable `code`.


    Write requests accept an `Idempotency-Key` header so a retry never repeats a
    change. See the guides for authentication, permissions, pagination, rate
    limits and retries.
servers:
  - url: https://api.clinikehr.com
security:
  - ApiKey: []
paths:
  /v1/metadata:
    get:
      tags:
        - Fhir
      summary: Get the FHIR capability statement
      description: >-
        FHIR R4 CapabilityStatement — exactly what this gateway supports,
        nothing more. No bearer key required (this is the same discovery
        document for every caller); Content-Type is application/fhir+json, not
        the {data} envelope. Lists ONLY the resources/interactions this gateway
        actually serves — Patient, Appointment, DocumentReference (notes),
        Condition, AllergyIntolerance, MedicationStatement, MedicationRequest,
        Practitioner (providers), Coverage, Organization (insurance payers) and
        MedicationKnowledge (inventory items), search parameters limited to the
        query filters the plain JSON routes already accept. There is no
        _include/_revinclude and no general /fhir passthrough — see the
        developer guide (api-docs/fhir.mdx) for what a partner will not find.
      operationId: getCapabilityStatement
      responses:
        '200':
          description: OK.
          content:
            application/fhir+json:
              schema:
                type: object
components:
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: ehr_live_<keyId>_<secret> or ehr_test_<keyId>_<secret>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.