documentation

Patient Vault v3 API

Contact

/v3/patient/{patientId}/contact endpoint reference.

URL: https://demo.1health.io/api/v3/patient/{patientId}/contact

APIs for managing patient contact points (email, phone, fax). Supports creating, listing, updating, and deactivating contact points. The collection is append-only — old contact points are retained for audit and outreach history.

Endpoints

EndpointMethodDescription
/v3/patient/{patientId}/contactGETList patient contact points
/v3/patient/{patientId}/contactPOSTAdd a new contact point to a patient
/v3/patient/{patientId}/contact/{contactId}GETGet a specific patient contact point
/v3/patient/{patientId}/contact/{contactId}PUTFully update a patient contact point
/v3/patient/{patientId}/contact/{contactId}PATCHPartially update a patient contact point
/v3/patient/{patientId}/contact/{contactId}DELETEDeactivate a patient contact point

GET/v3/patient/{patientId}/contact

List patient contact points

Overview

Returns all active contact points for a patient. Supports optional filtering by type and primary status.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.

Query Parameters

ParameterTypeRequiredDefaultDescription
typeStringNoFilter by contact point type.
primaryBooleanNoWhen true, returns only primary contact points.

Responses

200 OK

List of patient contact points.

DTO: PatientContactListResponseDTO

{
  "contacts": [
    {}
  ]
}
FieldTypeNullableDescription
contactsListNoList of contact point records.

400 Bad Request

Invalid type filter value.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient not found.

500 Internal Server Error

Unexpected error while processing the contact point request.

Example

curl -X GET "https://demo.1health.io/api/v3/patient/1001/contact" \
  -H "Authorization: Bearer $TOKEN"

POST/v3/patient/{patientId}/contact

Add a new contact point to a patient

Overview

Appends a new contact point to the patient record. Old contact points are preserved for audit trail — each call creates a new record with its own ID.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient to add a contact point to.

Request Body

Content-Type: application/json · DTO: PatientContactRequestDTO

{
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeRequiredConstraintsDescription
typestringYesCannot be cleared.The type of contact point. Cannot be cleared.
valuestringYesCannot be cleared.The address or number for this contact point. Cannot be cleared. Email values are format-checked; phone values (mobile, fax) are validated for the region and stored in E.164 format (e.g. +14155550100).
labelstringNoOptional; clear with n/a (a blank value is also normalized to n/a).Free-text label for this contact point. Optional; clear with n/a (a blank value is also normalized to n/a).
isPrimarybooleanNoOnly one contact point per type can be primary at a time.Marks this as the preferred contact point for its type. Only one contact point per type can be primary at a time. Send false to make it non-primary.
notificationsEnabledbooleanNoDefaults to false.Whether this contact point may receive notifications. Defaults to false.
regionstringNoDefaults to "us" for phone types (mobile, fax) when blank. Ignored for non-phone types. Optional; clear with n/a (a blank value is also normalized to n/a).Region used to validate and normalize phone numbers, e.g. "us". Defaults to "us" for phone types (mobile, fax) when blank. Ignored for non-phone types. Optional; clear with n/a (a blank value is also normalized to n/a).

Responses

201 Created

Contact point created successfully.

DTO: PatientContactResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeNullableDescription
idLongYesContact point record ID.
typeStringYesThe type of contact point.
valueStringYesThe address or number for this contact point.
labelStringYesFree-text label for this contact point.
isPrimaryBooleanYesWhether this is the preferred contact point for its type.
notificationsEnabledBooleanYesWhether this contact point may receive notifications.
regionStringYesRegion hint for phone normalization.

400 Bad Request

Invalid request. Possible causes: • A required field (type, value) is missing, blank, or set to n/a • Invalid type value • Invalid email address, or invalid phone number for the given region

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient not found.

500 Internal Server Error

Unexpected error while processing the contact point request.

Example

curl -X POST "https://demo.1health.io/api/v3/patient/1001/contact" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"type": "example-value", "value": "example-value", "label": "example-value", "isPrimary": true, "notificationsEnabled": true, "region": "example-value"}'

GET/v3/patient/{patientId}/contact/{contactId}

Get a specific patient contact point

Overview

Returns a single contact point for a patient.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
contactIdLongYesThe ID of the contact point record.

Responses

200 OK

Contact point found.

DTO: PatientContactResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeNullableDescription
idLongYesContact point record ID.
typeStringYesThe type of contact point.
valueStringYesThe address or number for this contact point.
labelStringYesFree-text label for this contact point.
isPrimaryBooleanYesWhether this is the preferred contact point for its type.
notificationsEnabledBooleanYesWhether this contact point may receive notifications.
regionStringYesRegion hint for phone normalization.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Contact point not found.

500 Internal Server Error

Unexpected error while processing the contact point request.

Example

curl -X GET "https://demo.1health.io/api/v3/patient/1001/contact/1001" \
  -H "Authorization: Bearer $TOKEN"

PUT/v3/patient/{patientId}/contact/{contactId}

Fully update a patient contact point

Overview

Replaces all fields of an existing contact point. Required fields must be provided; optional fields absent or sent blank are reset to their default value.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
contactIdLongYesThe ID of the contact point to update.

Request Body

Content-Type: application/json · DTO: PatientContactRequestDTO

