> 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/contact.md).

# Contact

Communication with patient representatives. This feature is designed to empower customers in facilitating communication between their users and third-party entities associated with patients, such as legal guardians, providers, and relatives. It utilizes the comm center as a means of communication. According to Welkin’s design, these entities should be stored within profiles. To make a profile record contactable, two requirements must be met: 1) it should be linked / added as a contact to a patient, and 2) it should belong to a profile with the “contactable” switch enabled in the Designer, which is introduced as part of the current feature. Once these conditions are fulfilled, communication icons will appear next to phone numbers and emails on the profile record within a patient’s screen. Care users have the freedom to click on these icons to initiate communication with the relevant entities. Clicking on an icon will redirect the user to the comm center, where all standard features, including making and receiving calls, sending SMS, and emails, are available.

Before you begin using the Contacts API, please ensure that your API client is configured with the necessary policies to interact with patient data. Specifically, the "General - My Patients - Read and Update Policy" should be properly set.

## Get All Contacts

> \## Description\
> \
> This endpoint retrieves the contacts associated with a specific patient. By making a GET request to this endpoint, you can retrieve a list of contacts related to the provided patient ID. Contacts may include information such as emergency contacts, primary care providers, or any other relevant individuals associated with the patient.\
> \
> \## Parameters\
> \
> The endpoint requires the following parameters:\
> \
> \- \`{{url}}\`: The base URL of the API.\
> \- \`{{tenantName}}\`: The name of the tenant or organization.\
> \- \`{{instanceName}}\`: The name of the specific instance within the tenant.\
> \- \`{{patientId}}\`: The unique identifier of the patient for whom you want to retrieve the contacts.\
> &#x20;   \
> \
> \## Request Headers\
> \
> The following headers must be included in the request:\
> \
> \- \`Authorization\`: A token or credentials to authenticate the request.\
> \- \`Content-Type\`: The format of the request payload, typically set to \`application/json\`.\
> &#x20;   \
> \
> \## Response\
> \
> The response to a successful request will include a list of contacts associated with the provided patient ID. Each contact may contain various fields, such as name, phone number, email, relationship, and additional details.\
> \
> \## Error Handling\
> \
> If an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests, 401 for unauthorized access, and 404 for not found.\
> \
> \## Authorization\
> \
> Proper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Contact","description":"Communication with patient representatives. This feature is designed to empower customers in facilitating communication between their users and third-party entities associated with patients, such as legal guardians, providers, and relatives. It utilizes the comm center as a means of communication. According to Welkin’s design, these entities should be stored within profiles. To make a profile record contactable, two requirements must be met: 1) it should be linked / added as a contact to a patient, and 2) it should belong to a profile with the “contactable” switch enabled in the Designer, which is introduced as part of the current feature. Once these conditions are fulfilled, communication icons will appear next to phone numbers and emails on the profile record within a patient’s screen. Care users have the freedom to click on these icons to initiate communication with the relevant entities. Clicking on an icon will redirect the user to the comm center, where all standard features, including making and receiving calls, sending SMS, and emails, are available.\n\nBefore you begin using the Contacts API, please ensure that your API client is configured with the necessary policies to interact with patient data. Specifically, the \"General - My Patients - Read and Update Policy\" should be properly set."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}}},"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"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/contacts":{"get":{"summary":"Get All Contacts","tags":["Contact"],"operationId":"Get_All_Contacts","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"pdtRecordId","in":"query","required":false,"description":"","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"## Description\n\nThis endpoint retrieves the contacts associated with a specific patient. By making a GET request to this endpoint, you can retrieve a list of contacts related to the provided patient ID. Contacts may include information such as emergency contacts, primary care providers, or any other relevant individuals associated with the patient.\n\n## Parameters\n\nThe endpoint requires the following parameters:\n\n- `{{url}}`: The base URL of the API.\n- `{{tenantName}}`: The name of the tenant or organization.\n- `{{instanceName}}`: The name of the specific instance within the tenant.\n- `{{patientId}}`: The unique identifier of the patient for whom you want to retrieve the contacts.\n    \n\n## Request Headers\n\nThe following headers must be included in the request:\n\n- `Authorization`: A token or credentials to authenticate the request.\n- `Content-Type`: The format of the request payload, typically set to `application/json`.\n    \n\n## Response\n\nThe response to a successful request will include a list of contacts associated with the provided patient ID. Each contact may contain various fields, such as name, phone number, email, relationship, and additional details.\n\n## Error Handling\n\nIf an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests, 401 for unauthorized access, and 404 for not found.\n\n## Authorization\n\nProper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details."}}}}
```

