# Create Clinical Note

Endpoint: POST /clinical_note
Version: v1
Security: x-api-key, a-api-key

## Security:

  - `x-api-key` (unknown)
    apiKey in header x-api-key

  - `a-api-key` (unknown)
    apiKey in header a-api-key

## Request fields (application/json):

  - `client_id` (integer, required)

  - `practitioner_id` (integer, required)

  - `business_id` (integer, required)

  - `details` (array, required)

  - `details.type` (integer)
    Rich Text = 1, Header = 6
    Enum: "1", "6"

  - `details.text` (string)
    Only plain text supported for type Header (6).

  - `account_id` (integer)

  - `treatment_date` (string)
    ISO 8601 local datetime in the tenant's timezone.
    Example: 2026-01-01T12:05:30

  - `tag_ids` (array)
    Example: [1,2]

  - `attachment_client_ids` (array)
    Example: [1,2]

## Response 201:

  - `201` (unknown)
    Successful

## Response 201 fields (application/json):

  - `clinical_note_id` (integer)

## Response 401:

  - `401` (unknown)
    Unauthorised

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 403

  - `error.code` (string)
    Example: UNAUTHORIZED

  - `error.detail` (string)
    Human readable explanation of the error
    Example: Access could not be verified for this request.

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 403

  - `error.code` (string)
    Example: MISSING_AUTHENTICATION_TOKEN

  - `error.detail` (string)
    Human readable explanation of the error
    Example: Authentication token is missing or the requested endpoint does not exist

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

## Response 422:

  - `422` (unknown)
    Unprocessable Entity

## Response 422 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 422

  - `error.code` (string)
    Example: INVALID_BODY

  - `error.detail` (string)
    Human readable explanation of the error
    Example: There are some issues with the request body.

  - `error.validation` (array)
    List of validation errors for specific fields

  - `error.validation.field` (string)
    Example: surname

  - `error.validation.message` (string)
    Example: The surname field is required.

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `error` (object, required)

  - `error.status` (integer)
    Example: 500

  - `error.code` (string)
    Example: SERVER_ERROR

  - `error.detail` (string)
    Human readable explanation of the error
    Example: An unexpected error occurred while processing your request. Please try again in a few minutes. If it keeps happening, contact support with Request ID: 00000000-0000-0000-0000-000000000000.

  - `request_id` (string, required)
    Example: 00000000-0000-0000-0000-000000000000