{
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeRequiredConstraintsDescription
typestringYesCannot be cleared.The type of contact point. Cannot be cleared.
valuestringYesCannot be cleared.The address or number for this contact point. Cannot be cleared. Email values are format-checked; phone values (mobile, fax) are validated for the region and stored in E.164 format (e.g. +14155550100).
labelstringNoOptional; clear with n/a (a blank value is also normalized to n/a).Free-text label for this contact point. Optional; clear with n/a (a blank value is also normalized to n/a).
isPrimarybooleanNoOnly one contact point per type can be primary at a time.Marks this as the preferred contact point for its type. Only one contact point per type can be primary at a time. Send false to make it non-primary.
notificationsEnabledbooleanNoDefaults to false.Whether this contact point may receive notifications. Defaults to false.
regionstringNoDefaults to "us" for phone types (mobile, fax) when blank. Ignored for non-phone types. Optional; clear with n/a (a blank value is also normalized to n/a).Region used to validate and normalize phone numbers, e.g. "us". Defaults to "us" for phone types (mobile, fax) when blank. Ignored for non-phone types. Optional; clear with n/a (a blank value is also normalized to n/a).

Responses

200 OK

Contact point updated successfully.

DTO: PatientContactResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeNullableDescription
idLongYesContact point record ID.
typeStringYesThe type of contact point.
valueStringYesThe address or number for this contact point.
labelStringYesFree-text label for this contact point.
isPrimaryBooleanYesWhether this is the preferred contact point for its type.
notificationsEnabledBooleanYesWhether this contact point may receive notifications.
regionStringYesRegion hint for phone normalization.

400 Bad Request

Invalid request. Possible causes: • A required field (type, value) is missing, blank, or set to n/a • Invalid type value • Invalid email address, or invalid phone number for the given region

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or contact point not found.

500 Internal Server Error

Unexpected error while processing the contact point request.

Example

curl -X PUT "https://demo.1health.io/api/v3/patient/1001/contact/1001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"type": "example-value", "value": "example-value", "label": "example-value", "isPrimary": true, "notificationsEnabled": true, "region": "example-value"}'

PATCH/v3/patient/{patientId}/contact/{contactId}

Partially update a patient contact point

Overview

Updates only the fields sent in the request body. Fields that are omitted or sent as null are left unchanged.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
contactIdLongYesThe ID of the contact point to partially update.

Request Body

Content-Type: application/json · DTO: PatientContactRequestDTO

{
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeRequiredConstraintsDescription
typestringYesCannot be cleared.The type of contact point. Cannot be cleared.
valuestringYesCannot be cleared.The address or number for this contact point. Cannot be cleared. Email values are format-checked; phone values (mobile, fax) are validated for the region and stored in E.164 format (e.g. +14155550100).
labelstringNoOptional; clear with n/a (a blank value is also normalized to n/a).Free-text label for this contact point. Optional; clear with n/a (a blank value is also normalized to n/a).
isPrimarybooleanNoOnly one contact point per type can be primary at a time.Marks this as the preferred contact point for its type. Only one contact point per type can be primary at a time. Send false to make it non-primary.
notificationsEnabledbooleanNoDefaults to false.Whether this contact point may receive notifications. Defaults to false.
regionstringNoDefaults to "us" for phone types (mobile, fax) when blank. Ignored for non-phone types. Optional; clear with n/a (a blank value is also normalized to n/a).Region used to validate and normalize phone numbers, e.g. "us". Defaults to "us" for phone types (mobile, fax) when blank. Ignored for non-phone types. Optional; clear with n/a (a blank value is also normalized to n/a).

Responses

200 OK

Contact point partially updated successfully.

DTO: PatientContactResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "value": "example-value",
  "label": "example-value",
  "isPrimary": true,
  "notificationsEnabled": true,
  "region": "example-value"
}
FieldTypeNullableDescription
idLongYesContact point record ID.
typeStringYesThe type of contact point.
valueStringYesThe address or number for this contact point.
labelStringYesFree-text label for this contact point.
isPrimaryBooleanYesWhether this is the preferred contact point for its type.
notificationsEnabledBooleanYesWhether this contact point may receive notifications.
regionStringYesRegion hint for phone normalization.

400 Bad Request

Invalid request. Possible causes: • A required field (type, value) sent blank or set to n/a • Invalid type value • Invalid email address, or invalid phone number for the given region

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or contact point not found.

500 Internal Server Error

Unexpected error while processing the contact point request.

Example

curl -X PATCH "https://demo.1health.io/api/v3/patient/1001/contact/1001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"type": "example-value", "value": "example-value", "label": "example-value", "isPrimary": true, "notificationsEnabled": true, "region": "example-value"}'

DELETE/v3/patient/{patientId}/contact/{contactId}

Deactivate a patient contact point

Overview

Soft-deletes a contact point. The record is deactivated but preserved for outreach history.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
contactIdLongYesThe ID of the contact point to deactivate.

Responses

200 OK

Contact point deactivated successfully.

DTO: PatientContactDeleteResponseDTO

{
  "id": 1001,
  "active": true,
  "deletedAt": "2024-01-15T09:30:00Z"
}
FieldTypeNullableDescription
idLongNoThe ID of the deactivated contact point.
activebooleanNoWhether the contact point is active.
deletedAtLocalDateTimeNoTimestamp when the contact point was deactivated.

400 Bad Request

Cannot delete a primary contact point — promote another of the same type first.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or contact point not found.

500 Internal Server Error

Unexpected error while processing the contact point request.

Example

curl -X DELETE "https://demo.1health.io/api/v3/patient/1001/contact/1001" \
  -H "Authorization: Bearer $TOKEN"

Parent: https://agents.1health.io/public/demo/api/v3/patient/_patientId_/agents.md · Site guide: https://agents.1health.io/public/demo/api/agents.md