Skip to main content
Use this endpoint to update an existing encounter. Send only the fields you want to change; the remaining fields are untouched. The response returns the complete updated encounter.

Request

PATCH https://api.clinikapi.com/v1/encounters/{id}

Headers

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

Path Parameters

id
string
required
The ID of the encounter to update.

Body

Provide any subset of the encounter fields you want to update.
status
string
Updated status. One of: planned, arrived, triaged, in-progress, onleave, finished, cancelled.
period
object
Updated period with start and/or end timestamps.
lengthMinutes
integer
Updated duration in minutes.
reasonCode
string
Updated reason for the encounter.
location
string
Updated location.
diagnosis
array
Updated diagnoses list. Replaces the entire diagnoses array.

Response

Returns 200 OK with the complete updated encounter.
data.id
string
Encounter ID.
data.status
string
Updated encounter status.
meta
object
Standard response metadata.

Examples

curl

curl -X PATCH https://api.clinikapi.com/v1/encounters/enc_def456 \
  -H "x-api-key: clk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "finished",
    "period": {
      "end": "2025-01-15T09:45:00.000Z"
    },
    "lengthMinutes": 45
  }'

TypeScript SDK

import { ClinikAPI } from "@clinikapi/sdk";

const client = new ClinikAPI({ apiKey: "clk_live_abc123" });

const updated = await client.encounters.update("enc_def456", {
  status: "finished",
  period: { end: "2025-01-15T09:45:00.000Z" },
  lengthMinutes: 45,
});