Skip to main content
Use this endpoint to register a new patient. You must provide at least firstName and lastName. All other fields — email, phone, gender, date of birth, and address — are optional but recommended for identity matching and clinical workflows.

Request

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

Headers

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

Body

firstName
string
required
Patient’s first name. Maximum 100 characters.
lastName
string
required
Patient’s last name. Maximum 100 characters.
email
string
Patient’s email address. Must be a valid email format.
phone
string
Patient’s phone number. Maximum 20 characters.
gender
string
Biological or administrative gender. One of: male, female, other, unknown.
birthDate
string
Date of birth in YYYY-MM-DD format.
address
object
Patient’s mailing address.

Response

Returns 201 Created with the new patient resource wrapped in the standard envelope.
data.id
string
The generated patient ID (e.g. pt_abc123).
data.firstName
string
Patient’s first name.
data.lastName
string
Patient’s last name.
data.email
string
Patient’s email address, if provided.
data.phone
string
Patient’s phone number, if provided.
data.gender
string
Gender value as submitted.
data.birthDate
string
Date of birth in YYYY-MM-DD format.
data.address
object
Address object as submitted.
meta
object
Standard response metadata including requestId, timestamp, status, and rate-limit fields.

Examples

curl

curl -X POST https://api.clinikapi.com/v1/patients \
  -H "x-api-key: clk_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Jane",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "+1-555-0100",
    "gender": "female",
    "birthDate": "1990-03-15",
    "address": {
      "line": ["123 Main St"],
      "city": "Springfield",
      "state": "IL",
      "postalCode": "62701",
      "country": "US"
    }
  }'

TypeScript SDK

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

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

const patient = await client.patients.create({
  firstName: "Jane",
  lastName: "Doe",
  email: "[email protected]",
  phone: "+1-555-0100",
  gender: "female",
  birthDate: "1990-03-15",
  address: {
    line: ["123 Main St"],
    city: "Springfield",
    state: "IL",
    postalCode: "62701",
    country: "US",
  },
});

console.log(patient.data.id); // pt_abc123