Skip to main content
Use this endpoint to attach a clinical note to a patient record. Notes map to the FHIR DocumentReference resource and support all standard narrative documentation types — progress notes, discharge summaries, consultation notes, operative notes, and more. At minimum you must provide patientId, title, and content; all other fields are optional.

Request

POST https://api.clinikapi.com/v1/notes

Headers

x-api-key
string
required
Your ClinikAPI secret key (clk_live_* or clk_test_*).
Content-Type
string
required
Must be application/json.

Body

patientId
string
required
ID of the patient this note belongs to (e.g. pt_abc123).
title
string
required
Human-readable title for the note (e.g. "Follow-up Visit - Hypertension Management").
content
string
required
Full text body of the note. Plain text or Markdown are both accepted.
authorId
string
ID of the practitioner who authored the note (e.g. prac_def456).
encounterId
string
ID of the encounter this note is associated with (e.g. enc_xyz789).
type
string
Type of clinical note. One of: progress-note, discharge-summary, consultation-note, history-and-physical, operative-note, procedure-note, referral-note, transfer-summary, other.
contentType
string
MIME type of the note content. Defaults to text/plain. Use text/markdown for Markdown content.
docStatus
string
Document status. One of: preliminary, final, amended. Defaults to preliminary.
category
string
Freeform category tag (e.g. "cardiology").
date
string
Clinically relevant date in YYYY-MM-DD format. Defaults to the current date.

Response

Returns 201 Created with the created note wrapped in the standard envelope.
data.id
string
Generated note ID (e.g. note_abc123).
data.patientId
string
Patient ID the note is linked to.
data.authorId
string
Practitioner ID of the note author, if provided.
data.encounterId
string
Encounter ID the note is linked to, if provided.
data.type
string
Note type as submitted.
data.title
string
Note title.
data.content
string
Note body content.
data.contentType
string
MIME type of the content.
data.docStatus
string
Document status (preliminary, final, or amended).
data.category
string
Category tag, if provided.
data.date
string
Clinically relevant date in YYYY-MM-DD format.
meta
object
Standard response metadata including requestId, timestamp, status, and rate-limit fields.

Examples

curl

curl -X POST https://api.clinikapi.com/v1/notes \
  -H "x-api-key: clk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "patientId": "pt_abc123",
    "authorId": "prac_def456",
    "encounterId": "enc_xyz789",
    "type": "progress-note",
    "title": "Follow-up Visit - Hypertension Management",
    "content": "## Subjective\nPatient reports compliance with lisinopril 10mg daily.\n\n## Assessment\nEssential hypertension — improving.\n\n## Plan\nIncrease lisinopril to 20mg daily.",
    "contentType": "text/markdown",
    "docStatus": "final",
    "category": "cardiology",
    "date": "2025-01-15"
  }'

TypeScript SDK

import { Clinik } from '@clinikapi/sdk';

const clinik = new Clinik(process.env.CLINIKAPI_SECRET_KEY!);

const { data: note } = await clinik.notes.create({
  patientId: 'pt_abc123',
  authorId: 'prac_def456',
  encounterId: 'enc_xyz789',
  type: 'progress-note',
  title: 'Follow-up Visit - Hypertension Management',
  content: '## Subjective\nPatient reports compliance with lisinopril 10mg daily.\n\n## Assessment\nEssential hypertension — improving.\n\n## Plan\nIncrease lisinopril to 20mg daily.',
  contentType: 'text/markdown',
  docStatus: 'final',
  category: 'cardiology',
  date: '2025-01-15',
});

console.log(note.id); // note_abc123