---
title: "Create a new client (and optionally patient) from widget"
method: POST
path: "/public/widget/clients"
tags: ["Widget"]
---

# Create a new client (and optionally patient) from widget

`POST /public/widget/clients`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/public/widget/clients`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/public/widget/clients/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- CreateWidgetClientRequest
  - `sessionId` string, required
  - `clinicId` string, required
  - `name` string, required
  - `email` string, required
  - `phone` string, required
  - `patient` CreateWidgetPatientDto
    - `name` string, required
    - `species` string, nullable
    - `breed` string, nullable
  - `referralSource` string, nullable: "How did you hear about us" (ITE-413). This is the registration endpoint the booking wizard actually calls before it books, so it is the primary capture point — the same field on WidgetClientInfoDto covers surfaces that book without registering first. Written to `Client.ReferralSource` on create only; never overwrites a returning client's answer. Free text, usually one of IReadOnlyList&lt;string&gt; ReferralSourceOptions.Presets.
  - `smsConsentGranted` boolean, nullable: 10DLC SMS consent opt-in from registration form

## Response `200`

OK

- CreateWidgetClientResponse
  - `clientId` string
  - `patientId` string, nullable
  - `isNewClient` boolean
  - `isNewPatient` boolean

## Changes

- **2026-08-26** `a57456aa87b0`: 3 info
  - added the new optional request property `referralSource` (media type: application/json)
  - added the new optional request property `referralSource` (media type: text/json)
  - added the new optional request property `referralSource` (media type: application/*+json)

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/public/widget/clients/post.md)

---

[API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
