API reference in the dashboard
What this is for
The dashboard’s API reference page is a shortcut: pick a kind of record and instantly get a working “list” request and a working “create” request, in cURL (a command you can paste into a terminal) or TypeScript (code for your server). It is the fastest way to see what a call looks like. The complete reference with every field is in the API Reference tab of this site.Before you start
- Any member can open it.
- Have a key. The examples show only the first characters of one of your keys, so you will paste your full key in yourself. Create keys on Access.
Copy a request
1
Open the page
Choose API reference in the sidebar. The page is titled API reference: “Copy-ready requests for every resource, using your API address and the start of your key.”
2
Pick a resource
In the list on the left, select a type such as Patients. Use Filter resources to search.
3
Pick a language
Under “List patients” and “Create a record”, choose the cURL or TypeScript tab.
4
Copy
Select Copy code.
5
Add your full key and run it
Replace the shortened key (for example
clk_test_ab12cd…) with your real key, ideally from an environment variable. For cURL the key goes in the x-api-key header. Run it.What you’ll see
-
Base URL and authentication: the API address (
https://api.clinikapi.com/v1) with a copy button, and the reminder: send your key in thex-api-keyheader; test keys (clk_test_) use the sandbox, live keys (clk_live_) use production; never put a key in a browser or app. -
For the chosen resource, the heading and a line like
GET https://api.clinikapi.com/v1/patients. -
List and Create a record examples. The create example uses a small sample (
firstName: "Jane",lastName: "Doe"); each resource has different required fields, so check the resource’s guide for the real shape. -
If you have no key yet, the examples show
clk_test_…. - A link to the API documentation for full details.
Common questions
What is cURL?
What is cURL?
A command-line tool for sending web requests. Paste the snippet into a terminal (macOS, Linux, or Windows PowerShell with curl installed) and press Enter.
Why is my key cut off with '…'?
Why is my key cut off with '…'?
The dashboard never keeps your full key, only the first characters, so it can only show that much. Use the full key you saved when you created it.
Why does the create example fail for other resources?
Why does the create example fail for other resources?
The sample body is a generic person example. Each resource needs its own fields. Open that resource’s guide, for example Observations.
What is the TypeScript snippet using?
What is the TypeScript snippet using?
The ClinikAPI SDK,
@clinikapi/sdk, on your server, with the key read from an environment variable. See the quickstart.Are test and live keys used the same way?
Are test and live keys used the same way?
Yes, the only difference is which data they reach.