Skip to main content
Use this endpoint to record a completed patient intake form. Each intake is stored as a FHIR QuestionnaireResponse — a list of question-answer pairs keyed by linkId. Answers support text, numeric, boolean, coded, and date types. You can also nest items for grouped questions like vitals or family history.

Request

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

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
The ID of the patient this intake belongs to (e.g. pt_abc123).
items
array
required
Array of question-answer pairs. Each item must have a linkId and an answer array.
encounterId
string
The encounter this intake is associated with (e.g. enc_xyz789).
questionnaire
string
URI reference to the Questionnaire definition (e.g. "https://forms.clinikapi.com/new-patient-intake").
status
string
Response status. One of: in-progress, completed, amended, stopped. Defaults to completed.
authored
string
ISO 8601 timestamp of when the answers were gathered.
authorId
string
ID of the person who filled out the form (practitioner or patient).
sourceId
string
ID of the person who provided the answers (usually the patient).

Response

Returns 201 Created with the new intake resource wrapped in the standard envelope.
data.id
string
The generated intake ID (e.g. intake_abc123).
data.patientId
string
Patient reference.
data.status
string
Intake status as submitted.
data.items
array
The structured question-answer pairs as stored.
meta
object
Standard response metadata including requestId, timestamp, status, and rate-limit fields.

Examples

curl

curl -X POST https://api.clinikapi.com/v1/intakes \
  -H "x-api-key: clk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "patientId": "pt_abc123",
    "encounterId": "enc_xyz789",
    "questionnaire": "https://forms.clinikapi.com/new-patient-intake",
    "status": "completed",
    "items": [
      {
        "linkId": "chief-complaint",
        "text": "What is your primary reason for visiting today?",
        "answer": [{ "valueString": "Annual physical exam" }]
      },
      {
        "linkId": "pain-level",
        "text": "Rate your current pain level (0-10)",
        "answer": [{ "valueInteger": 3 }]
      },
      {
        "linkId": "smoking-status",
        "text": "Smoking status",
        "answer": [{
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "266919005",
            "display": "Never smoker"
          }
        }]
      }
    ]
  }'

TypeScript SDK

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

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

const { data } = await clinik.intakes.submit({
  patientId: 'pt_abc123',
  encounterId: 'enc_xyz789',
  questionnaire: 'https://forms.clinikapi.com/new-patient-intake',
  status: 'completed',
  items: [
    {
      linkId: 'chief-complaint',
      text: 'What is your primary reason for visiting today?',
      answer: [{ valueString: 'Annual physical exam' }],
    },
    {
      linkId: 'pain-level',
      text: 'Rate your current pain level (0-10)',
      answer: [{ valueInteger: 3 }],
    },
    {
      linkId: 'smoking-status',
      text: 'Smoking status',
      answer: [{
        valueCoding: {
          system: 'http://snomed.info/sct',
          code: '266919005',
          display: 'Never smoker',
        },
      }],
    },
  ],
});

console.log(data.id); // intake_abc123