## Create Contact

> \## Description\
> \
> This endpoint allows you to create a new contact for a specific patient. The contact will be added to the patient's commcenter and can be communicated with. By making a POST request to this endpoint, you can add a contact record from the profile with relevant information such as name, phone number, email, and relationship to the patient.\
> \
> \## Parameters\
> \
> The endpoint requires the following parameters:\
> \
> \- \`{{url}}\`: The base URL of the API.\
> &#x20;   \
> \- \`{{tenantName}}\`: The name of the tenant or organization.\
> &#x20;   \
> \- \`{{instanceName}}\`: The name of the specific instance within the tenant.\
> &#x20;   \
> \- \`{{patientId}}\`: The unique identifier of the patient for whom the contact is being created.\
> &#x20;   \
> \
> \## Request Headers\
> \
> The following headers must be included in the request:\
> \
> \- \`Authorization\`: A token or credentials to authenticate the request.\
> &#x20;   \
> \- \`Content-Type\`: The format of the request payload, typically set to \`application/json\`.\
> &#x20;   \
> \
> \## Request Body\
> \
> The request body should contain the necessary information to create the contact. The required fields may include:\
> \
> \- \`name\`: The name of the contact.\
> &#x20;   \
> \- \`phone\`: The phone number of the contact. (\*\*Note:\*\* when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero)\
> &#x20;   \
> \- \`email\`: The email address of the contact.\
> &#x20;   \
> \- \`relationship\`: The relationship of the contact to the patient.\
> &#x20;   \
> \- pdtRecordId : profile record ID\
> &#x20;   \
> \
> \## Response\
> \
> The response to a successful request will include the newly created contact object, typically with an associated unique identifier.\
> \
> \## Error Handling\
> \
> If an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests and 401 for unauthorized access.\
> \
> \## Authorization\
> \
> Proper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Contact","description":"Communication with patient representatives. This feature is designed to empower customers in facilitating communication between their users and third-party entities associated with patients, such as legal guardians, providers, and relatives. It utilizes the comm center as a means of communication. According to Welkin’s design, these entities should be stored within profiles. To make a profile record contactable, two requirements must be met: 1) it should be linked / added as a contact to a patient, and 2) it should belong to a profile with the “contactable” switch enabled in the Designer, which is introduced as part of the current feature. Once these conditions are fulfilled, communication icons will appear next to phone numbers and emails on the profile record within a patient’s screen. Care users have the freedom to click on these icons to initiate communication with the relevant entities. Clicking on an icon will redirect the user to the comm center, where all standard features, including making and receiving calls, sending SMS, and emails, are available.\n\nBefore you begin using the Contacts API, please ensure that your API client is configured with the necessary policies to interact with patient data. Specifically, the \"General - My Patients - Read and Update Policy\" should be properly set."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}}},"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"}}},"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}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/contacts":{"post":{"summary":"Create Contact","tags":["Contact"],"operationId":"Create_Contact","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"}],"responses":{"201":{"description":"Contact created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"## Description\n\nThis endpoint allows you to create a new contact for a specific patient. The contact will be added to the patient's commcenter and can be communicated with. By making a POST request to this endpoint, you can add a contact record from the profile with relevant information such as name, phone number, email, and relationship to the patient.\n\n## Parameters\n\nThe endpoint requires the following parameters:\n\n- `{{url}}`: The base URL of the API.\n    \n- `{{tenantName}}`: The name of the tenant or organization.\n    \n- `{{instanceName}}`: The name of the specific instance within the tenant.\n    \n- `{{patientId}}`: The unique identifier of the patient for whom the contact is being created.\n    \n\n## Request Headers\n\nThe following headers must be included in the request:\n\n- `Authorization`: A token or credentials to authenticate the request.\n    \n- `Content-Type`: The format of the request payload, typically set to `application/json`.\n    \n\n## Request Body\n\nThe request body should contain the necessary information to create the contact. The required fields may include:\n\n- `name`: The name of the contact.\n    \n- `phone`: The phone number of the contact. (**Note:** when working with patients and fields such as phone, phone must be specified in the international format, E.164 format, without zero)\n    \n- `email`: The email address of the contact.\n    \n- `relationship`: The relationship of the contact to the patient.\n    \n- pdtRecordId : profile record ID\n    \n\n## Response\n\nThe response to a successful request will include the newly created contact object, typically with an associated unique identifier.\n\n## Error Handling\n\nIf an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests and 401 for unauthorized access.\n\n## Authorization\n\nProper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}}}}}}
```

## Get Contact by ID

> \## Description\
> \
> This endpoint retrieves a specific contact associated with a particular patient. By making a GET request to this endpoint, you can retrieve detailed information about a specific contact based on the provided patient ID and contact ID.\
> \
> \## Parameters\
> \
> The endpoint requires the following parameters:\
> \
> \- \`{{url}}\`: The base URL of the API.\
> \- \`{{tenantName}}\`: The name of the tenant or organization.\
> \- \`{{instanceName}}\`: The name of the specific instance within the tenant.\
> \- \`{{patientId}}\`: The unique identifier of the patient associated with the contact.\
> \- \`{{contactId}}\`: The unique identifier of the contact you wish to retrieve.\
> &#x20;   \
> \
> \## Request Headers\
> \
> The following headers must be included in the request:\
> \
> \- \`Authorization\`: A token or credentials to authenticate the request.\
> \- \`Content-Type\`: The format of the request payload, typically set to \`application/json\`.\
> &#x20;   \
> \
> \## Response\
> \
> The response to a successful request will include the detailed information of the requested contact associated with the provided patient ID and contact ID.\
> \
> \## Error Handling\
> \
> If an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests, 401 for unauthorized access, and 404 for not found.\
> \
> \## Authorization\
> \
> Proper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Contact","description":"Communication with patient representatives. This feature is designed to empower customers in facilitating communication between their users and third-party entities associated with patients, such as legal guardians, providers, and relatives. It utilizes the comm center as a means of communication. According to Welkin’s design, these entities should be stored within profiles. To make a profile record contactable, two requirements must be met: 1) it should be linked / added as a contact to a patient, and 2) it should belong to a profile with the “contactable” switch enabled in the Designer, which is introduced as part of the current feature. Once these conditions are fulfilled, communication icons will appear next to phone numbers and emails on the profile record within a patient’s screen. Care users have the freedom to click on these icons to initiate communication with the relevant entities. Clicking on an icon will redirect the user to the comm center, where all standard features, including making and receiving calls, sending SMS, and emails, are available.\n\nBefore you begin using the Contacts API, please ensure that your API client is configured with the necessary policies to interact with patient data. Specifically, the \"General - My Patients - Read and Update Policy\" should be properly set."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"ContactId":{"name":"contactId","in":"path","required":true,"description":"UUID of the contact","schema":{"type":"string","format":"uuid"}}},"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"}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/contacts/{contactId}":{"get":{"summary":"Get Contact by ID","tags":["Contact"],"operationId":"Get_Contact_by_ID","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/ContactId"},{"name":"pdtRecordId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Contact record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"## Description\n\nThis endpoint retrieves a specific contact associated with a particular patient. By making a GET request to this endpoint, you can retrieve detailed information about a specific contact based on the provided patient ID and contact ID.\n\n## Parameters\n\nThe endpoint requires the following parameters:\n\n- `{{url}}`: The base URL of the API.\n- `{{tenantName}}`: The name of the tenant or organization.\n- `{{instanceName}}`: The name of the specific instance within the tenant.\n- `{{patientId}}`: The unique identifier of the patient associated with the contact.\n- `{{contactId}}`: The unique identifier of the contact you wish to retrieve.\n    \n\n## Request Headers\n\nThe following headers must be included in the request:\n\n- `Authorization`: A token or credentials to authenticate the request.\n- `Content-Type`: The format of the request payload, typically set to `application/json`.\n    \n\n## Response\n\nThe response to a successful request will include the detailed information of the requested contact associated with the provided patient ID and contact ID.\n\n## Error Handling\n\nIf an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests, 401 for unauthorized access, and 404 for not found.\n\n## Authorization\n\nProper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details."}}}}
```

