> For the complete documentation index, see [llms.txt](https://docs.welkinhealth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.welkinhealth.com/api-reference/models.md).

# Models

## The CareTeamMember object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]}}}}
```

## The PatientTerritory object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientTerritory":{"type":"object","properties":{"name":{"type":"string","description":"Territory group name"},"territories":{"type":"array","items":{"type":"string"},"description":"List of territory names within the group"}}}}}}
```

## The PatientRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientRequest":{"type":"object","required":["firstName","lastName"],"properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"E.164 format, e.g. `+14155552671`"},"birthDate":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"externalGuid":{"type":"string","format":"uuid"},"country":{"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"zip":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"patientTerritories":{"type":"array","items":{"$ref":"#/components/schemas/PatientTerritory"}},"careTeam":{"type":"array","items":{"$ref":"#/components/schemas/CareTeamMember"},"description":"Care team members. One must have pointOfContact: true."},"gender":{"$ref":"#/components/schemas/PatientGender"},"maritalStatus":{"$ref":"#/components/schemas/MaritalStatus"},"primaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryEmail":{"type":"string","format":"email"},"phoneLabel":{"type":"string"},"secondaryPhone":{"type":"string","description":"E.164 format"},"secondaryPhoneLabel":{"type":"string"},"patientType":{"$ref":"#/components/schemas/PatientType"},"notes":{"type":"string"},"cadence":{"type":"array","items":{"$ref":"#/components/schemas/PatientCadence"}},"patientRegion":{"type":"string"},"patientTerritory":{"type":"string"}}},"PatientTerritory":{"type":"object","properties":{"name":{"type":"string","description":"Territory group name"},"territories":{"type":"array","items":{"type":"string"},"description":"List of territory names within the group"}}},"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"MaritalStatus":{"type":"string","enum":["A","D","I","L","M","P","S","T","U","W","UKN"],"description":"A = Annulled, D = Divorced, I = Interlocutory, L = Legally Separated, M = Married, P = Polygamous, S = Never Married, T = Domestic partner, U = Unmarried, W = Widowed, UKN = Unknown"},"PatientLanguage":{"type":"string","enum":["ENGLISH","SPANISH","FRENCH","PORTUGUESE","GERMAN","ITALIAN","ARABIC","CHINESE","MANDARIN","VIETNAMESE","JAPANESE","RUSSIAN","ALBANIAN","OTHER"]},"PatientType":{"type":"string","enum":["ADULT","MINOR","COUPLE"]},"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The BulkUpdateRow object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"BulkUpdateRow":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"UUID of the record to update"},"jsonBody":{"type":"object","description":"Fields to update. Keys are CDT field names.","additionalProperties":true},"result":{"type":"object","readOnly":true,"properties":{"status":{"type":"string","enum":["OK","ERROR"]},"content":{"type":"object","additionalProperties":true}}}}}}}}
```

## The SortInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}}}}}
```

## The PageableInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}}}}}
```

## The PaginatedResponse object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}}}}}
```

## The FaxParty object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}}}}}
```

## The FaxSender object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxSender":{"$ref":"#/components/schemas/FaxParty"},"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}}}}}
```

## The FaxReceiver object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxReceiver":{"$ref":"#/components/schemas/FaxParty"},"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}}}}}
```

## The FaxFile object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"File size in bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The FaxDocument object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxDocument":{"type":"object","nullable":true,"description":"Document record linked to this fax, if assigned.","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"title":{"type":"string"}}}}}}
```

## The FaxPatient object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxPatient":{"type":"object","nullable":true,"description":"Patient linked to this fax, if assigned.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}}}
```

## The Fax object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Fax":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"updatedBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"faxId":{"type":"string","nullable":true,"description":"External fax provider ID"},"externalId":{"type":"string","format":"uuid","nullable":true},"direction":{"type":"string","enum":["IN","OUT"]},"fromNumber":{"type":"string","description":"E.164 format"},"sender":{"$ref":"#/components/schemas/FaxParty"},"toNumber":{"type":"string","nullable":true,"description":"E.164 format"},"receiver":{"$ref":"#/components/schemas/FaxParty","nullable":true},"subject":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PROCESSING","DELIVERED","FAILED"]},"originalStatus":{"type":"string","nullable":true,"description":"Raw status string from the fax provider"},"statusMessage":{"type":"string","nullable":true},"document":{"$ref":"#/components/schemas/FaxDocument"},"patient":{"$ref":"#/components/schemas/FaxPatient"},"receivedAt":{"type":"string","format":"date-time","nullable":true},"highQuality":{"type":"boolean"},"files":{"type":"array","items":{"$ref":"#/components/schemas/FaxFile"}},"sentBy":{"type":"string","format":"uuid","nullable":true},"sentByName":{"type":"string","nullable":true},"reviewed":{"type":"boolean"}}},"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}},"FaxDocument":{"type":"object","nullable":true,"description":"Document record linked to this fax, if assigned.","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"title":{"type":"string"}}},"FaxPatient":{"type":"object","nullable":true,"description":"Patient linked to this fax, if assigned.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"FaxFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"File size in bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The FaxListResponse object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FaxListResponse":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/Fax"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"Fax":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"updatedBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"faxId":{"type":"string","nullable":true,"description":"External fax provider ID"},"externalId":{"type":"string","format":"uuid","nullable":true},"direction":{"type":"string","enum":["IN","OUT"]},"fromNumber":{"type":"string","description":"E.164 format"},"sender":{"$ref":"#/components/schemas/FaxParty"},"toNumber":{"type":"string","nullable":true,"description":"E.164 format"},"receiver":{"$ref":"#/components/schemas/FaxParty","nullable":true},"subject":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PROCESSING","DELIVERED","FAILED"]},"originalStatus":{"type":"string","nullable":true,"description":"Raw status string from the fax provider"},"statusMessage":{"type":"string","nullable":true},"document":{"$ref":"#/components/schemas/FaxDocument"},"patient":{"$ref":"#/components/schemas/FaxPatient"},"receivedAt":{"type":"string","format":"date-time","nullable":true},"highQuality":{"type":"boolean"},"files":{"type":"array","items":{"$ref":"#/components/schemas/FaxFile"}},"sentBy":{"type":"string","format":"uuid","nullable":true},"sentByName":{"type":"string","nullable":true},"reviewed":{"type":"boolean"}}},"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}},"FaxDocument":{"type":"object","nullable":true,"description":"Document record linked to this fax, if assigned.","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"title":{"type":"string"}}},"FaxPatient":{"type":"object","nullable":true,"description":"Patient linked to this fax, if assigned.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"FaxFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"File size in bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The TokenResponse object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"Bearer token. Valid for 60 minutes."}}}}}}
```

## The PatientGender object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]}}}}
```

## The PatientType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientType":{"type":"string","enum":["ADULT","MINOR","COUPLE"]}}}}
```

## The PatientLanguage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientLanguage":{"type":"string","enum":["ENGLISH","SPANISH","FRENCH","PORTUGUESE","GERMAN","ITALIAN","ARABIC","CHINESE","MANDARIN","VIETNAMESE","JAPANESE","RUSSIAN","ALBANIAN","OTHER"]}}}}
```

## The MaritalStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"MaritalStatus":{"type":"string","enum":["A","D","I","L","M","P","S","T","U","W","UKN"],"description":"A = Annulled, D = Divorced, I = Interlocutory, L = Legally Separated, M = Married, P = Polygamous, S = Never Married, T = Domestic partner, U = Unmarried, W = Widowed, UKN = Unknown"}}}}
```

## The PhoneCapability object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PhoneCapability":{"type":"string","enum":["VOICE_CALL","SMS","WHATS_APP"]}}}}
```

## The PatientCadencePriority object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The DayOfWeek object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}}}}
```

## The SimpleRole object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SimpleRole":{"type":"object","properties":{"name":{"type":"string"},"primaryRole":{"type":"boolean"},"description":{"type":"string","nullable":true},"instanceId":{"type":"string","format":"uuid","nullable":true}}}}}}
```

## The PatientTeamMember object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientTeamMember":{"type":"object","description":"Full care team member representation returned on Patient reads.","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/SimpleRole"}},"pointOfContact":{"type":"boolean"},"enabled":{"type":"boolean"}}},"SimpleRole":{"type":"object","properties":{"name":{"type":"string"},"primaryRole":{"type":"boolean"},"description":{"type":"string","nullable":true},"instanceId":{"type":"string","format":"uuid","nullable":true}}}}}}
```

## The CadenceSchedule object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}}}}
```

## The PatientCadence object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The PatientUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientUpdateRequest":{"type":"object","description":"Partial update — all fields optional. Omitted fields are left unchanged.","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"E.164 format, e.g. `+14155552671`"},"birthDate":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"externalGuid":{"type":"string","format":"uuid"},"country":{"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"zip":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"patientTerritories":{"type":"array","items":{"$ref":"#/components/schemas/PatientTerritory"}},"careTeam":{"type":"array","items":{"$ref":"#/components/schemas/CareTeamMember"},"description":"Care team members. One must have pointOfContact: true."},"gender":{"$ref":"#/components/schemas/PatientGender"},"maritalStatus":{"$ref":"#/components/schemas/MaritalStatus"},"primaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryEmail":{"type":"string","format":"email"},"phoneLabel":{"type":"string"},"secondaryPhone":{"type":"string","description":"E.164 format"},"secondaryPhoneLabel":{"type":"string"},"patientType":{"$ref":"#/components/schemas/PatientType"},"notes":{"type":"string"},"cadence":{"type":"array","items":{"$ref":"#/components/schemas/PatientCadence"}},"patientRegion":{"type":"string"},"patientTerritory":{"type":"string"}}},"PatientTerritory":{"type":"object","properties":{"name":{"type":"string","description":"Territory group name"},"territories":{"type":"array","items":{"type":"string"},"description":"List of territory names within the group"}}},"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"MaritalStatus":{"type":"string","enum":["A","D","I","L","M","P","S","T","U","W","UKN"],"description":"A = Annulled, D = Divorced, I = Interlocutory, L = Legally Separated, M = Married, P = Polygamous, S = Never Married, T = Domestic partner, U = Unmarried, W = Widowed, UKN = Unknown"},"PatientLanguage":{"type":"string","enum":["ENGLISH","SPANISH","FRENCH","PORTUGUESE","GERMAN","ITALIAN","ARABIC","CHINESE","MANDARIN","VIETNAMESE","JAPANESE","RUSSIAN","ALBANIAN","OTHER"]},"PatientType":{"type":"string","enum":["ADULT","MINOR","COUPLE"]},"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The PatientBulkUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientBulkUpdateRequest":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"timezone":{"type":"string"},"patientTerritories":{"type":"array","items":{"$ref":"#/components/schemas/PatientTerritory"}},"patientRegion":{"type":"string"},"patientTerritory":{"type":"string"},"careTeam":{"type":"array","items":{"$ref":"#/components/schemas/CareTeamMember"}},"cadence":{"type":"array","items":{"$ref":"#/components/schemas/PatientCadence"}},"careTeamAdditions":{"type":"array","items":{"type":"string","format":"uuid"}},"careTeamReplacements":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}}}},"careTeamRemovals":{"type":"array","items":{"type":"string","format":"uuid"}}}},"PatientTerritory":{"type":"object","properties":{"name":{"type":"string","description":"Territory group name"},"territories":{"type":"array","items":{"type":"string"},"description":"List of territory names within the group"}}},"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]},"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The PatientResponse object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientResponse":{"type":"object","description":"Patient record. Response is extensible — tenant-configured custom attributes appear as additional top-level properties beyond those listed here.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"externalGuid":{"type":"string","format":"uuid","nullable":true},"externalId":{"type":"string","nullable":true},"mrn":{"type":"string","nullable":true},"nric":{"type":"string","nullable":true},"accessCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"middleName":{"type":"string","nullable":true},"birthDate":{"type":"string","format":"date-time","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"maritalStatus":{"$ref":"#/components/schemas/MaritalStatus"},"primaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"email":{"type":"string","format":"email","nullable":true},"secondaryEmail":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"phoneLabel":{"type":"string","nullable":true},"primaryPhoneCapabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCapability"}},"secondaryPhone":{"type":"string","nullable":true},"secondaryPhoneLabel":{"type":"string","nullable":true},"secondaryPhoneCapabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCapability"}},"preferableInstancePhoneId":{"type":"string","format":"uuid","nullable":true},"country":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"patientType":{"$ref":"#/components/schemas/PatientType"},"notes":{"type":"string","nullable":true},"careTeamMembers":{"type":"array","items":{"$ref":"#/components/schemas/CareTeamMember"},"readOnly":true,"description":"Deprecated — use careTeam."},"patientPrograms":{"type":"array","items":{"$ref":"#/components/schemas/PatientProgram"},"readOnly":true},"careTeam":{"type":"array","items":{"$ref":"#/components/schemas/PatientTeamMember"}},"territorialTeam":{"type":"array","items":{"$ref":"#/components/schemas/PatientTeamMember"},"readOnly":true,"description":"Only populated when the `expand=true` query param is set."},"cadence":{"type":"array","items":{"$ref":"#/components/schemas/PatientCadence"}},"patientRegion":{"type":"string","nullable":true},"patientRegionTitle":{"type":"string","readOnly":true,"nullable":true},"patientTerritory":{"type":"string","nullable":true},"pointOfContact":{"$ref":"#/components/schemas/PatientTeamMember","nullable":true}}},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"MaritalStatus":{"type":"string","enum":["A","D","I","L","M","P","S","T","U","W","UKN"],"description":"A = Annulled, D = Divorced, I = Interlocutory, L = Legally Separated, M = Married, P = Polygamous, S = Never Married, T = Domestic partner, U = Unmarried, W = Widowed, UKN = Unknown"},"PatientLanguage":{"type":"string","enum":["ENGLISH","SPANISH","FRENCH","PORTUGUESE","GERMAN","ITALIAN","ARABIC","CHINESE","MANDARIN","VIETNAMESE","JAPANESE","RUSSIAN","ALBANIAN","OTHER"]},"PhoneCapability":{"type":"string","enum":["VOICE_CALL","SMS","WHATS_APP"]},"PatientType":{"type":"string","enum":["ADULT","MINOR","COUPLE"]},"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]},"PatientProgram":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"programName":{"type":"string"},"programTitle":{"type":"string"},"programDescription":{"type":"string","nullable":true},"assigned":{"type":"boolean","default":true},"patientId":{"type":"string","format":"uuid"},"currentPhase":{"$ref":"#/components/schemas/PatientPhase"},"status":{"$ref":"#/components/schemas/PatientProgramStatus"},"compatibleWithCurrentVersion":{"type":"boolean"},"pathHistory":{"type":"array","items":{"$ref":"#/components/schemas/PatientPhase"}}}},"PatientPhase":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"currentVersion":{"type":"string"},"deleted":{"type":"boolean"}}},"PatientProgramStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","INTERRUPTED","FINISHED"]},"PatientTeamMember":{"type":"object","description":"Full care team member representation returned on Patient reads.","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/SimpleRole"}},"pointOfContact":{"type":"boolean"},"enabled":{"type":"boolean"}}},"SimpleRole":{"type":"object","properties":{"name":{"type":"string"},"primaryRole":{"type":"boolean"},"description":{"type":"string","nullable":true},"instanceId":{"type":"string","format":"uuid","nullable":true}}},"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The PatientPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/PatientResponse"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"PatientResponse":{"type":"object","description":"Patient record. Response is extensible — tenant-configured custom attributes appear as additional top-level properties beyond those listed here.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"externalGuid":{"type":"string","format":"uuid","nullable":true},"externalId":{"type":"string","nullable":true},"mrn":{"type":"string","nullable":true},"nric":{"type":"string","nullable":true},"accessCode":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"middleName":{"type":"string","nullable":true},"birthDate":{"type":"string","format":"date-time","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"maritalStatus":{"$ref":"#/components/schemas/MaritalStatus"},"primaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"secondaryLanguage":{"$ref":"#/components/schemas/PatientLanguage"},"email":{"type":"string","format":"email","nullable":true},"secondaryEmail":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"phoneLabel":{"type":"string","nullable":true},"primaryPhoneCapabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCapability"}},"secondaryPhone":{"type":"string","nullable":true},"secondaryPhoneLabel":{"type":"string","nullable":true},"secondaryPhoneCapabilities":{"type":"array","items":{"$ref":"#/components/schemas/PhoneCapability"}},"preferableInstancePhoneId":{"type":"string","format":"uuid","nullable":true},"country":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"patientType":{"$ref":"#/components/schemas/PatientType"},"notes":{"type":"string","nullable":true},"careTeamMembers":{"type":"array","items":{"$ref":"#/components/schemas/CareTeamMember"},"readOnly":true,"description":"Deprecated — use careTeam."},"patientPrograms":{"type":"array","items":{"$ref":"#/components/schemas/PatientProgram"},"readOnly":true},"careTeam":{"type":"array","items":{"$ref":"#/components/schemas/PatientTeamMember"}},"territorialTeam":{"type":"array","items":{"$ref":"#/components/schemas/PatientTeamMember"},"readOnly":true,"description":"Only populated when the `expand=true` query param is set."},"cadence":{"type":"array","items":{"$ref":"#/components/schemas/PatientCadence"}},"patientRegion":{"type":"string","nullable":true},"patientRegionTitle":{"type":"string","readOnly":true,"nullable":true},"patientTerritory":{"type":"string","nullable":true},"pointOfContact":{"$ref":"#/components/schemas/PatientTeamMember","nullable":true}}},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"MaritalStatus":{"type":"string","enum":["A","D","I","L","M","P","S","T","U","W","UKN"],"description":"A = Annulled, D = Divorced, I = Interlocutory, L = Legally Separated, M = Married, P = Polygamous, S = Never Married, T = Domestic partner, U = Unmarried, W = Widowed, UKN = Unknown"},"PatientLanguage":{"type":"string","enum":["ENGLISH","SPANISH","FRENCH","PORTUGUESE","GERMAN","ITALIAN","ARABIC","CHINESE","MANDARIN","VIETNAMESE","JAPANESE","RUSSIAN","ALBANIAN","OTHER"]},"PhoneCapability":{"type":"string","enum":["VOICE_CALL","SMS","WHATS_APP"]},"PatientType":{"type":"string","enum":["ADULT","MINOR","COUPLE"]},"CareTeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User UUID"},"pointOfContact":{"type":"boolean","description":"Whether this member is the point of contact"}},"required":["id"]},"PatientProgram":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"programName":{"type":"string"},"programTitle":{"type":"string"},"programDescription":{"type":"string","nullable":true},"assigned":{"type":"boolean","default":true},"patientId":{"type":"string","format":"uuid"},"currentPhase":{"$ref":"#/components/schemas/PatientPhase"},"status":{"$ref":"#/components/schemas/PatientProgramStatus"},"compatibleWithCurrentVersion":{"type":"boolean"},"pathHistory":{"type":"array","items":{"$ref":"#/components/schemas/PatientPhase"}}}},"PatientPhase":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"currentVersion":{"type":"string"},"deleted":{"type":"boolean"}}},"PatientProgramStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","INTERRUPTED","FINISHED"]},"PatientTeamMember":{"type":"object","description":"Full care team member representation returned on Patient reads.","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/SimpleRole"}},"pointOfContact":{"type":"boolean"},"enabled":{"type":"boolean"}}},"SimpleRole":{"type":"object","properties":{"name":{"type":"string"},"primaryRole":{"type":"boolean"},"description":{"type":"string","nullable":true},"instanceId":{"type":"string","format":"uuid","nullable":true}}},"PatientCadence":{"type":"object","required":["priority"],"properties":{"schedules":{"type":"array","items":{"$ref":"#/components/schemas/CadenceSchedule"}},"priority":{"$ref":"#/components/schemas/PatientCadencePriority"}}},"CadenceSchedule":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayOfWeek"}},"weekNumbers":{"type":"array","items":{"type":"integer"}}}},"DayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"PatientCadencePriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The PatientFilterRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientFilterRequest":{"type":"object","description":"Filter criteria for finding patients.","properties":{"search":{"type":"string","maxLength":50},"email":{"type":"string","format":"email"},"mrn":{"type":"string"},"birthDate":{"type":"string","format":"date-time"},"withoutRegion":{"type":"boolean"},"withoutTerritory":{"type":"boolean"},"timezones":{"type":"array","items":{"type":"string"}},"territories":{"type":"string"},"careTeamIds":{"type":"array","items":{"type":"string","format":"uuid"}},"cadence":{"type":"string"},"careTeamOnly":{"type":"boolean","default":false},"primaryContact":{"type":"boolean","default":false},"ids":{"type":"array","items":{"type":"string","format":"uuid"}},"dateStart":{"type":"string","format":"date-time"},"dateEnd":{"type":"string","format":"date-time"}}}}}}
```

## The ContactRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ContactRequest":{"type":"object","required":["name","pdtRecordId","relation"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"emailLabel":{"type":"string"},"emailPdtFieldName":{"type":"string"},"phone":{"type":"string","description":"E.164 format"},"phoneLabel":{"type":"string"},"phonePdtFieldName":{"type":"string"},"secondaryPhone":{"type":"string","description":"E.164 format"},"secondaryPhoneLabel":{"type":"string"},"secondaryPhonePdtFieldName":{"type":"string"},"pdtRecordId":{"type":"string","format":"uuid","description":"Write-once — cannot be changed after creation."},"relation":{"type":"string"},"active":{"type":"boolean","default":true}}}}}}
```

## The ContactUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ContactUpdateRequest":{"type":"object","description":"Partial update. Note: pdtRecordId cannot be changed after creation.","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"emailLabel":{"type":"string"},"emailPdtFieldName":{"type":"string"},"phone":{"type":"string","description":"E.164 format"},"phoneLabel":{"type":"string"},"phonePdtFieldName":{"type":"string"},"secondaryPhone":{"type":"string","description":"E.164 format"},"secondaryPhoneLabel":{"type":"string"},"secondaryPhonePdtFieldName":{"type":"string"},"relation":{"type":"string"},"active":{"type":"boolean","default":true}}}}}}
```

## The Contact object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"updatedBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"emailLabel":{"type":"string","nullable":true},"emailPdtFieldName":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"phoneLabel":{"type":"string","nullable":true},"phonePdtFieldName":{"type":"string","nullable":true},"secondaryPhone":{"type":"string","nullable":true},"secondaryPhoneLabel":{"type":"string","nullable":true},"secondaryPhonePdtFieldName":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","readOnly":true},"pdtRecordId":{"type":"string","format":"uuid"},"relation":{"type":"string"},"active":{"type":"boolean"}}}}}}
```

## The ContactPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ContactPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"updatedBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email","nullable":true},"emailLabel":{"type":"string","nullable":true},"emailPdtFieldName":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"phoneLabel":{"type":"string","nullable":true},"phonePdtFieldName":{"type":"string","nullable":true},"secondaryPhone":{"type":"string","nullable":true},"secondaryPhoneLabel":{"type":"string","nullable":true},"secondaryPhonePdtFieldName":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","readOnly":true},"pdtRecordId":{"type":"string","format":"uuid"},"relation":{"type":"string"},"active":{"type":"boolean"}}}}}}
```

## The PatientProgramStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientProgramStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","INTERRUPTED","FINISHED"]}}}}
```

## The PatientPhase object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientPhase":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"currentVersion":{"type":"string"},"deleted":{"type":"boolean"}}}}}}
```

## The PatientProgram object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientProgram":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"programName":{"type":"string"},"programTitle":{"type":"string"},"programDescription":{"type":"string","nullable":true},"assigned":{"type":"boolean","default":true},"patientId":{"type":"string","format":"uuid"},"currentPhase":{"$ref":"#/components/schemas/PatientPhase"},"status":{"$ref":"#/components/schemas/PatientProgramStatus"},"compatibleWithCurrentVersion":{"type":"boolean"},"pathHistory":{"type":"array","items":{"$ref":"#/components/schemas/PatientPhase"}}}},"PatientPhase":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"createdBy":{"type":"string","format":"uuid","nullable":true},"createdByName":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"currentVersion":{"type":"string"},"deleted":{"type":"boolean"}}},"PatientProgramStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","INTERRUPTED","FINISHED"]}}}}
```

## The PatientProgramUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientProgramUpdateRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PatientProgramStatus"},"assigned":{"type":"boolean"},"phaseName":{"type":"string"}}},"PatientProgramStatus":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","INTERRUPTED","FINISHED"]}}}}
```

## The PatientProgramPhaseNavigateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientProgramPhaseNavigateRequest":{"type":"object","required":["phaseName"],"properties":{"phaseName":{"type":"string"}}}}}}
```

## The FieldTypeEnum object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]}}}}
```

## The DtType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]}}}}
```

## The DtFieldValueType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]}}}}
```

## The DtFieldDisplayType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]}}}}
```

## The CdtRelation object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]}}}}
```

## The OptionItem object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}}}}}
```

## The FieldMask object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}}}}
```

## The DtFieldMeta object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}}}}}
```

## The DtField object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}}}}
```

## The Cdt object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Cdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"type":{"$ref":"#/components/schemas/DtType"},"relation":{"$ref":"#/components/schemas/CdtRelation"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}}}}
```

## The CdtRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}}}}
```

## The CdtRecordList object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CdtRecordList":{"type":"object","properties":{"name":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}}}}]}}},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}}}}}
```

## The BulkUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"BulkUpdateRequest":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/BulkUpdateRow"}}}},"BulkUpdateRow":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"UUID of the record to update"},"jsonBody":{"type":"object","description":"Fields to update. Keys are CDT field names.","additionalProperties":true},"result":{"type":"object","readOnly":true,"properties":{"status":{"type":"string","enum":["OK","ERROR"]},"content":{"type":"object","additionalProperties":true}}}}}}}}
```

## The PdtSourceType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PdtSourceType":{"type":"string","enum":["INTERNAL","EXTERNAL"]}}}}
```

## The Pdt object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Pdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"contactable":{"type":"boolean"},"type":{"$ref":"#/components/schemas/DtType"},"sourceType":{"$ref":"#/components/schemas/PdtSourceType"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"PdtSourceType":{"type":"string","enum":["INTERNAL","EXTERNAL"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}}}}
```

## The PdtRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true}}}}}}
```

## The PdtRecordPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PdtRecordPage":{"type":"object","properties":{"pdtName":{"type":"string"},"lastUpdatedAt":{"type":"string","format":"date-time","nullable":true},"records":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PdtRecord"}},"metaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}},"PdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"pdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true}}}}}}
```

## The DictionaryField object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DictionaryField":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]}}}}
```

## The Dictionary object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Dictionary":{"type":"object","required":["name","fields"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"internal":{"type":"boolean","readOnly":true},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DictionaryField"}}}},"DictionaryField":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]}}}}
```

## The DictionaryRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DictionaryRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"values":{"type":"object","additionalProperties":true}}}}}}
```

## The DictionaryRecordBatch object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DictionaryRecordBatch":{"type":"object","properties":{"dictionaryName":{"type":"string","readOnly":true},"lastUpdatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"records":{"type":"array","items":{"$ref":"#/components/schemas/DictionaryRecord"}}}},"DictionaryRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"fullValue":{"type":"string","nullable":true},"deleted":{"type":"boolean"},"values":{"type":"object","additionalProperties":true}}}}}}
```

## The EncounterStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]}}}}
```

## The ResponsibleParty object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true}}}}
```

## The EncounterPaymentStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterPaymentStatus":{"type":"string","enum":["NO_PAYMENT_DUE","PAID","PAYMENT_DUE","PAYMENT_OVERDUE","CREDIT_BALANCE"]}}}}
```

## The EncounterVisitService object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}}
```

## The EncounterPaymentInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterPaymentInfo":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/EncounterPaymentStatus"},"amountDue":{"type":"integer","nullable":true,"description":"Cost in cents"},"lastUpdatedAt":{"type":"integer","nullable":true,"description":"Epoch millis"}}},"EncounterPaymentStatus":{"type":"string","enum":["NO_PAYMENT_DUE","PAID","PAYMENT_DUE","PAYMENT_OVERDUE","CREDIT_BALANCE"]}}}}
```

## The EncounterPatientInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterPatientInfo":{"type":"object","properties":{"patientId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"}}}}}}
```

## The EncounterRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterRequest":{"type":"object","required":["title"],"properties":{"calendarEventId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"instruction":{"type":"string","nullable":true},"color":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus","default":"DRAFT"},"templateName":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"patientInfo":{"$ref":"#/components/schemas/EncounterPatientInfo"},"timezone":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"encounterPaymentInfo":{"$ref":"#/components/schemas/EncounterPaymentInfo"},"location":{"type":"string","nullable":true},"currentScheduledAppointment":{"type":"object","additionalProperties":true,"nullable":true,"description":"Calendar event object — see the Calendar API section for its shape."}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"EncounterPatientInfo":{"type":"object","properties":{"patientId":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}},"EncounterPaymentInfo":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/EncounterPaymentStatus"},"amountDue":{"type":"integer","nullable":true,"description":"Cost in cents"},"lastUpdatedAt":{"type":"integer","nullable":true,"description":"Epoch millis"}}},"EncounterPaymentStatus":{"type":"string","enum":["NO_PAYMENT_DUE","PAID","PAYMENT_DUE","PAYMENT_OVERDUE","CREDIT_BALANCE"]}}}}
```

## The EncounterUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterUpdateRequest":{"type":"object","description":"Partial update — all fields optional.","properties":{"calendarEventId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus"},"notes":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"location":{"type":"string","nullable":true},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"currentScheduledAppointment":{"type":"object","additionalProperties":true,"nullable":true}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}}
```

## The EncounterComment object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}}}}}
```

## The FullEncounter object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FullEncounter":{"type":"object","properties":{"encounter":{"$ref":"#/components/schemas/CdtRecord"},"disposition":{"$ref":"#/components/schemas/CdtRecord","nullable":true},"calendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"userRelatedToCalendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"assessmentLinks":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/EncounterComment"}}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}}}}}
```

## The PageMetaInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The EncounterPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The FullEncounterPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"FullEncounterPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FullEncounter"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"FullEncounter":{"type":"object","properties":{"encounter":{"$ref":"#/components/schemas/CdtRecord"},"disposition":{"$ref":"#/components/schemas/CdtRecord","nullable":true},"calendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"userRelatedToCalendarEvent":{"type":"object","additionalProperties":true,"nullable":true},"assessmentLinks":{"type":"array","items":{"$ref":"#/components/schemas/CdtRecord"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/EncounterComment"}}}},"CdtRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"patientId":{"type":"string","format":"uuid"},"cdtId":{"type":"string","format":"uuid"},"version":{"type":"integer"},"cdtName":{"type":"string"},"jsonBody":{"type":"object","additionalProperties":true,"description":"Fields defined by the CDT schema, plus system fields (id, created_at, created_by, etc)."}}},"EncounterComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"encounterId":{"type":"string","format":"uuid"},"text":{"type":"string"}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The EncounterAssessmentRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterAssessmentRequest":{"type":"object","required":["assessmentName"],"properties":{"assessmentName":{"type":"string"},"assessmentTitle":{"type":"string","nullable":true},"assessmentRecordId":{"type":"string","format":"uuid","nullable":true}}}}}}
```

## The EncounterAssessmentUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterAssessmentUpdateRequest":{"type":"object","required":["assessmentRecordId"],"properties":{"assessmentRecordId":{"type":"string","format":"uuid"}}}}}}
```

## The EncounterTemplate object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EncounterTemplate":{"type":"object","required":["name","deliveryMethod"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"encounterDescription":{"type":"string","nullable":true},"encounterInstruction":{"type":"string","nullable":true},"encounterColor":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"deliveryMethod":{"type":"string"},"defaultDuration":{"type":"integer","nullable":true,"description":"Minutes"},"acuityAppointmentTypeId":{"type":"string","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"locationPdtSource":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"predefinedLocation":{"type":"string","nullable":true},"assessmentNames":{"type":"array","items":{"type":"string"}},"visitServices":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true}}}}
```

## The AssessmentDisplayType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentDisplayType":{"type":"string","enum":["SECTIONS","STEPS"]}}}}
```

## The AssessmentSectionField object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentSectionField":{"type":"object","description":"Polymorphic on `viewType`: `question`/`readOnly`/`consent` fields carry `refCdtFieldName` + `meta`; `fieldGroup` fields carry a nested `fields` array instead.","properties":{"viewType":{"type":"string","enum":["question","readOnly","consent","fieldGroup"]},"label":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"refCdtName":{"type":"string","nullable":true},"order":{"type":"integer"},"refCdtFieldName":{"type":"string","nullable":true},"meta":{"type":"object","nullable":true,"properties":{"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"required":{"type":"boolean","nullable":true}}},"fields":{"type":"array","nullable":true,"description":"Present only when viewType is fieldGroup.","items":{"type":"object","additionalProperties":true}}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]}}}}
```

## The AssessmentSection object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentSection":{"type":"object","required":["name","order"],"properties":{"title":{"type":"string","nullable":true},"name":{"type":"string"},"order":{"type":"integer"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentSectionField"}}}},"AssessmentSectionField":{"type":"object","description":"Polymorphic on `viewType`: `question`/`readOnly`/`consent` fields carry `refCdtFieldName` + `meta`; `fieldGroup` fields carry a nested `fields` array instead.","properties":{"viewType":{"type":"string","enum":["question","readOnly","consent","fieldGroup"]},"label":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"refCdtName":{"type":"string","nullable":true},"order":{"type":"integer"},"refCdtFieldName":{"type":"string","nullable":true},"meta":{"type":"object","nullable":true,"properties":{"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"required":{"type":"boolean","nullable":true}}},"fields":{"type":"array","nullable":true,"description":"Present only when viewType is fieldGroup.","items":{"type":"object","additionalProperties":true}}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]}}}}
```

## The AssessmentScoringField object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentScoringField":{"type":"object","properties":{"refCdtName":{"type":"string"},"refCdtFieldName":{"type":"string"},"type":{"type":"string","enum":["select"]},"scores":{"type":"array","items":{"type":"object","properties":{"answer":{},"score":{"type":"number"},"notApplicable":{"type":"boolean"}}}}}}}}}
```

## The AssessmentScoringGroup object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentScoringGroup":{"type":"object","required":["name","title","fields"],"properties":{"name":{"type":"string"},"title":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentScoringField"}},"formula":{"type":"string","enum":["SUM","AVG","SCALED_AVG"],"default":"SUM"},"scalingFactor":{"type":"number","nullable":true}}},"AssessmentScoringField":{"type":"object","properties":{"refCdtName":{"type":"string"},"refCdtFieldName":{"type":"string"},"type":{"type":"string","enum":["select"]},"scores":{"type":"array","items":{"type":"object","properties":{"answer":{},"score":{"type":"number"},"notApplicable":{"type":"boolean"}}}}}}}}}
```

## The AssessmentScoring object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentScoring":{"type":"object","properties":{"formula":{"type":"string","enum":["SUM","AVG","SCALED_AVG"],"default":"SUM"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentScoringGroup"}}}},"AssessmentScoringGroup":{"type":"object","required":["name","title","fields"],"properties":{"name":{"type":"string"},"title":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentScoringField"}},"formula":{"type":"string","enum":["SUM","AVG","SCALED_AVG"],"default":"SUM"},"scalingFactor":{"type":"number","nullable":true}}},"AssessmentScoringField":{"type":"object","properties":{"refCdtName":{"type":"string"},"refCdtFieldName":{"type":"string"},"type":{"type":"string","enum":["select"]},"scores":{"type":"array","items":{"type":"object","properties":{"answer":{},"score":{"type":"number"},"notApplicable":{"type":"boolean"}}}}}}}}}
```

## The AssessmentProgramRelation object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentProgramRelation":{"type":"object","required":["program"],"properties":{"program":{"type":"string"},"phases":{"type":"array","items":{"type":"string"}}}}}}}
```

## The Assessment object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Assessment":{"type":"object","required":["name","sections"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"title":{"type":"string","nullable":true},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$","maxLength":75},"version":{"type":"integer","readOnly":true},"sections":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentSection"}},"scoring":{"$ref":"#/components/schemas/AssessmentScoring"},"programs":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentProgramRelation"}},"_containsPHI":{"type":"boolean","readOnly":true},"displayType":{"$ref":"#/components/schemas/AssessmentDisplayType","default":"SECTIONS"},"autoCompleted":{"type":"boolean"}}},"AssessmentSection":{"type":"object","required":["name","order"],"properties":{"title":{"type":"string","nullable":true},"name":{"type":"string"},"order":{"type":"integer"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentSectionField"}}}},"AssessmentSectionField":{"type":"object","description":"Polymorphic on `viewType`: `question`/`readOnly`/`consent` fields carry `refCdtFieldName` + `meta`; `fieldGroup` fields carry a nested `fields` array instead.","properties":{"viewType":{"type":"string","enum":["question","readOnly","consent","fieldGroup"]},"label":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"refCdtName":{"type":"string","nullable":true},"order":{"type":"integer"},"refCdtFieldName":{"type":"string","nullable":true},"meta":{"type":"object","nullable":true,"properties":{"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"required":{"type":"boolean","nullable":true}}},"fields":{"type":"array","nullable":true,"description":"Present only when viewType is fieldGroup.","items":{"type":"object","additionalProperties":true}}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"AssessmentScoring":{"type":"object","properties":{"formula":{"type":"string","enum":["SUM","AVG","SCALED_AVG"],"default":"SUM"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentScoringGroup"}}}},"AssessmentScoringGroup":{"type":"object","required":["name","title","fields"],"properties":{"name":{"type":"string"},"title":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentScoringField"}},"formula":{"type":"string","enum":["SUM","AVG","SCALED_AVG"],"default":"SUM"},"scalingFactor":{"type":"number","nullable":true}}},"AssessmentScoringField":{"type":"object","properties":{"refCdtName":{"type":"string"},"refCdtFieldName":{"type":"string"},"type":{"type":"string","enum":["select"]},"scores":{"type":"array","items":{"type":"object","properties":{"answer":{},"score":{"type":"number"},"notApplicable":{"type":"boolean"}}}}}},"AssessmentProgramRelation":{"type":"object","required":["program"],"properties":{"program":{"type":"string"},"phases":{"type":"array","items":{"type":"string"}}}},"AssessmentDisplayType":{"type":"string","enum":["SECTIONS","STEPS"]}}}}
```

## The AssessmentStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentStatus":{"type":"string","enum":["NEW","IN_PROGRESS","SUBMITTED","PARTIALLY_COMPLETED","COMPLETED","EXPIRED"]}}}}
```

## The AssessmentRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"finalizedDate":{"type":"string","format":"date-time","nullable":true},"assessmentName":{"type":"string"},"assessmentTitle":{"type":"string","nullable":true},"assessmentCdtName":{"type":"string","nullable":true},"version":{"type":"integer","nullable":true},"completedBy":{"type":"string","format":"uuid","nullable":true},"completedByName":{"type":"string","nullable":true},"completedVersion":{"type":"integer","nullable":true},"patientId":{"type":"string","format":"uuid"},"isPfa":{"type":"boolean","default":false},"templateExists":{"type":"boolean","default":false},"status":{"$ref":"#/components/schemas/AssessmentStatus"},"answers":{"type":"object","additionalProperties":true},"scoring":{"type":"object","additionalProperties":true},"folderId":{"type":"string","format":"uuid","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"questions":{"type":"object","additionalProperties":true},"resolvedCdtValues":{"type":"object","additionalProperties":true},"urlAliasId":{"type":"string","format":"uuid","nullable":true},"encounterId":{"type":"string","format":"uuid","nullable":true},"recompletedBy":{"type":"string","format":"uuid","nullable":true},"recompletedByName":{"type":"string","nullable":true},"recompletedAt":{"type":"string","format":"date-time","nullable":true}}},"AssessmentStatus":{"type":"string","enum":["NEW","IN_PROGRESS","SUBMITTED","PARTIALLY_COMPLETED","COMPLETED","EXPIRED"]}}}}
```

## The AssessmentRecordRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentRecordRequest":{"type":"object","required":["assessmentName"],"properties":{"assessmentName":{"type":"string"},"assessmentTitle":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid"},"isPfa":{"type":"boolean","default":false},"status":{"$ref":"#/components/schemas/AssessmentStatus"},"answers":{"type":"object","additionalProperties":true},"scoring":{"type":"object","additionalProperties":true},"folderId":{"type":"string","format":"uuid","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"encounterId":{"type":"string","format":"uuid","nullable":true}}},"AssessmentStatus":{"type":"string","enum":["NEW","IN_PROGRESS","SUBMITTED","PARTIALLY_COMPLETED","COMPLETED","EXPIRED"]}}}}
```

## The AssessmentRecordPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentRecordPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentRecord"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"AssessmentRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdByName":{"type":"string"},"updatedByName":{"type":"string"},"finalizedDate":{"type":"string","format":"date-time","nullable":true},"assessmentName":{"type":"string"},"assessmentTitle":{"type":"string","nullable":true},"assessmentCdtName":{"type":"string","nullable":true},"version":{"type":"integer","nullable":true},"completedBy":{"type":"string","format":"uuid","nullable":true},"completedByName":{"type":"string","nullable":true},"completedVersion":{"type":"integer","nullable":true},"patientId":{"type":"string","format":"uuid"},"isPfa":{"type":"boolean","default":false},"templateExists":{"type":"boolean","default":false},"status":{"$ref":"#/components/schemas/AssessmentStatus"},"answers":{"type":"object","additionalProperties":true},"scoring":{"type":"object","additionalProperties":true},"folderId":{"type":"string","format":"uuid","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"questions":{"type":"object","additionalProperties":true},"resolvedCdtValues":{"type":"object","additionalProperties":true},"urlAliasId":{"type":"string","format":"uuid","nullable":true},"encounterId":{"type":"string","format":"uuid","nullable":true},"recompletedBy":{"type":"string","format":"uuid","nullable":true},"recompletedByName":{"type":"string","nullable":true},"recompletedAt":{"type":"string","format":"date-time","nullable":true}}},"AssessmentStatus":{"type":"string","enum":["NEW","IN_PROGRESS","SUBMITTED","PARTIALLY_COMPLETED","COMPLETED","EXPIRED"]}}}}
```

## The CalendarEventIdType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventIdType":{"type":"string","enum":["ID","EXTERNAL_ID","EXTERNAL_CALENDAR_EVENT_ID"]}}}}
```

## The CalendarEventStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventStatus":{"type":"string","enum":["SCHEDULED","RESCHEDULED","CANCELLED","BLOCKED","COMPLETED"]}}}}
```

## The CalendarEventType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventType":{"type":"string","enum":["GROUP_THERAPY","APPOINTMENT","LEAVE","ENCOUNTER"]}}}}
```

## The CalendarEventRepeat object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventRepeat":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY","NO_REPEAT"]}}}}
```

## The DeliveryMethod object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DeliveryMethod":{"type":"string","enum":["IN-PERSON","CALL","VIDEO"]}}}}
```

## The ParticipationStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]}}}}
```

## The CalendarParticipantRole object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarParticipantRole":{"type":"string","enum":["patient","psm"]}}}}
```

## The CalendarWorkHoursType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarWorkHoursType":{"type":"string","enum":["WORKING_HOURS","AVAILABILITY"]}}}}
```

## The CalendarWorkHoursRuleType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarWorkHoursRuleType":{"type":"string","enum":["DEFAULT","OVERRIDE"]}}}}
```

## The CalendarProvider object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarProvider":{"type":"string","enum":["GOOGLE","MICROSOFT"]}}}}
```

## The CalendarParticipant object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarParticipant":{"type":"object","required":["participantId","participantRole"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"participantId":{"type":"string","format":"uuid"},"participantRole":{"$ref":"#/components/schemas/CalendarParticipantRole"},"participationStatus":{"$ref":"#/components/schemas/ParticipationStatus"},"attended":{"type":"boolean"},"timezone":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"deleted":{"type":"boolean","nullable":true},"hasAccess":{"type":"boolean","nullable":true},"hiddenPhi":{"type":"boolean"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"birthDate":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean","nullable":true}}},"CalendarParticipantRole":{"type":"string","enum":["patient","psm"]},"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]}}}}
```

## The CalendarEventEncounterInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventEncounterInfo":{"type":"object","required":["encounterId"],"properties":{"encounterId":{"type":"string","format":"uuid"},"dispositionId":{"type":"string","format":"uuid","nullable":true},"templateName":{"type":"string","nullable":true},"templateTitle":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus"},"serviceCost":{"type":"integer","nullable":true},"preVisitCost":{"type":"integer","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"location":{"type":"string","nullable":true}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}}}}}
```

## The ExternalEventParticipant object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ExternalEventParticipant":{"type":"object","properties":{"email":{"type":"string","format":"email"},"status":{"$ref":"#/components/schemas/ParticipationStatus"},"owner":{"type":"boolean"}}},"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]}}}}
```

## The ExternalEventMetadata object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ExternalEventMetadata":{"type":"object","properties":{"participants":{"type":"array","items":{"$ref":"#/components/schemas/ExternalEventParticipant"}},"calendarProvider":{"$ref":"#/components/schemas/CalendarProvider"}}},"ExternalEventParticipant":{"type":"object","properties":{"email":{"type":"string","format":"email"},"status":{"$ref":"#/components/schemas/ParticipationStatus"},"owner":{"type":"boolean"}}},"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]},"CalendarProvider":{"type":"string","enum":["GOOGLE","MICROSOFT"]}}}}
```

## The CalendarEvent object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEvent":{"type":"object","required":["startDateTime","endDateTime","hostId","participants"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"externalId":{"type":"string","nullable":true},"externalIdUpdatedAt":{"type":"string","format":"date-time","nullable":true},"eventTitle":{"type":"string","nullable":true},"eventDescription":{"type":"string","nullable":true},"startDateTime":{"type":"string","format":"date-time"},"localStartDateTime":{"type":"string","format":"date-time","readOnly":true},"endDateTime":{"type":"string","format":"date-time"},"localEndDateTime":{"type":"string","format":"date-time","readOnly":true},"allDayEvent":{"type":"boolean"},"duration":{"type":"integer","readOnly":true,"nullable":true},"eventType":{"type":"string","description":"Free text — commonly one of CalendarEventType's values."},"eventStatus":{"type":"string","description":"Free text — commonly one of CalendarEventStatus's values."},"eventMode":{"type":"string","description":"Free text — commonly one of DeliveryMethod's values."},"eventColor":{"type":"string","nullable":true},"hostId":{"type":"string","format":"uuid"},"timezone":{"type":"string","nullable":true},"additionalInfo":{"type":"object","additionalProperties":true,"nullable":true},"acuityAppointmentId":{"type":"integer","nullable":true},"externalCalendarEventId":{"type":"string","nullable":true},"encounterInfo":{"$ref":"#/components/schemas/CalendarEventEncounterInfo","nullable":true},"participants":{"type":"array","items":{"$ref":"#/components/schemas/CalendarParticipant"}},"externalEventMetadata":{"$ref":"#/components/schemas/ExternalEventMetadata","nullable":true}}},"CalendarEventEncounterInfo":{"type":"object","required":["encounterId"],"properties":{"encounterId":{"type":"string","format":"uuid"},"dispositionId":{"type":"string","format":"uuid","nullable":true},"templateName":{"type":"string","nullable":true},"templateTitle":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus"},"serviceCost":{"type":"integer","nullable":true},"preVisitCost":{"type":"integer","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"location":{"type":"string","nullable":true}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}},"CalendarParticipant":{"type":"object","required":["participantId","participantRole"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"participantId":{"type":"string","format":"uuid"},"participantRole":{"$ref":"#/components/schemas/CalendarParticipantRole"},"participationStatus":{"$ref":"#/components/schemas/ParticipationStatus"},"attended":{"type":"boolean"},"timezone":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"deleted":{"type":"boolean","nullable":true},"hasAccess":{"type":"boolean","nullable":true},"hiddenPhi":{"type":"boolean"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"birthDate":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean","nullable":true}}},"CalendarParticipantRole":{"type":"string","enum":["patient","psm"]},"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"ExternalEventMetadata":{"type":"object","properties":{"participants":{"type":"array","items":{"$ref":"#/components/schemas/ExternalEventParticipant"}},"calendarProvider":{"$ref":"#/components/schemas/CalendarProvider"}}},"ExternalEventParticipant":{"type":"object","properties":{"email":{"type":"string","format":"email"},"status":{"$ref":"#/components/schemas/ParticipationStatus"},"owner":{"type":"boolean"}}},"CalendarProvider":{"type":"string","enum":["GOOGLE","MICROSOFT"]}}}}
```

## The CalendarEventUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventUpdateRequest":{"type":"object","description":"Partial update — all fields optional.","properties":{"externalId":{"type":"string","nullable":true},"eventTitle":{"type":"string"},"eventDescription":{"type":"string","nullable":true},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"allDayEvent":{"type":"boolean"},"eventType":{"type":"string"},"eventStatus":{"type":"string"},"eventMode":{"type":"string"},"eventColor":{"type":"string","nullable":true},"additionalInfo":{"type":"object","additionalProperties":true,"nullable":true},"hostId":{"type":"string","format":"uuid"},"timezone":{"type":"string"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/CalendarParticipant"}},"externalCalendarEventId":{"type":"string","nullable":true},"externalEventMetadata":{"$ref":"#/components/schemas/ExternalEventMetadata"}}},"CalendarParticipant":{"type":"object","required":["participantId","participantRole"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"participantId":{"type":"string","format":"uuid"},"participantRole":{"$ref":"#/components/schemas/CalendarParticipantRole"},"participationStatus":{"$ref":"#/components/schemas/ParticipationStatus"},"attended":{"type":"boolean"},"timezone":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"deleted":{"type":"boolean","nullable":true},"hasAccess":{"type":"boolean","nullable":true},"hiddenPhi":{"type":"boolean"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"birthDate":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean","nullable":true}}},"CalendarParticipantRole":{"type":"string","enum":["patient","psm"]},"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"ExternalEventMetadata":{"type":"object","properties":{"participants":{"type":"array","items":{"$ref":"#/components/schemas/ExternalEventParticipant"}},"calendarProvider":{"$ref":"#/components/schemas/CalendarProvider"}}},"ExternalEventParticipant":{"type":"object","properties":{"email":{"type":"string","format":"email"},"status":{"$ref":"#/components/schemas/ParticipationStatus"},"owner":{"type":"boolean"}}},"CalendarProvider":{"type":"string","enum":["GOOGLE","MICROSOFT"]}}}}
```

## The CalendarInvitationResponseRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarInvitationResponseRequest":{"type":"object","required":["participantId","participationStatus"],"properties":{"participantId":{"type":"string","format":"uuid"},"participationStatus":{"type":"string","description":"e.g. Yes, No, Maybe"}}}}}}
```

## The CalendarEventPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarEventPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEvent"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"CalendarEvent":{"type":"object","required":["startDateTime","endDateTime","hostId","participants"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"externalId":{"type":"string","nullable":true},"externalIdUpdatedAt":{"type":"string","format":"date-time","nullable":true},"eventTitle":{"type":"string","nullable":true},"eventDescription":{"type":"string","nullable":true},"startDateTime":{"type":"string","format":"date-time"},"localStartDateTime":{"type":"string","format":"date-time","readOnly":true},"endDateTime":{"type":"string","format":"date-time"},"localEndDateTime":{"type":"string","format":"date-time","readOnly":true},"allDayEvent":{"type":"boolean"},"duration":{"type":"integer","readOnly":true,"nullable":true},"eventType":{"type":"string","description":"Free text — commonly one of CalendarEventType's values."},"eventStatus":{"type":"string","description":"Free text — commonly one of CalendarEventStatus's values."},"eventMode":{"type":"string","description":"Free text — commonly one of DeliveryMethod's values."},"eventColor":{"type":"string","nullable":true},"hostId":{"type":"string","format":"uuid"},"timezone":{"type":"string","nullable":true},"additionalInfo":{"type":"object","additionalProperties":true,"nullable":true},"acuityAppointmentId":{"type":"integer","nullable":true},"externalCalendarEventId":{"type":"string","nullable":true},"encounterInfo":{"$ref":"#/components/schemas/CalendarEventEncounterInfo","nullable":true},"participants":{"type":"array","items":{"$ref":"#/components/schemas/CalendarParticipant"}},"externalEventMetadata":{"$ref":"#/components/schemas/ExternalEventMetadata","nullable":true}}},"CalendarEventEncounterInfo":{"type":"object","required":["encounterId"],"properties":{"encounterId":{"type":"string","format":"uuid"},"dispositionId":{"type":"string","format":"uuid","nullable":true},"templateName":{"type":"string","nullable":true},"templateTitle":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","nullable":true},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EncounterStatus"},"serviceCost":{"type":"integer","nullable":true},"preVisitCost":{"type":"integer","nullable":true},"responsibleParty":{"$ref":"#/components/schemas/ResponsibleParty"},"visitServices":{"type":"array","items":{"$ref":"#/components/schemas/EncounterVisitService"}},"location":{"type":"string","nullable":true}}},"EncounterStatus":{"type":"string","enum":["DRAFT","OPEN","CANCELED","CANCELLED","FINALIZED"]},"ResponsibleParty":{"type":"string","enum":["SELF_PAY","INSURANCE","UNKNOWN"],"deprecated":true},"EncounterVisitService":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"quantity":{"type":"number","default":1},"serviceCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"cancellationFee":{"type":"integer","nullable":true,"description":"Cost in cents"},"preVisitCost":{"type":"integer","nullable":true,"description":"Cost in cents"},"modifiers":{"type":"array","items":{"type":"string"}}}},"CalendarParticipant":{"type":"object","required":["participantId","participantRole"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"participantId":{"type":"string","format":"uuid"},"participantRole":{"$ref":"#/components/schemas/CalendarParticipantRole"},"participationStatus":{"$ref":"#/components/schemas/ParticipationStatus"},"attended":{"type":"boolean"},"timezone":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"deleted":{"type":"boolean","nullable":true},"hasAccess":{"type":"boolean","nullable":true},"hiddenPhi":{"type":"boolean"},"email":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","nullable":true},"gender":{"$ref":"#/components/schemas/PatientGender"},"birthDate":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean","nullable":true}}},"CalendarParticipantRole":{"type":"string","enum":["patient","psm"]},"ParticipationStatus":{"type":"string","enum":["UNKNOWN","DECLINED","TENTATIVE","ACCEPTED"]},"PatientGender":{"type":"string","enum":["MALE","FEMALE","OTHER","UNKNOWN"]},"ExternalEventMetadata":{"type":"object","properties":{"participants":{"type":"array","items":{"$ref":"#/components/schemas/ExternalEventParticipant"}},"calendarProvider":{"$ref":"#/components/schemas/CalendarProvider"}}},"ExternalEventParticipant":{"type":"object","properties":{"email":{"type":"string","format":"email"},"status":{"$ref":"#/components/schemas/ParticipationStatus"},"owner":{"type":"boolean"}}},"CalendarProvider":{"type":"string","enum":["GOOGLE","MICROSOFT"]}}}}
```

## The CalendarDaysInfo object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarDaysInfo":{"type":"object","properties":{"daysInfoId":{"type":"string","format":"uuid","readOnly":true},"day":{"type":"integer","minimum":1,"maximum":7,"description":"ISO day of week (1=Monday .. 7=Sunday)"},"startTime":{"type":"string","format":"time"},"endTime":{"type":"string","format":"time"}}}}}}
```

## The WorkHoursDetails object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"WorkHoursDetails":{"type":"object","properties":{"workHoursId":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/CalendarWorkHoursType"},"ruleType":{"$ref":"#/components/schemas/CalendarWorkHoursRuleType"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time","nullable":true},"localStartDateTime":{"type":"string","format":"date-time","readOnly":true},"localEndDateTime":{"type":"string","format":"date-time","readOnly":true},"daysInfo":{"type":"array","items":{"$ref":"#/components/schemas/CalendarDaysInfo"}},"encounters":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Only present when type is AVAILABILITY."}}},"CalendarWorkHoursType":{"type":"string","enum":["WORKING_HOURS","AVAILABILITY"]},"CalendarWorkHoursRuleType":{"type":"string","enum":["DEFAULT","OVERRIDE"]},"CalendarDaysInfo":{"type":"object","properties":{"daysInfoId":{"type":"string","format":"uuid","readOnly":true},"day":{"type":"integer","minimum":1,"maximum":7,"description":"ISO day of week (1=Monday .. 7=Sunday)"},"startTime":{"type":"string","format":"time"},"endTime":{"type":"string","format":"time"}}}}}}
```

## The CalendarWorkHours object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarWorkHours":{"type":"object","properties":{"psmId":{"type":"string","format":"uuid"},"details":{"type":"array","items":{"$ref":"#/components/schemas/WorkHoursDetails"}}}},"WorkHoursDetails":{"type":"object","properties":{"workHoursId":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/CalendarWorkHoursType"},"ruleType":{"$ref":"#/components/schemas/CalendarWorkHoursRuleType"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time","nullable":true},"localStartDateTime":{"type":"string","format":"date-time","readOnly":true},"localEndDateTime":{"type":"string","format":"date-time","readOnly":true},"daysInfo":{"type":"array","items":{"$ref":"#/components/schemas/CalendarDaysInfo"}},"encounters":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Only present when type is AVAILABILITY."}}},"CalendarWorkHoursType":{"type":"string","enum":["WORKING_HOURS","AVAILABILITY"]},"CalendarWorkHoursRuleType":{"type":"string","enum":["DEFAULT","OVERRIDE"]},"CalendarDaysInfo":{"type":"object","properties":{"daysInfoId":{"type":"string","format":"uuid","readOnly":true},"day":{"type":"integer","minimum":1,"maximum":7,"description":"ISO day of week (1=Monday .. 7=Sunday)"},"startTime":{"type":"string","format":"time"},"endTime":{"type":"string","format":"time"}}}}}}
```

## The CalendarWorkHoursRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarWorkHoursRequest":{"type":"object","required":["psmId","startDateTime","ruleType","daysInfo"],"properties":{"psmId":{"type":"string","format":"uuid"},"workHoursId":{"type":"string","format":"uuid","nullable":true},"name":{"type":"string","nullable":true},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time","nullable":true},"type":{"$ref":"#/components/schemas/CalendarWorkHoursType","default":"WORKING_HOURS"},"ruleType":{"$ref":"#/components/schemas/CalendarWorkHoursRuleType"},"daysInfo":{"type":"array","items":{"$ref":"#/components/schemas/CalendarDaysInfo"}},"encounters":{"type":"array","items":{"type":"string"},"description":"Required when type is AVAILABILITY."}}},"CalendarWorkHoursType":{"type":"string","enum":["WORKING_HOURS","AVAILABILITY"]},"CalendarWorkHoursRuleType":{"type":"string","enum":["DEFAULT","OVERRIDE"]},"CalendarDaysInfo":{"type":"object","properties":{"daysInfoId":{"type":"string","format":"uuid","readOnly":true},"day":{"type":"integer","minimum":1,"maximum":7,"description":"ISO day of week (1=Monday .. 7=Sunday)"},"startTime":{"type":"string","format":"time"},"endTime":{"type":"string","format":"time"}}}}}}
```

## The CalendarScheduleEvent object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarScheduleEvent":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid","description":"Duplicate of eventId."},"eventTitle":{"type":"string","nullable":true},"eventType":{"type":"string","nullable":true},"eventColor":{"type":"string","nullable":true},"allDayEvent":{"type":"boolean"},"startDateTime":{"type":"string","format":"date-time"},"localStartDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"localEndDateTime":{"type":"string","format":"date-time"}}}}}}
```

## The CalendarPSMSchedule object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarPSMSchedule":{"type":"object","properties":{"psmId":{"type":"string","format":"uuid"},"workHours":{"type":"array","items":{"$ref":"#/components/schemas/WorkHoursDetails"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/CalendarScheduleEvent"}}}},"WorkHoursDetails":{"type":"object","properties":{"workHoursId":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/CalendarWorkHoursType"},"ruleType":{"$ref":"#/components/schemas/CalendarWorkHoursRuleType"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time","nullable":true},"localStartDateTime":{"type":"string","format":"date-time","readOnly":true},"localEndDateTime":{"type":"string","format":"date-time","readOnly":true},"daysInfo":{"type":"array","items":{"$ref":"#/components/schemas/CalendarDaysInfo"}},"encounters":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Only present when type is AVAILABILITY."}}},"CalendarWorkHoursType":{"type":"string","enum":["WORKING_HOURS","AVAILABILITY"]},"CalendarWorkHoursRuleType":{"type":"string","enum":["DEFAULT","OVERRIDE"]},"CalendarDaysInfo":{"type":"object","properties":{"daysInfoId":{"type":"string","format":"uuid","readOnly":true},"day":{"type":"integer","minimum":1,"maximum":7,"description":"ISO day of week (1=Monday .. 7=Sunday)"},"startTime":{"type":"string","format":"time"},"endTime":{"type":"string","format":"time"}}},"CalendarScheduleEvent":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid","description":"Duplicate of eventId."},"eventTitle":{"type":"string","nullable":true},"eventType":{"type":"string","nullable":true},"eventColor":{"type":"string","nullable":true},"allDayEvent":{"type":"boolean"},"startDateTime":{"type":"string","format":"date-time"},"localStartDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"localEndDateTime":{"type":"string","format":"date-time"}}}}}}
```

## The CalendarSummaryItem object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarSummaryItem":{"type":"object","properties":{"psmId":{"type":"string","format":"uuid"},"totalCreatedEvents":{"type":"integer"},"totalOccurredEvents":{"type":"integer"},"totalFutureEvents":{"type":"integer"},"eventStatusCount":{"type":"object","additionalProperties":{"type":"integer"}},"totalWorkingHours":{"type":"string"},"totalEventHours":{"type":"string"},"occupancy":{"type":"string"}}}}}}
```

## The CalendarPSMEventSummary object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CalendarPSMEventSummary":{"type":"object","properties":{"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"summary":{"type":"array","items":{"$ref":"#/components/schemas/CalendarSummaryItem"}}}},"CalendarSummaryItem":{"type":"object","properties":{"psmId":{"type":"string","format":"uuid"},"totalCreatedEvents":{"type":"integer"},"totalOccurredEvents":{"type":"integer"},"totalFutureEvents":{"type":"integer"},"eventStatusCount":{"type":"object","additionalProperties":{"type":"integer"}},"totalWorkingHours":{"type":"string"},"totalEventHours":{"type":"string"},"occupancy":{"type":"string"}}}}}}
```

## The GoalPriority object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}}}}
```

## The GoalStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]}}}}
```

## The TaskStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]}}}}
```

## The TaskPriority object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]}}}}
```

## The TaskSourceType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]}}}}
```

## The TaskCreatedType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]}}}}
```

## The PatientOverview object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PatientOverview":{"type":"object","properties":{"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"overview":{"type":"string","nullable":true}}}}}}
```

## The CarePlan object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CarePlan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"patientId":{"type":"string","format":"uuid"},"patientOverview":{"$ref":"#/components/schemas/PatientOverview","nullable":true}}},"PatientOverview":{"type":"object","properties":{"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"overview":{"type":"string","nullable":true}}}}}}
```

## The CreateGoalRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CreateGoalRequest":{"type":"object","required":["goalTemplateName"],"properties":{"goalTemplateName":{"type":"string"}}}}}}
```

## The GoalDetails object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]}}}}
```

## The GoalComment object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"GoalComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"createdByName":{"type":"string","readOnly":true,"nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"updatedByName":{"type":"string","readOnly":true,"nullable":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"text":{"type":"string"}}}}}}
```

## The IndexedNamed object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The TaskUser object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The TaskComment object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The Task object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]}}}}
```

## The Goal object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Goal":{"type":"object","properties":{"details":{"$ref":"#/components/schemas/GoalDetails"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/GoalComment"}}}},"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]},"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]},"GoalComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"createdByName":{"type":"string","readOnly":true,"nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"updatedByName":{"type":"string","readOnly":true,"nullable":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"text":{"type":"string"}}}}}}
```

## The GoalsPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"GoalsPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GoalDetails"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The WatchersType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]}}}}
```

## The TaskUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskUpdateRequest":{"type":"object","required":["name","status","priority","assignee"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"assignee":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The TaskPartialUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskPartialUpdateRequest":{"type":"object","description":"Partial update — all fields optional.","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","nullable":true},"assignee":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The TaskBulkUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskBulkUpdateRequest":{"type":"object","required":["taskIds","status"],"properties":{"taskIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"status":{"$ref":"#/components/schemas/TaskStatus"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]}}}}
```

## The TaskPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TaskPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The File object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The SignedFile object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The DocumentTypeName object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DocumentTypeName":{"type":"string","description":"Default document types are always present; tenants may add custom ones.","enum":["doc-type-docusign","doc-type-assessment","doc-type-others","doc-type-care-team-member-signature","doc-type-care-team-member-and-supervisor-signature","doc-type-assessment-consent","doc-type-invoice","doc-type-superbill"]}}}}
```

## The Direction object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Direction":{"type":"string","enum":["OUT","IN"]}}}}
```

## The MessageType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]}}}}
```

## The ActorType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]}}}}
```

## The ClientType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ClientType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS"]}}}}
```

## The VoiceCallStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"VoiceCallStatus":{"type":"string","enum":["QUEUED","INITIATED","RINGING","IN_PROGRESS","COMPLETED","BUSY","NO_ANSWER","CANCELED","FAILED"]}}}}
```

## The SmsStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SmsStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","RECEIVED","DELIVERED","UNDELIVERED","FAILED","UNRECOGNISED","DELETED"]}}}}
```

## The EmailStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","DELIVERED","REJECTED","FAILED","UNRECOGNISED","DELETED","CLICKED","OPENED"]}}}}
```

## The EmailBodyType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]}}}}
```

## The DraftsPriority object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DraftsPriority":{"type":"string","enum":["NO_PRIORITY","LOW","MEDIUM","HIGH"]}}}}
```

## The DraftsStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DraftsStatus":{"type":"string","enum":["WAITING","FAILED"]}}}}
```

## The EmailDraftSource object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailDraftSource":{"type":"string","enum":["USER","AUTOMATION"]}}}}
```

## The TemplateResolverServiceType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"TemplateResolverServiceType":{"type":"string","enum":["EMAIL","CHAT","SMS","WHATSAPP"]}}}}
```

## The MessageTemplateType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"MessageTemplateType":{"type":"string","enum":["PLAIN_TEXT","RICH_TEXT","HTML"]}}}}
```

## The ContentType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ContentType":{"type":"string","enum":["TEXT","LIST","TABLE","IMAGE"]}}}}
```

## The VoiceCall object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"VoiceCall":{"type":"object","required":["sender"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"childCallSid":{"type":"string","nullable":true},"parentCallStatus":{"$ref":"#/components/schemas/VoiceCallStatus"},"childCallStatus":{"$ref":"#/components/schemas/VoiceCallStatus"},"userPhone":{"type":"string","nullable":true},"parentCallDuration":{"type":"integer","nullable":true},"childCallDuration":{"type":"integer","nullable":true},"recorded":{"type":"boolean"},"recordingDuration":{"type":"integer","nullable":true},"recordingSid":{"type":"string","nullable":true},"recordingUrl":{"type":"string","nullable":true},"recordingFile":{"$ref":"#/components/schemas/File","nullable":true},"phoneId":{"type":"string","format":"uuid","nullable":true}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"VoiceCallStatus":{"type":"string","enum":["QUEUED","INITIATED","RINGING","IN_PROGRESS","COMPLETED","BUSY","NO_ANSWER","CANCELED","FAILED"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The VoiceCallPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"VoiceCallPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/VoiceCall"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"VoiceCall":{"type":"object","required":["sender"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"childCallSid":{"type":"string","nullable":true},"parentCallStatus":{"$ref":"#/components/schemas/VoiceCallStatus"},"childCallStatus":{"$ref":"#/components/schemas/VoiceCallStatus"},"userPhone":{"type":"string","nullable":true},"parentCallDuration":{"type":"integer","nullable":true},"childCallDuration":{"type":"integer","nullable":true},"recorded":{"type":"boolean"},"recordingDuration":{"type":"integer","nullable":true},"recordingSid":{"type":"string","nullable":true},"recordingUrl":{"type":"string","nullable":true},"recordingFile":{"$ref":"#/components/schemas/File","nullable":true},"phoneId":{"type":"string","format":"uuid","nullable":true}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"VoiceCallStatus":{"type":"string","enum":["QUEUED","INITIATED","RINGING","IN_PROGRESS","COMPLETED","BUSY","NO_ANSWER","CANCELED","FAILED"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The Sms object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Sms":{"type":"object","required":["sender","message"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"message":{"type":"string","maxLength":1600},"parts":{"type":"integer","readOnly":true},"status":{"$ref":"#/components/schemas/SmsStatus"},"messageType":{"$ref":"#/components/schemas/MessageType","default":"CARE_TEAM"},"phoneId":{"type":"string","format":"uuid"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"},"readOnly":true},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"skipEvent":{"type":"boolean"}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"SmsStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","RECEIVED","DELIVERED","UNDELIVERED","FAILED","UNRECOGNISED","DELETED"]},"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The SmsPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SmsPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/Sms"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"Sms":{"type":"object","required":["sender","message"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"message":{"type":"string","maxLength":1600},"parts":{"type":"integer","readOnly":true},"status":{"$ref":"#/components/schemas/SmsStatus"},"messageType":{"$ref":"#/components/schemas/MessageType","default":"CARE_TEAM"},"phoneId":{"type":"string","format":"uuid"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"},"readOnly":true},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"skipEvent":{"type":"boolean"}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"SmsStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","RECEIVED","DELIVERED","UNDELIVERED","FAILED","UNRECOGNISED","DELETED"]},"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The Email object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Email":{"type":"object","required":["sender","body"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"emailEditorJson":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EmailStatus"},"secure":{"type":"boolean","default":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"},"readOnly":true},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"bodyAttachments":{"type":"array","items":{"$ref":"#/components/schemas/SignedFile"}},"messageType":{"$ref":"#/components/schemas/MessageType","default":"CARE_TEAM"},"bodyType":{"$ref":"#/components/schemas/EmailBodyType","default":"PLAIN_TEXT"},"inReplyTo":{"type":"string","nullable":true},"messageId":{"type":"string","nullable":true},"skipEvent":{"type":"boolean"}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"EmailStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","DELIVERED","REJECTED","FAILED","UNRECOGNISED","DELETED","CLICKED","OPENED"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}},"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]},"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]}}}}
```

## The EmailPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/Email"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"Email":{"type":"object","required":["sender","body"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"emailEditorJson":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EmailStatus"},"secure":{"type":"boolean","default":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"},"readOnly":true},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"bodyAttachments":{"type":"array","items":{"$ref":"#/components/schemas/SignedFile"}},"messageType":{"$ref":"#/components/schemas/MessageType","default":"CARE_TEAM"},"bodyType":{"$ref":"#/components/schemas/EmailBodyType","default":"PLAIN_TEXT"},"inReplyTo":{"type":"string","nullable":true},"messageId":{"type":"string","nullable":true},"skipEvent":{"type":"boolean"}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"EmailStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","DELIVERED","REJECTED","FAILED","UNRECOGNISED","DELETED","CLICKED","OPENED"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}},"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]},"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]}}}}
```

## The EmailDraft object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailDraft":{"type":"object","required":["subject","body"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"date":{"type":"string","format":"date-time","nullable":true},"subject":{"type":"string"},"body":{"type":"string"},"emailEditorJson":{"type":"string","nullable":true},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"sender":{"type":"string","format":"uuid","readOnly":true},"receiver":{"type":"string","format":"uuid","nullable":true},"patientEmail":{"type":"string","format":"email","nullable":true},"secure":{"type":"boolean","default":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"bodyAttachments":{"type":"array","items":{"$ref":"#/components/schemas/SignedFile"}},"priority":{"$ref":"#/components/schemas/DraftsPriority","default":"NO_PRIORITY"},"source":{"$ref":"#/components/schemas/EmailDraftSource","default":"USER"},"templateName":{"type":"string","nullable":true},"bodyType":{"$ref":"#/components/schemas/EmailBodyType","default":"PLAIN_TEXT"},"senderName":{"type":"string","readOnly":true},"receiverName":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DraftsStatus","readOnly":true,"default":"WAITING"},"starred":{"type":"boolean"}}},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}},"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"DraftsPriority":{"type":"string","enum":["NO_PRIORITY","LOW","MEDIUM","HIGH"]},"EmailDraftSource":{"type":"string","enum":["USER","AUTOMATION"]},"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]},"DraftsStatus":{"type":"string","enum":["WAITING","FAILED"]}}}}
```

## The EmailDraftPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailDraftPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/EmailDraft"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"EmailDraft":{"type":"object","required":["subject","body"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"date":{"type":"string","format":"date-time","nullable":true},"subject":{"type":"string"},"body":{"type":"string"},"emailEditorJson":{"type":"string","nullable":true},"scheduledAt":{"type":"string","format":"date-time","nullable":true},"sender":{"type":"string","format":"uuid","readOnly":true},"receiver":{"type":"string","format":"uuid","nullable":true},"patientEmail":{"type":"string","format":"email","nullable":true},"secure":{"type":"boolean","default":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"bodyAttachments":{"type":"array","items":{"$ref":"#/components/schemas/SignedFile"}},"priority":{"$ref":"#/components/schemas/DraftsPriority","default":"NO_PRIORITY"},"source":{"$ref":"#/components/schemas/EmailDraftSource","default":"USER"},"templateName":{"type":"string","nullable":true},"bodyType":{"$ref":"#/components/schemas/EmailBodyType","default":"PLAIN_TEXT"},"senderName":{"type":"string","readOnly":true},"receiverName":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DraftsStatus","readOnly":true,"default":"WAITING"},"starred":{"type":"boolean"}}},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}},"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"DraftsPriority":{"type":"string","enum":["NO_PRIORITY","LOW","MEDIUM","HIGH"]},"EmailDraftSource":{"type":"string","enum":["USER","AUTOMATION"]},"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]},"DraftsStatus":{"type":"string","enum":["WAITING","FAILED"]}}}}
```

## The ChatUser object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatUser":{"type":"object","properties":{"clientType":{"$ref":"#/components/schemas/ClientType"},"id":{"type":"string","format":"uuid"},"titleName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true}}},"ClientType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS"]}}}}
```

## The ChatMessage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"sender":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"receiver":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"message":{"type":"string","description":"Required if attachmentAsFiles is empty."},"externalId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"skipEvent":{"type":"boolean"},"deletedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"ChatUser":{"type":"object","properties":{"clientType":{"$ref":"#/components/schemas/ClientType"},"id":{"type":"string","format":"uuid"},"titleName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true}}},"ClientType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The ChatInboundRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatInboundRequest":{"type":"object","description":"Either `message` or an attached file is required.","properties":{"message":{"type":"string"},"attachmentAsFiles":{"type":"array","items":{"type":"string","format":"binary"},"description":"Supported extensions: jpg, mp3, pdf, png, jpeg, wav, ogg."}}}}}}
```

## The ChatPageTokens object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatPageTokens":{"type":"object","properties":{"nextPageToken":{"type":"string","nullable":true},"prevPageToken":{"type":"string","nullable":true}}}}}}
```

## The ChatMessagePageMeta object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatMessagePageMeta":{"allOf":[{"$ref":"#/components/schemas/ChatPageTokens"},{"type":"object","properties":{"isFound":{"type":"boolean"},"pageSize":{"type":"integer"}}}]},"ChatPageTokens":{"type":"object","properties":{"nextPageToken":{"type":"string","nullable":true},"prevPageToken":{"type":"string","nullable":true}}}}}}
```

## The ChatMessagePage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatMessagePage":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ChatMessagePageMeta"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}}},"ChatMessagePageMeta":{"allOf":[{"$ref":"#/components/schemas/ChatPageTokens"},{"type":"object","properties":{"isFound":{"type":"boolean"},"pageSize":{"type":"integer"}}}]},"ChatPageTokens":{"type":"object","properties":{"nextPageToken":{"type":"string","nullable":true},"prevPageToken":{"type":"string","nullable":true}}},"ChatMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"sender":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"receiver":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"message":{"type":"string","description":"Required if attachmentAsFiles is empty."},"externalId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"skipEvent":{"type":"boolean"},"deletedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"ChatUser":{"type":"object","properties":{"clientType":{"$ref":"#/components/schemas/ClientType"},"id":{"type":"string","format":"uuid"},"titleName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true}}},"ClientType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The ChatSearchMessage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatSearchMessage":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ChatPageTokens"},"message":{"$ref":"#/components/schemas/ChatMessage"}}},"ChatPageTokens":{"type":"object","properties":{"nextPageToken":{"type":"string","nullable":true},"prevPageToken":{"type":"string","nullable":true}}},"ChatMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"sender":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"receiver":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"message":{"type":"string","description":"Required if attachmentAsFiles is empty."},"externalId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"skipEvent":{"type":"boolean"},"deletedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"ChatUser":{"type":"object","properties":{"clientType":{"$ref":"#/components/schemas/ClientType"},"id":{"type":"string","format":"uuid"},"titleName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true}}},"ClientType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The ChatSearchPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ChatSearchPage":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ChatMessagePageMeta"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ChatSearchMessage"}}}},"ChatMessagePageMeta":{"allOf":[{"$ref":"#/components/schemas/ChatPageTokens"},{"type":"object","properties":{"isFound":{"type":"boolean"},"pageSize":{"type":"integer"}}}]},"ChatPageTokens":{"type":"object","properties":{"nextPageToken":{"type":"string","nullable":true},"prevPageToken":{"type":"string","nullable":true}}},"ChatSearchMessage":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/ChatPageTokens"},"message":{"$ref":"#/components/schemas/ChatMessage"}}},"ChatMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"sender":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"receiver":{"$ref":"#/components/schemas/ChatUser","nullable":true,"readOnly":true},"message":{"type":"string","description":"Required if attachmentAsFiles is empty."},"externalId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"skipEvent":{"type":"boolean"},"deletedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true}}},"ChatUser":{"type":"object","properties":{"clientType":{"$ref":"#/components/schemas/ClientType"},"id":{"type":"string","format":"uuid"},"titleName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true}}},"ClientType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The MessageTemplateContent object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"MessageTemplateContent":{"type":"object","description":"Polymorphic on `contentType`. TEXT carries `textData`; LIST/TABLE carry `columns` + `structureData` (+ separatorType/borderType respectively); IMAGE carries `image`, `fileType`, `fileName`, `width`, `height`.","properties":{"contentType":{"$ref":"#/components/schemas/ContentType"},"variableName":{"type":"string"},"textData":{"type":"string","nullable":true},"columns":{"type":"array","items":{"type":"object","additionalProperties":true},"nullable":true},"structureData":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"nullable":true},"separatorType":{"type":"string","enum":["DASH","TAB"],"nullable":true},"borderType":{"type":"string","enum":["SOLID","TRANSPARENT"],"nullable":true},"image":{"type":"string","nullable":true},"fileType":{"type":"integer","nullable":true},"fileName":{"type":"string","nullable":true},"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true}}},"ContentType":{"type":"string","enum":["TEXT","LIST","TABLE","IMAGE"]}}}}
```

## The MessageTemplateResolveResult object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"MessageTemplateResolveResult":{"type":"object","properties":{"resolvedText":{"type":"string","nullable":true},"resolvedEmailEditorJson":{"type":"string","nullable":true},"textType":{"$ref":"#/components/schemas/MessageTemplateType"},"subject":{"type":"string","nullable":true},"dataContentVariables":{"type":"array","items":{"$ref":"#/components/schemas/MessageTemplateContent"}}}},"MessageTemplateType":{"type":"string","enum":["PLAIN_TEXT","RICH_TEXT","HTML"]},"MessageTemplateContent":{"type":"object","description":"Polymorphic on `contentType`. TEXT carries `textData`; LIST/TABLE carry `columns` + `structureData` (+ separatorType/borderType respectively); IMAGE carries `image`, `fileType`, `fileName`, `width`, `height`.","properties":{"contentType":{"$ref":"#/components/schemas/ContentType"},"variableName":{"type":"string"},"textData":{"type":"string","nullable":true},"columns":{"type":"array","items":{"type":"object","additionalProperties":true},"nullable":true},"structureData":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}},"nullable":true},"separatorType":{"type":"string","enum":["DASH","TAB"],"nullable":true},"borderType":{"type":"string","enum":["SOLID","TRANSPARENT"],"nullable":true},"image":{"type":"string","nullable":true},"fileType":{"type":"integer","nullable":true},"fileName":{"type":"string","nullable":true},"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true}}},"ContentType":{"type":"string","enum":["TEXT","LIST","TABLE","IMAGE"]}}}}
```

## The CreateFaxRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CreateFaxRequest":{"type":"object","required":["sender","receiver"],"properties":{"sender":{"$ref":"#/components/schemas/FaxParty"},"receiver":{"$ref":"#/components/schemas/FaxParty"},"subject":{"type":"string","nullable":true},"highQuality":{"type":"boolean","default":false},"patientId":{"type":"string","format":"uuid","nullable":true}}},"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}}}}}
```

## The UpdateFaxRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UpdateFaxRequest":{"type":"object","description":"Partial update — all fields optional.","properties":{"receiver":{"$ref":"#/components/schemas/FaxParty"},"subject":{"type":"string","nullable":true},"highQuality":{"type":"boolean"},"patientId":{"type":"string","format":"uuid","description":"For outgoing faxes only."},"reviewed":{"type":"boolean","description":"For incoming faxes only — marks the fax as reviewed."}}},"FaxParty":{"type":"object","description":"Sender or receiver of a fax.","required":["type","faxNumber"],"properties":{"type":{"type":"string","enum":["FAX_NUMBER","SYSTEM_FAX_NUMBER"],"description":"`FAX_NUMBER` for external parties, `SYSTEM_FAX_NUMBER` for Welkin system numbers"},"faxNumber":{"type":"string","description":"E.164 format"}}}}}}
```

## The AssignFaxRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssignFaxRequest":{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","format":"uuid"},"documentType":{"type":"string","description":"Required for incoming faxes — the document type to file the fax under."}}}}}}
```

## The UserLocale object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserLocale":{"type":"string","enum":["en-US","en-SG","en-AU","en-AE","en-EU"]}}}}
```

## The UserState object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserState":{"type":"string","enum":["PROVISIONED","ACTIVE","INACTIVE"]}}}}
```

## The LicenseSeatType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"LicenseSeatType":{"type":"string","enum":["GENERAL"]}}}}
```

## The PermissionType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PermissionType":{"type":"string","enum":["SECURITY_POLICY","SECURITY_ROLE"]}}}}
```

## The ClientTerritory object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"ClientTerritory":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"},"territories":{"type":"array","items":{"type":"string"}},"instanceName":{"type":"string","nullable":true}}}}}}
```

## The Permission object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Permission":{"type":"object","required":["permissionName","instanceName","type"],"properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"permissionName":{"type":"string"},"instanceName":{"type":"string"},"type":{"$ref":"#/components/schemas/PermissionType"},"effectiveDate":{"type":"string","format":"date-time","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"primaryRole":{"type":"boolean","nullable":true,"description":"Only meaningful when type is SECURITY_ROLE."}}},"PermissionType":{"type":"string","enum":["SECURITY_POLICY","SECURITY_ROLE"]}}}}
```

## The InstanceAccess object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"InstanceAccess":{"type":"object","required":["instanceId"],"properties":{"instanceId":{"type":"string","format":"uuid"},"instanceName":{"type":"string","nullable":true},"instanceDescription":{"type":"string","nullable":true},"userEmailWithInstanceDomain":{"type":"string","nullable":true},"workshopAccessEnabled":{"type":"boolean"},"auditDataAccessEnabled":{"type":"boolean"},"enabledTakenPersonally":{"type":"boolean"}}}}}}
```

## The UserAppAccess object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserAppAccess":{"type":"object","required":["userId","instanceAccesses"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"userId":{"type":"string","format":"uuid"},"adminAccessEnabled":{"type":"boolean"},"auditSecurityAccessEnabled":{"type":"boolean"},"instanceAccesses":{"type":"array","items":{"$ref":"#/components/schemas/InstanceAccess"}}}},"InstanceAccess":{"type":"object","required":["instanceId"],"properties":{"instanceId":{"type":"string","format":"uuid"},"instanceName":{"type":"string","nullable":true},"instanceDescription":{"type":"string","nullable":true},"userEmailWithInstanceDomain":{"type":"string","nullable":true},"workshopAccessEnabled":{"type":"boolean"},"auditDataAccessEnabled":{"type":"boolean"},"enabledTakenPersonally":{"type":"boolean"}}}}}}
```

## The User object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"User":{"type":"object","required":["username","email","locale"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"username":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"E.164 format","nullable":true},"timezone":{"type":"string","nullable":true},"locale":{"$ref":"#/components/schemas/UserLocale","default":"en-US"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"credentials":{"type":"string","nullable":true},"tenantName":{"type":"string","readOnly":true},"enabled":{"type":"boolean","default":true},"mfaEnabled":{"type":"boolean","default":false},"statusType":{"type":"string","nullable":true,"description":"AWS Cognito user status."},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"_root_user":{"type":"boolean","readOnly":true},"ssoAccess":{"type":"boolean"},"passwordAccess":{"type":"boolean","default":true},"terminologyName":{"type":"string","nullable":true},"userState":{"$ref":"#/components/schemas/UserState"},"customUserAttributes":{"type":"object","additionalProperties":true},"allowedToReceiveCalls":{"type":"boolean","default":true},"territories":{"type":"array","items":{"$ref":"#/components/schemas/ClientTerritory"}},"fullTerritoriesAccessInstances":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"policies":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"seats":{"type":"array","items":{"$ref":"#/components/schemas/LicenseSeatType"}},"seatAssignAllowed":{"type":"boolean"},"applicationAccess":{"$ref":"#/components/schemas/UserAppAccess"},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true}}},"UserLocale":{"type":"string","enum":["en-US","en-SG","en-AU","en-AE","en-EU"]},"UserState":{"type":"string","enum":["PROVISIONED","ACTIVE","INACTIVE"]},"ClientTerritory":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"},"territories":{"type":"array","items":{"type":"string"}},"instanceName":{"type":"string","nullable":true}}},"Permission":{"type":"object","required":["permissionName","instanceName","type"],"properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"permissionName":{"type":"string"},"instanceName":{"type":"string"},"type":{"$ref":"#/components/schemas/PermissionType"},"effectiveDate":{"type":"string","format":"date-time","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"primaryRole":{"type":"boolean","nullable":true,"description":"Only meaningful when type is SECURITY_ROLE."}}},"PermissionType":{"type":"string","enum":["SECURITY_POLICY","SECURITY_ROLE"]},"LicenseSeatType":{"type":"string","enum":["GENERAL"]},"UserAppAccess":{"type":"object","required":["userId","instanceAccesses"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"userId":{"type":"string","format":"uuid"},"adminAccessEnabled":{"type":"boolean"},"auditSecurityAccessEnabled":{"type":"boolean"},"instanceAccesses":{"type":"array","items":{"$ref":"#/components/schemas/InstanceAccess"}}}},"InstanceAccess":{"type":"object","required":["instanceId"],"properties":{"instanceId":{"type":"string","format":"uuid"},"instanceName":{"type":"string","nullable":true},"instanceDescription":{"type":"string","nullable":true},"userEmailWithInstanceDomain":{"type":"string","nullable":true},"workshopAccessEnabled":{"type":"boolean"},"auditDataAccessEnabled":{"type":"boolean"},"enabledTakenPersonally":{"type":"boolean"}}}}}}
```

## The UserUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserUpdateRequest":{"type":"object","description":"Partial update — all fields optional.","properties":{"phone":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"credentials":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"locale":{"$ref":"#/components/schemas/UserLocale"},"enabled":{"type":"boolean"},"mfaEnabled":{"type":"boolean"},"terminologyName":{"type":"string"},"ssoAccess":{"type":"boolean"},"passwordAccess":{"type":"boolean"},"resetPassword":{"type":"boolean"},"customUserAttributes":{"type":"object","additionalProperties":true,"nullable":true},"seats":{"type":"array","items":{"$ref":"#/components/schemas/LicenseSeatType"}},"allowedToReceiveCalls":{"type":"boolean"}}},"UserLocale":{"type":"string","enum":["en-US","en-SG","en-AU","en-AE","en-EU"]},"LicenseSeatType":{"type":"string","enum":["GENERAL"]}}}}
```

## The UserPoliciesUpdateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserPoliciesUpdateRequest":{"type":"object","required":["instanceName"],"properties":{"instanceName":{"type":"string"},"fullTerritoriesAccess":{"type":"boolean"},"territories":{"type":"array","items":{"$ref":"#/components/schemas/ClientTerritory"}},"policies":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}}}},"ClientTerritory":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"},"territories":{"type":"array","items":{"type":"string"}},"instanceName":{"type":"string","nullable":true}}},"Permission":{"type":"object","required":["permissionName","instanceName","type"],"properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"permissionName":{"type":"string"},"instanceName":{"type":"string"},"type":{"$ref":"#/components/schemas/PermissionType"},"effectiveDate":{"type":"string","format":"date-time","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"primaryRole":{"type":"boolean","nullable":true,"description":"Only meaningful when type is SECURITY_ROLE."}}},"PermissionType":{"type":"string","enum":["SECURITY_POLICY","SECURITY_ROLE"]}}}}
```

## The UserTerritory object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserTerritory":{"type":"object","required":["userId","territories"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"userId":{"type":"string","format":"uuid"},"territories":{"type":"array","items":{"$ref":"#/components/schemas/ClientTerritory"}},"fullTerritoriesAccessInstances":{"type":"array","items":{"type":"string"}}}},"ClientTerritory":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"},"territories":{"type":"array","items":{"type":"string"}},"instanceName":{"type":"string","nullable":true}}}}}}
```

## The UserPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"UserPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"User":{"type":"object","required":["username","email","locale"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"username":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","description":"E.164 format","nullable":true},"timezone":{"type":"string","nullable":true},"locale":{"$ref":"#/components/schemas/UserLocale","default":"en-US"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"credentials":{"type":"string","nullable":true},"tenantName":{"type":"string","readOnly":true},"enabled":{"type":"boolean","default":true},"mfaEnabled":{"type":"boolean","default":false},"statusType":{"type":"string","nullable":true,"description":"AWS Cognito user status."},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"_root_user":{"type":"boolean","readOnly":true},"ssoAccess":{"type":"boolean"},"passwordAccess":{"type":"boolean","default":true},"terminologyName":{"type":"string","nullable":true},"userState":{"$ref":"#/components/schemas/UserState"},"customUserAttributes":{"type":"object","additionalProperties":true},"allowedToReceiveCalls":{"type":"boolean","default":true},"territories":{"type":"array","items":{"$ref":"#/components/schemas/ClientTerritory"}},"fullTerritoriesAccessInstances":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"policies":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"seats":{"type":"array","items":{"$ref":"#/components/schemas/LicenseSeatType"}},"seatAssignAllowed":{"type":"boolean"},"applicationAccess":{"$ref":"#/components/schemas/UserAppAccess"},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true}}},"UserLocale":{"type":"string","enum":["en-US","en-SG","en-AU","en-AE","en-EU"]},"UserState":{"type":"string","enum":["PROVISIONED","ACTIVE","INACTIVE"]},"ClientTerritory":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"name":{"type":"string"},"territories":{"type":"array","items":{"type":"string"}},"instanceName":{"type":"string","nullable":true}}},"Permission":{"type":"object","required":["permissionName","instanceName","type"],"properties":{"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"permissionName":{"type":"string"},"instanceName":{"type":"string"},"type":{"$ref":"#/components/schemas/PermissionType"},"effectiveDate":{"type":"string","format":"date-time","nullable":true},"expirationDate":{"type":"string","format":"date-time","nullable":true},"primaryRole":{"type":"boolean","nullable":true,"description":"Only meaningful when type is SECURITY_ROLE."}}},"PermissionType":{"type":"string","enum":["SECURITY_POLICY","SECURITY_ROLE"]},"LicenseSeatType":{"type":"string","enum":["GENERAL"]},"UserAppAccess":{"type":"object","required":["userId","instanceAccesses"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"userId":{"type":"string","format":"uuid"},"adminAccessEnabled":{"type":"boolean"},"auditSecurityAccessEnabled":{"type":"boolean"},"instanceAccesses":{"type":"array","items":{"$ref":"#/components/schemas/InstanceAccess"}}}},"InstanceAccess":{"type":"object","required":["instanceId"],"properties":{"instanceId":{"type":"string","format":"uuid"},"instanceName":{"type":"string","nullable":true},"instanceDescription":{"type":"string","nullable":true},"userEmailWithInstanceDomain":{"type":"string","nullable":true},"workshopAccessEnabled":{"type":"boolean"},"auditDataAccessEnabled":{"type":"boolean"},"enabledTakenPersonally":{"type":"boolean"}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The EventEntity object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EventEntity":{"type":"string","enum":["PATIENT","CDT","PDT","USER","ASSESSMENT","ASSESSMENT_MIGRATION","USER_APP_ACCESS","USER_PERMISSION","USER_TERRITORY","API_CLIENT","API_CLIENT_APP_ACCESS","API_CLIENT_PERMISSION","API_CLIENT_TERRITORY","CHAT","EMAIL","SMS","WHATSAPP","VOICE_CALL","PHONE_TREE","TASK","GOAL","NOTIFICATION","WEBHOOK","PATIENT_PROGRAM","CALENDAR","CALENDAR_WORK_HOURS","ENCOUNTER","ENCOUNTER_DISPOSITION","SECURITY_CONFIG","INSTANCE","COMMUNICATION","UNRECOGNIZED_COMMUNICATION","COMMUNICATION_DATA_AUDIT","AUTOMATION","SESSION_CONFIG","LICENSE","TENANT_LICENSE","DOCUMENT","ACUITY_SERVICE","CALENDAR_SERVICE","INVOICE_REQUEST","FAX","PAYMENT_REQUEST","SUBSCRIPTION","INVOICE_AUTOMATION_RESULT","INVOICE","PAYMENT","PAYMENT_AUDIT","CANDID_REQUEST","CANDID_RESPONSE","ENCOUNTER_PAYMENT_INFO","AVAILABILITY","INBOX_MESSAGE","INBOX_USER_CONFIG","INBOX_MENTION","AUTOMATION_ACTION_GROUP","AUTOMATION_ACTION","LOG_LEVEL","CONCURRENCY_SETTINGS","TENANT"]}}}}
```

## The WebhookStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"WebhookStatus":{"type":"string","enum":["SENT","DELIVERED","FAILED"]}}}}
```

## The AuditRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AuditRecord":{"type":"object","properties":{"eventId":{"type":"string","description":"Numeric ID serialized as a string."},"eventEntity":{"$ref":"#/components/schemas/EventEntity"},"url":{"type":"string","nullable":true},"subjectUsername":{"type":"string","nullable":true},"subjectUserId":{"type":"string","format":"uuid","nullable":true},"subjectActor":{"$ref":"#/components/schemas/ActorType"},"subjectFullName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","nullable":true},"instance":{"type":"string","nullable":true},"cdtName":{"type":"string","nullable":true},"cdtRelation":{"$ref":"#/components/schemas/CdtRelation"},"cdt":{"$ref":"#/components/schemas/Cdt"},"eventSubtype":{"type":"string","description":"One of ~200 event subtype values, each associated with a parent eventEntity. Not modeled as a closed enum here."},"sentAt":{"type":"string","format":"date-time"},"record":{"type":"object","additionalProperties":true,"description":"The audited payload — shape depends on eventEntity."}}},"EventEntity":{"type":"string","enum":["PATIENT","CDT","PDT","USER","ASSESSMENT","ASSESSMENT_MIGRATION","USER_APP_ACCESS","USER_PERMISSION","USER_TERRITORY","API_CLIENT","API_CLIENT_APP_ACCESS","API_CLIENT_PERMISSION","API_CLIENT_TERRITORY","CHAT","EMAIL","SMS","WHATSAPP","VOICE_CALL","PHONE_TREE","TASK","GOAL","NOTIFICATION","WEBHOOK","PATIENT_PROGRAM","CALENDAR","CALENDAR_WORK_HOURS","ENCOUNTER","ENCOUNTER_DISPOSITION","SECURITY_CONFIG","INSTANCE","COMMUNICATION","UNRECOGNIZED_COMMUNICATION","COMMUNICATION_DATA_AUDIT","AUTOMATION","SESSION_CONFIG","LICENSE","TENANT_LICENSE","DOCUMENT","ACUITY_SERVICE","CALENDAR_SERVICE","INVOICE_REQUEST","FAX","PAYMENT_REQUEST","SUBSCRIPTION","INVOICE_AUTOMATION_RESULT","INVOICE","PAYMENT","PAYMENT_AUDIT","CANDID_REQUEST","CANDID_RESPONSE","ENCOUNTER_PAYMENT_INFO","AVAILABILITY","INBOX_MESSAGE","INBOX_USER_CONFIG","INBOX_MENTION","AUTOMATION_ACTION_GROUP","AUTOMATION_ACTION","LOG_LEVEL","CONCURRENCY_SETTINGS","TENANT"]},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]},"Cdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"type":{"$ref":"#/components/schemas/DtType"},"relation":{"$ref":"#/components/schemas/CdtRelation"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}}}}}
```

## The AuditRecordPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AuditRecordPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditRecord"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"AuditRecord":{"type":"object","properties":{"eventId":{"type":"string","description":"Numeric ID serialized as a string."},"eventEntity":{"$ref":"#/components/schemas/EventEntity"},"url":{"type":"string","nullable":true},"subjectUsername":{"type":"string","nullable":true},"subjectUserId":{"type":"string","format":"uuid","nullable":true},"subjectActor":{"$ref":"#/components/schemas/ActorType"},"subjectFullName":{"type":"string","nullable":true},"patientFullName":{"type":"string","nullable":true},"patientId":{"type":"string","format":"uuid","nullable":true},"instance":{"type":"string","nullable":true},"cdtName":{"type":"string","nullable":true},"cdtRelation":{"$ref":"#/components/schemas/CdtRelation"},"cdt":{"$ref":"#/components/schemas/Cdt"},"eventSubtype":{"type":"string","description":"One of ~200 event subtype values, each associated with a parent eventEntity. Not modeled as a closed enum here."},"sentAt":{"type":"string","format":"date-time"},"record":{"type":"object","additionalProperties":true,"description":"The audited payload — shape depends on eventEntity."}}},"EventEntity":{"type":"string","enum":["PATIENT","CDT","PDT","USER","ASSESSMENT","ASSESSMENT_MIGRATION","USER_APP_ACCESS","USER_PERMISSION","USER_TERRITORY","API_CLIENT","API_CLIENT_APP_ACCESS","API_CLIENT_PERMISSION","API_CLIENT_TERRITORY","CHAT","EMAIL","SMS","WHATSAPP","VOICE_CALL","PHONE_TREE","TASK","GOAL","NOTIFICATION","WEBHOOK","PATIENT_PROGRAM","CALENDAR","CALENDAR_WORK_HOURS","ENCOUNTER","ENCOUNTER_DISPOSITION","SECURITY_CONFIG","INSTANCE","COMMUNICATION","UNRECOGNIZED_COMMUNICATION","COMMUNICATION_DATA_AUDIT","AUTOMATION","SESSION_CONFIG","LICENSE","TENANT_LICENSE","DOCUMENT","ACUITY_SERVICE","CALENDAR_SERVICE","INVOICE_REQUEST","FAX","PAYMENT_REQUEST","SUBSCRIPTION","INVOICE_AUTOMATION_RESULT","INVOICE","PAYMENT","PAYMENT_AUDIT","CANDID_REQUEST","CANDID_RESPONSE","ENCOUNTER_PAYMENT_INFO","AVAILABILITY","INBOX_MESSAGE","INBOX_USER_CONFIG","INBOX_MENTION","AUTOMATION_ACTION_GROUP","AUTOMATION_ACTION","LOG_LEVEL","CONCURRENCY_SETTINGS","TENANT"]},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"CdtRelation":{"type":"string","enum":["COMMON","PATIENT_INFO","PATIENT","PATIENT_GOAL","ENCOUNTER","ENCOUNTER_DISPOSITION","ENCOUNTER_ASSESSMENT","ASSESSMENT","ASSESSMENT_SCORING","ASSESSMENT_CONSENT","ASSESSMENT_RESULTS_FILE","ASSESSMENT_GROUP","DOCUMENT_SUMMARY","DOCUMENT_TYPE","BILLING_CLAIMS_STATUS","INVOICE","SUPERBILL"]},"Cdt":{"type":"object","required":["name","fields"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"title":{"type":"string"},"label":{"type":"string"},"version":{"type":"integer"},"internal":{"type":"boolean"},"readable":{"type":"boolean","default":true},"updatable":{"type":"boolean","default":true},"type":{"$ref":"#/components/schemas/DtType"},"relation":{"$ref":"#/components/schemas/CdtRelation"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/DtField"}}}},"DtType":{"type":"string","enum":["SINGLE_RECORD","MULTI_RECORD"]},"DtField":{"type":"object","required":["name","type","meta"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9\\-_]+$"},"type":{"$ref":"#/components/schemas/FieldTypeEnum"},"formula":{"type":"string","nullable":true},"dictionary":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"field":{"type":"string"}}},"profileDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customDataType":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"customFieldType":{"type":"string","nullable":true},"editable":{"type":"boolean","default":true},"searchable":{"type":"boolean"},"bulkEdit":{"type":"boolean"},"phi":{"type":"boolean"},"disable":{"type":"boolean","description":"JSON key for the \"disabled\" field."},"injectedSource":{"type":"boolean"},"displayType":{"$ref":"#/components/schemas/DtFieldDisplayType"},"valueType":{"$ref":"#/components/schemas/DtFieldValueType"},"meta":{"$ref":"#/components/schemas/DtFieldMeta"},"mask":{"$ref":"#/components/schemas/FieldMask"},"richTextEnabled":{"type":"boolean"}}},"FieldTypeEnum":{"type":"string","enum":["TEXT","TEXTAREA","PASSWORD","EMAIL","INTEGER","FLOAT","PERCENT","RADIO","CHECKBOX","SELECT","CHOICE","DATE","TIME","DATETIME","FILE","IMAGE","URL","PHONE","UUID","SSN","ADDRESS","LOCATION","FORMULA","OBJECT","SIGNATURE"]},"DtFieldDisplayType":{"type":"string","enum":["CHECKBOX","RADIO","SELECT"]},"DtFieldValueType":{"type":"string","enum":["STRING","INTEGER","FLOAT","OBJECT"]},"DtFieldMeta":{"type":"object","properties":{"label":{"type":"string"},"minLength":{"type":"integer","nullable":true},"maxLength":{"type":"integer","nullable":true},"minValue":{"type":"string","nullable":true},"maxValue":{"type":"string","nullable":true},"fileTypes":{"type":"array","items":{"type":"string"}},"maxFiles":{"type":"integer","nullable":true},"maxTotalFileSize":{"type":"integer","nullable":true,"description":"Bytes"},"required":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"$ref":"#/components/schemas/OptionItem"}},"multiple":{"type":"boolean","nullable":true},"patterns":{"type":"array","items":{"type":"string","enum":["NUMBERS_ONLY","LETTERS_ONLY"]}}}},"OptionItem":{"type":"object","properties":{"label":{"type":"string"},"value":{},"refCdtName":{"type":"string","nullable":true}}},"FieldMask":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":1,"default":"*"},"startPosition":{"type":"integer","minimum":1},"endPosition":{"type":"integer","nullable":true}}},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The AuditWebhookRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AuditWebhookRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sentAt":{"type":"string","format":"date-time"},"eventEntity":{"$ref":"#/components/schemas/EventEntity"},"patientId":{"type":"string","format":"uuid","nullable":true},"instance":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/WebhookStatus"},"statusCode":{"type":"integer","nullable":true,"description":"HTTP status code of the webhook delivery attempt."},"response":{"type":"string","nullable":true},"eventSubtype":{"type":"string"},"record":{"type":"object","additionalProperties":true,"description":"The webhook configuration that was triggered."}}},"EventEntity":{"type":"string","enum":["PATIENT","CDT","PDT","USER","ASSESSMENT","ASSESSMENT_MIGRATION","USER_APP_ACCESS","USER_PERMISSION","USER_TERRITORY","API_CLIENT","API_CLIENT_APP_ACCESS","API_CLIENT_PERMISSION","API_CLIENT_TERRITORY","CHAT","EMAIL","SMS","WHATSAPP","VOICE_CALL","PHONE_TREE","TASK","GOAL","NOTIFICATION","WEBHOOK","PATIENT_PROGRAM","CALENDAR","CALENDAR_WORK_HOURS","ENCOUNTER","ENCOUNTER_DISPOSITION","SECURITY_CONFIG","INSTANCE","COMMUNICATION","UNRECOGNIZED_COMMUNICATION","COMMUNICATION_DATA_AUDIT","AUTOMATION","SESSION_CONFIG","LICENSE","TENANT_LICENSE","DOCUMENT","ACUITY_SERVICE","CALENDAR_SERVICE","INVOICE_REQUEST","FAX","PAYMENT_REQUEST","SUBSCRIPTION","INVOICE_AUTOMATION_RESULT","INVOICE","PAYMENT","PAYMENT_AUDIT","CANDID_REQUEST","CANDID_RESPONSE","ENCOUNTER_PAYMENT_INFO","AVAILABILITY","INBOX_MESSAGE","INBOX_USER_CONFIG","INBOX_MENTION","AUTOMATION_ACTION_GROUP","AUTOMATION_ACTION","LOG_LEVEL","CONCURRENCY_SETTINGS","TENANT"]},"WebhookStatus":{"type":"string","enum":["SENT","DELIVERED","FAILED"]}}}}
```

## The AuditWebhookPage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AuditWebhookPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditWebhookRecord"}},"metaInfo":{"$ref":"#/components/schemas/PageMetaInfo"}}},"AuditWebhookRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sentAt":{"type":"string","format":"date-time"},"eventEntity":{"$ref":"#/components/schemas/EventEntity"},"patientId":{"type":"string","format":"uuid","nullable":true},"instance":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/WebhookStatus"},"statusCode":{"type":"integer","nullable":true,"description":"HTTP status code of the webhook delivery attempt."},"response":{"type":"string","nullable":true},"eventSubtype":{"type":"string"},"record":{"type":"object","additionalProperties":true,"description":"The webhook configuration that was triggered."}}},"EventEntity":{"type":"string","enum":["PATIENT","CDT","PDT","USER","ASSESSMENT","ASSESSMENT_MIGRATION","USER_APP_ACCESS","USER_PERMISSION","USER_TERRITORY","API_CLIENT","API_CLIENT_APP_ACCESS","API_CLIENT_PERMISSION","API_CLIENT_TERRITORY","CHAT","EMAIL","SMS","WHATSAPP","VOICE_CALL","PHONE_TREE","TASK","GOAL","NOTIFICATION","WEBHOOK","PATIENT_PROGRAM","CALENDAR","CALENDAR_WORK_HOURS","ENCOUNTER","ENCOUNTER_DISPOSITION","SECURITY_CONFIG","INSTANCE","COMMUNICATION","UNRECOGNIZED_COMMUNICATION","COMMUNICATION_DATA_AUDIT","AUTOMATION","SESSION_CONFIG","LICENSE","TENANT_LICENSE","DOCUMENT","ACUITY_SERVICE","CALENDAR_SERVICE","INVOICE_REQUEST","FAX","PAYMENT_REQUEST","SUBSCRIPTION","INVOICE_AUTOMATION_RESULT","INVOICE","PAYMENT","PAYMENT_AUDIT","CANDID_REQUEST","CANDID_RESPONSE","ENCOUNTER_PAYMENT_INFO","AVAILABILITY","INBOX_MESSAGE","INBOX_USER_CONFIG","INBOX_MENTION","AUTOMATION_ACTION_GROUP","AUTOMATION_ACTION","LOG_LEVEL","CONCURRENCY_SETTINGS","TENANT"]},"WebhookStatus":{"type":"string","enum":["SENT","DELIVERED","FAILED"]},"PageMetaInfo":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalElements":{"type":"integer"},"numberOfElements":{"type":"integer"}}}}}}
```

## The PhaseType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PhaseType":{"type":"string","enum":["START","FINISH","DEFAULT"]}}}}
```

## The PhaseNavigation object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PhaseNavigation":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}}
```

## The Phase object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Phase":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9A-Z\\-_]+$"},"title":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/PhaseType"},"description":{"type":"string","nullable":true},"autoFinishProgram":{"type":"boolean"},"navigateTo":{"type":"array","items":{"$ref":"#/components/schemas/PhaseNavigation"}}}},"PhaseType":{"type":"string","enum":["START","FINISH","DEFAULT"]},"PhaseNavigation":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}}
```

## The Program object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Program":{"type":"object","required":["name"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9A-Z\\-_]+$"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"phases":{"type":"array","items":{"$ref":"#/components/schemas/Phase"}},"nodes":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"Phase":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","pattern":"^[a-z0-9A-Z\\-_]+$"},"title":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/PhaseType"},"description":{"type":"string","nullable":true},"autoFinishProgram":{"type":"boolean"},"navigateTo":{"type":"array","items":{"$ref":"#/components/schemas/PhaseNavigation"}}}},"PhaseType":{"type":"string","enum":["START","FINISH","DEFAULT"]},"PhaseNavigation":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}}
```

## The DateCursor object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"DateCursor":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Echoes the `start` query param for this page."},"end":{"type":"string","format":"date-time","nullable":true,"description":"Pass as `start` to fetch the next page."},"hasNext":{"type":"boolean"},"pageSize":{"type":"integer","description":"Effective page size used (1-1000, defaults to 1000 if omitted or out of range)."}}}}}}
```

## The AssessmentExportRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AssessmentExportRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"finalizedDate":{"type":"string","format":"date-time","nullable":true},"assessmentName":{"type":"string"},"assessmentTitle":{"type":"string","nullable":true},"assessmentCdtName":{"type":"string","nullable":true},"version":{"type":"integer","nullable":true},"patientId":{"type":"string","format":"uuid"},"status":{"type":"string"},"cdtRecordId":{"type":"string","format":"uuid","nullable":true},"scoringRecordId":{"type":"string","format":"uuid","nullable":true},"answers":{"type":"object","additionalProperties":true},"scoring":{"type":"object","additionalProperties":true},"questions":{"type":"object","additionalProperties":true}}}}}}
```

## The CarePlanExportRecord object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CarePlanExportRecord":{"allOf":[{"$ref":"#/components/schemas/CarePlan"},{"type":"object","properties":{"goals":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}}}}]},"CarePlan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedByName":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"patientId":{"type":"string","format":"uuid"},"patientOverview":{"$ref":"#/components/schemas/PatientOverview","nullable":true}}},"PatientOverview":{"type":"object","properties":{"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"overview":{"type":"string","nullable":true}}},"Goal":{"type":"object","properties":{"details":{"$ref":"#/components/schemas/GoalDetails"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/GoalComment"}}}},"GoalDetails":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"priority":{"$ref":"#/components/schemas/GoalPriority"},"status":{"$ref":"#/components/schemas/GoalStatus"},"templateName":{"type":"string","nullable":true}}},"GoalPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"GoalStatus":{"type":"string","enum":["ACTIVE","COMPLETED","REMOVED"]},"Task":{"type":"object","required":["name","status","priority","assignee"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"dueDate":{"type":"string","format":"date-time","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"priority":{"$ref":"#/components/schemas/TaskPriority"},"patient":{"$ref":"#/components/schemas/IndexedNamed","description":"Set automatically from the path patientId when created via the Goal Task endpoint."},"assignee":{"$ref":"#/components/schemas/TaskUser"},"watchers":{"type":"array","items":{"$ref":"#/components/schemas/TaskUser"}},"comments":{"type":"array","items":{"$ref":"#/components/schemas/TaskComment"}},"goalId":{"type":"string","format":"uuid","nullable":true,"readOnly":true},"templateName":{"type":"string","nullable":true},"createdType":{"$ref":"#/components/schemas/TaskCreatedType"},"sourceId":{"type":"string","format":"uuid","nullable":true},"sourceType":{"$ref":"#/components/schemas/TaskSourceType"},"hiddenPhi":{"type":"boolean"},"watchersType":{"$ref":"#/components/schemas/WatchersType","default":"POINT_OF_CONTACT"}}},"TaskStatus":{"type":"string","enum":["TODO","IN_PROGRESS","COMPLETED","CANCELED"]},"TaskPriority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"TaskUser":{"allOf":[{"$ref":"#/components/schemas/IndexedNamed"},{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true}}}]},"TaskComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"author":{"$ref":"#/components/schemas/TaskUser"},"text":{"type":"string"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"user":{"$ref":"#/components/schemas/IndexedNamed"}}},"TaskCreatedType":{"type":"string","enum":["AUTOMATION","USER"]},"TaskSourceType":{"type":"string","enum":["ASSESSMENT"]},"WatchersType":{"type":"string","enum":["POINT_OF_CONTACT","CARE_TEAM"]},"GoalComment":{"type":"object","required":["text"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"createdByName":{"type":"string","readOnly":true,"nullable":true},"createdAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"updatedByName":{"type":"string","readOnly":true,"nullable":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"text":{"type":"string"}}}}}}
```

## The InvoiceStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"InvoiceStatus":{"type":"string","enum":["DRAFT","PENDING","VOIDED","PAID","PARTIALLY_PAID","OVERDUE","DELETED","PREAUTHORIZED"]}}}}
```

## The BillingType object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"BillingType":{"type":"string","enum":["SELF_PAY","INSURANCE"]}}}}
```

## The InvoiceItem object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"InvoiceItem":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string","nullable":true},"quantity":{"type":"integer","default":1},"unitAmount":{"type":"integer","default":1,"description":"Cost in cents."},"serviceCode":{"type":"string","nullable":true},"serviceModifiers":{"type":"array","items":{"type":"string"}}}}}}}
```

## The Invoice object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"customInvoiceId":{"type":"string","nullable":true},"status":{"type":"string","description":"Commonly one of: DRAFT, PENDING, VOIDED, PAID, PARTIALLY_PAID, OVERDUE, DELETED, PREAUTHORIZED."},"paymentTypeInfo":{"type":"object","additionalProperties":true,"nullable":true},"billingType":{"$ref":"#/components/schemas/BillingType"},"dueDate":{"type":"string","format":"date-time","nullable":true},"invoiceDate":{"type":"string","format":"date-time","nullable":true},"invoiceItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}},"careMember":{"$ref":"#/components/schemas/IndexedNamed"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"amount":{"type":"integer","description":"Total in cents."},"amountPaid":{"type":"integer","description":"Amount paid in cents."},"relatedEncounters":{"type":"array","items":{"type":"string","format":"uuid"}}}},"BillingType":{"type":"string","enum":["SELF_PAY","INSURANCE"]},"InvoiceItem":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string","nullable":true},"quantity":{"type":"integer","default":1},"unitAmount":{"type":"integer","default":1,"description":"Cost in cents."},"serviceCode":{"type":"string","nullable":true},"serviceModifiers":{"type":"array","items":{"type":"string"}}}},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The InvoicePage object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"InvoicePage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"customInvoiceId":{"type":"string","nullable":true},"status":{"type":"string","description":"Commonly one of: DRAFT, PENDING, VOIDED, PAID, PARTIALLY_PAID, OVERDUE, DELETED, PREAUTHORIZED."},"paymentTypeInfo":{"type":"object","additionalProperties":true,"nullable":true},"billingType":{"$ref":"#/components/schemas/BillingType"},"dueDate":{"type":"string","format":"date-time","nullable":true},"invoiceDate":{"type":"string","format":"date-time","nullable":true},"invoiceItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"}},"careMember":{"$ref":"#/components/schemas/IndexedNamed"},"patient":{"$ref":"#/components/schemas/IndexedNamed"},"amount":{"type":"integer","description":"Total in cents."},"amountPaid":{"type":"integer","description":"Amount paid in cents."},"relatedEncounters":{"type":"array","items":{"type":"string","format":"uuid"}}}},"BillingType":{"type":"string","enum":["SELF_PAY","INSURANCE"]},"InvoiceItem":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string","nullable":true},"quantity":{"type":"integer","default":1},"unitAmount":{"type":"integer","default":1,"description":"Cost in cents."},"serviceCode":{"type":"string","nullable":true},"serviceModifiers":{"type":"array","items":{"type":"string"}}}},"IndexedNamed":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}}}}}
```

## The SubscriptionStatus object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SubscriptionStatus":{"type":"string","enum":["NEW","ACTIVE","CANCELED","INCOMPLETE","INCOMPLETE_EXPIRED","PAST_DUE","PAUSED","TRIALING","UNPAID","COMPLETED","NOT_STARTED","RELEASED"]}}}}
```

## The PauseCollectionDetails object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"PauseCollectionDetails":{"type":"object","properties":{"resumesAt":{"type":"string","format":"date-time","nullable":true,"description":"null means paused indefinitely."}}}}}}
```

## The Subscription object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Subscription":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"status":{"type":"string","description":"Commonly one of: NEW, ACTIVE, CANCELED, INCOMPLETE, INCOMPLETE_EXPIRED, PAST_DUE, PAUSED, TRIALING, UNPAID, COMPLETED, NOT_STARTED, RELEASED."},"pauseCollection":{"$ref":"#/components/schemas/PauseCollectionDetails","nullable":true}}},"PauseCollectionDetails":{"type":"object","properties":{"resumesAt":{"type":"string","format":"date-time","nullable":true,"description":"null means paused indefinitely."}}}}}}
```

## The AttachPaymentMethodRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AttachPaymentMethodRequest":{"type":"object","required":["paymentMethodId"],"properties":{"paymentMethodId":{"type":"string","description":"Stripe PaymentMethod ID (e.g. `pm_...`)."}}}}}}
```

## The AttachPaymentMethodResponse object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"AttachPaymentMethodResponse":{"type":"object","properties":{"paymentMethodId":{"type":"string"}}}}}}
```

## The Channel object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"Channel":{"type":"string","enum":["SMS","EMAIL","VOICE_CALL"]}}}}
```

## The CreateCommunicationIdRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CreateCommunicationIdRequest":{"type":"object","required":["channel","patientContactId"],"properties":{"channel":{"$ref":"#/components/schemas/Channel"},"patientContactId":{"type":"string","format":"uuid"},"instancePhoneId":{"type":"string","format":"uuid","description":"Required for SMS/VOICE_CALL if patientContactPhoneNumber is not the default."},"patientContactPhoneNumber":{"type":"string","description":"E.164 format. If omitted for SMS/VOICE_CALL, the patient contact's default phone is used."}}},"Channel":{"type":"string","enum":["SMS","EMAIL","VOICE_CALL"]}}}}
```

## The CreateCommunicationIdResponse object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CreateCommunicationIdResponse":{"type":"object","properties":{"communicationId":{"type":"string","description":"Opaque token to pass to the send-message endpoint. Not a persisted resource — it is a Base64 encoding of the request above, decoded server-side on the next call."}}}}}}
```

## The SmsMessageRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SmsMessageRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","maxLength":1600},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}}}},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The EmailMessageRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailMessageRequest":{"type":"object","required":["message","subject"],"properties":{"message":{"type":"string"},"subject":{"type":"string"},"secure":{"type":"boolean","default":false},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}}}},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}}}}}
```

## The VoiceCallMessageRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"VoiceCallMessageRequest":{"type":"object","properties":{"recorded":{"type":"boolean","default":false}}}}}}
```

## The SmsMessageMultipartRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"SmsMessageMultipartRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"attachmentsAsFiles":{"type":"array","items":{"type":"string","format":"binary"}}}}}}}
```

## The EmailMessageMultipartRequest object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"EmailMessageMultipartRequest":{"type":"object","required":["message","subject"],"properties":{"message":{"type":"string"},"subject":{"type":"string"},"secure":{"type":"boolean","default":false},"attachmentsAsFiles":{"type":"array","items":{"type":"string","format":"binary"}}}}}}}
```

## The CommunicationErrorDetails object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CommunicationErrorDetails":{"type":"object","properties":{"fieldName":{"type":"string","nullable":true},"value":{"description":"The offending value, if applicable. Type varies."}}}}}}
```

## The CommunicationError object

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"components":{"schemas":{"CommunicationError":{"type":"object","properties":{"errorCode":{"type":"string","enum":["VALIDATION_ERROR","COMMUNICATION_ID_INVALID_ERROR","CHANNEL_TYPE_INVALID_ERROR","COMMUNICATION_ERROR","GENERIC","UNKNOWN_ERROR"]},"componentType":{"type":"string","nullable":true},"message":{"type":"string"},"details":{"$ref":"#/components/schemas/CommunicationErrorDetails"},"date":{"type":"string","format":"date-time"}}},"CommunicationErrorDetails":{"type":"object","properties":{"fieldName":{"type":"string","nullable":true},"value":{"description":"The offending value, if applicable. Type varies."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.welkinhealth.com/api-reference/models.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
