Skip to main content
POST
/
clients
cURL
curl --request POST \
  --url https://api.caspen.com/v1/clients \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "<string>",
  "last_name": "<string>",
  "title": "<string>",
  "preferred_name": "<string>",
  "profession": "<string>",
  "email": "[email protected]",
  "date_of_birth": "2023-11-07T05:31:56Z",
  "sex": "<string>",
  "gender_identity": "<string>",
  "pronouns": "<string>",
  "privacy_policy_consent": "accepted",
  "emergency_contact_name": "<string>",
  "emergency_contact_phone": "<string>",
  "emergency_contact_relationship": "<string>",
  "notes": "<string>",
  "alert": "<string>",
  "referral_type_id": 123,
  "referral_description": "<string>",
  "referred_by_id": "<string>",
  "phone_number": "<string>",
  "intolerances": [
    "<string>"
  ],
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postal_code": "<string>",
    "country_code": "<string>"
  },
  "tag_ids": [
    123
  ],
  "medications": [
    {
      "name": "<string>",
      "dosage": "<string>"
    }
  ],
  "allergies": [
    {
      "name": "<string>",
      "reaction": "<string>"
    }
  ],
  "phone_numbers": [
    {
      "number": "<string>",
      "code": "<string>",
      "type": "mobile"
    }
  ]
}
'
{
  "id": "<string>",
  "title": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "preferred_name": "<string>",
  "profession": "<string>",
  "email": "<string>",
  "date_of_birth": "<string>",
  "sex": "<string>",
  "gender_identity": "<string>",
  "pronouns": "<string>",
  "privacy_policy_consent": "<string>",
  "medications": [
    {
      "name": "<string>",
      "dosage": "<string>"
    }
  ],
  "allergies": [
    {
      "name": "<string>",
      "reaction": "<string>"
    }
  ],
  "intolerances": [
    "<string>"
  ],
  "emergency_contact_name": "<string>",
  "emergency_contact_phone": "<string>",
  "emergency_contact_relationship": "<string>",
  "notes": "<string>",
  "alert": "<string>",
  "referral_type_id": "<string>",
  "referral_description": "<string>",
  "referred_by_id": "<string>",
  "phone_number": "<string>",
  "phone_numbers": [
    {
      "id": "<string>",
      "code": "<string>",
      "number": "<string>",
      "type": "<string>"
    }
  ],
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postal_code": "<string>",
    "country_code": "<string>"
  },
  "tag_ids": [
    "<string>"
  ],
  "created_at": "<string>"
}

Body

application/json
first_name
string
required
last_name
string
required
title
string | null
preferred_name
string | null
profession
string | null
email
string<email> | null
date_of_birth
string<date-time> | null
sex
string | null
gender_identity
string | null
pronouns
string | null
Available options:
accepted,
rejected
emergency_contact_name
string | null
emergency_contact_phone
string | null
emergency_contact_relationship
string | null
notes
string | null
alert
string | null
Maximum string length: 500
referral_type_id
integer | null
referral_description
string | null
referred_by_id
string
phone_number
string | null
intolerances
string[] | null
address
object
tag_ids
integer[]
medications
object[] | null
allergies
object[] | null
phone_numbers
object[]

Response

ClientResource

id
string

The client's unique identifier.

Example:

"cli_01HQFQ9QWTNNPY58FZ8CB3FWWK"

title
string | null

The client's honorific title.

Example:

"Ms"

first_name
string

The client's given name.

Example:

"Helen"

last_name
string

The client's family name.

Example:

"Keller"

preferred_name
string | null

The client's preferred name.

Example:

"Nell"

profession
string | null

The client's profession or occupation.

Example:

"Teacher"

email
string | null

The client's email address.

date_of_birth
string | null

The client's date of birth (ISO 8601).

Example:

"1987-06-27"

sex
string | null

The client's sex assigned at birth.

Example:

"female"

gender_identity
string | null

The client's gender identity.

Example:

"Woman"

pronouns
string | null

The client's pronouns.

Example:

"she/her"

The client's privacy policy consent status.

Example:

"accepted"

medications
object[] | null

The client's medications.

allergies
object[] | null

The client's allergies.

intolerances
string[] | null

The client's intolerances.

Example:
["Gluten", "Lactose"]
emergency_contact_name
string | null

The client's emergency contact name.

Example:

"Anne Sullivan"

emergency_contact_phone
string | null

The client's emergency contact phone number.

Example:

"+61401111222"

emergency_contact_relationship
string | null

The client's relationship to the emergency contact.

Example:

"Guardian"

notes
string | null

The client's practitioner or admin notes.

Example:

"Client prefers morning appointments."

alert
string | null

The client's alert message for staff.

Example:

"Requires wheelchair access."

referral_type_id
string | null

The client's referral type identifier.

Example:

"ret_01J11QXSM53YENWF114C0MWGDJ"

referral_description
string | null

The client's referral description.

Example:

"Referred by GP at City Clinic."

referred_by_id
string | null

The client's referring entity identifier.

Example:

"cli_01HQQZCM1VDNHXDFEHX4X4KK52"

phone_number
string | null

The client's primary phone number.

Example:

"+61400123456"

phone_numbers
object[]

A list of the client's additional phone numbers.

Example:
[
{
"id": "pho_01HQR12PABCD1234EFGH56789",
"code": "+61",
"number": "400123456",
"type": "mobile"
}
]
address
object

The client's address details.

Example:
{
"line1": "123 Sample Street",
"line2": null,
"city": "Sydney",
"state": "NSW",
"postal_code": "2000",
"country_code": "AU"
}
tag_ids
string[]

The IDs of tags attached to the client.

Example:
[
"tag_01HYHYQHA682J0K1RW7B2HVA9F",
"tag_01HYHYW37MTYJPMT5JV4RN99GK"
]
created_at
string

The timestamp when the client was created (ISO 8601).

Example:

"2024-01-01T12:00:00Z"