## Update Contact

> \## Description\
> \
> This endpoint allows you to update an existing contact associated with a specific patient. By making a PATCH request to this endpoint, you can modify the information of a specific contact based on the provided patient ID and contact ID.\
> \
> \## Parameters\
> \
> The endpoint requires the following parameters:\
> \
> \- \`{{url}}\`: The base URL of the API.\
> \- \`{{tenantName}}\`: The name of the tenant or organization.\
> \- \`{{instanceName}}\`: The name of the specific instance within the tenant.\
> \- \`{{patientId}}\`: The unique identifier of the patient associated with the contact.\
> \- \`{{contactId}}\`: The unique identifier of the contact you wish to update.\
> &#x20;   \
> \
> \## Request Headers\
> \
> The following headers must be included in the request:\
> \
> \- \`Authorization\`: A token or credentials to authenticate the request.\
> \- \`Content-Type\`: The format of the request payload, typically set to \`application/json\`.\
> &#x20;   \
> \
> \## Request Body\
> \
> The request body should contain the updated information for the contact. You can include any fields that need to be modified.\
> \
> \## Response\
> \
> The response to a successful request will include the updated contact object.\
> \
> \## Error Handling\
> \
> If an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests, 401 for unauthorized access, and 404 for not found.\
> \
> \## Authorization\
> \
> Proper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Contact","description":"Communication with patient representatives. This feature is designed to empower customers in facilitating communication between their users and third-party entities associated with patients, such as legal guardians, providers, and relatives. It utilizes the comm center as a means of communication. According to Welkin’s design, these entities should be stored within profiles. To make a profile record contactable, two requirements must be met: 1) it should be linked / added as a contact to a patient, and 2) it should belong to a profile with the “contactable” switch enabled in the Designer, which is introduced as part of the current feature. Once these conditions are fulfilled, communication icons will appear next to phone numbers and emails on the profile record within a patient’s screen. Care users have the freedom to click on these icons to initiate communication with the relevant entities. Clicking on an icon will redirect the user to the comm center, where all standard features, including making and receiving calls, sending SMS, and emails, are available.\n\nBefore you begin using the Contacts API, please ensure that your API client is configured with the necessary policies to interact with patient data. Specifically, the \"General - My Patients - Read and Update Policy\" should be properly set."}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"PatientId":{"name":"patientId","in":"path","required":true,"description":"UUID of the patient record","schema":{"type":"string","format":"uuid"}},"ContactId":{"name":"contactId","in":"path","required":true,"description":"UUID of the contact","schema":{"type":"string","format":"uuid"}}},"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"}}},"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}}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/patients/{patientId}/contacts/{contactId}":{"patch":{"summary":"Update Contact","tags":["Contact"],"operationId":"Update_Contact","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/ContactId"}],"responses":{"200":{"description":"Updated contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}},"description":"## Description\n\nThis endpoint allows you to update an existing contact associated with a specific patient. By making a PATCH request to this endpoint, you can modify the information of a specific contact based on the provided patient ID and contact ID.\n\n## Parameters\n\nThe endpoint requires the following parameters:\n\n- `{{url}}`: The base URL of the API.\n- `{{tenantName}}`: The name of the tenant or organization.\n- `{{instanceName}}`: The name of the specific instance within the tenant.\n- `{{patientId}}`: The unique identifier of the patient associated with the contact.\n- `{{contactId}}`: The unique identifier of the contact you wish to update.\n    \n\n## Request Headers\n\nThe following headers must be included in the request:\n\n- `Authorization`: A token or credentials to authenticate the request.\n- `Content-Type`: The format of the request payload, typically set to `application/json`.\n    \n\n## Request Body\n\nThe request body should contain the updated information for the contact. You can include any fields that need to be modified.\n\n## Response\n\nThe response to a successful request will include the updated contact object.\n\n## Error Handling\n\nIf an error occurs, the response will include an appropriate HTTP status code along with an error message or code to indicate the specific issue encountered. Common error codes include 400 for bad requests, 401 for unauthorized access, and 404 for not found.\n\n## Authorization\n\nProper authorization credentials must be provided in the request headers to access this endpoint. Consult the API documentation or contact the system administrator to obtain the necessary authorization details.","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateRequest"}}}}}}}}
```


---

# 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/contact.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.
