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

# Patient Program

## Get Patient's Program by name (for active only)

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/programs\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Patient program","description":""}],"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":{"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"]}},"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}/programs/current/{prog_name}":{"get":{"summary":"Get Patient's Program by name (for active only)","tags":["Patient program"],"operationId":"Get_Patient_s_Program_by_name_for_active_only","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"prog_name","in":"path","required":true,"description":"`prog_name` path parameter","schema":{"type":"string"}},{"name":"assignedPrograms","in":"query","required":false,"schema":{"type":"boolean"},"description":"Assigned or unassigned programs"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"}],"responses":{"200":{"description":"Active patient program","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProgram"}}}},"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":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/programs`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Get Patient's Program by ID (active and finished)

> \### HTTP Request\
> \
> \*\*\*GET\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/programs\`\
> \
> in our example it would be:\
> \
> \*\*\*GET\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Patient program","description":""}],"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":{"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"]}},"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}/programs/history/{prog_id}":{"get":{"summary":"Get Patient's Program by ID (active and finished)","tags":["Patient program"],"operationId":"Get_Patient_s_Program_by_ID_active_and_finished","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"name":"prog_id","in":"path","required":true,"description":"`prog_id` path parameter","schema":{"type":"string","format":"uuid"}},{"name":"assignedPrograms","in":"query","required":false,"schema":{"type":"boolean"},"description":"Assigned or unassigned programs"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination: page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Pagination: page size"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field with sorting order(asc or desc) after coma"}],"responses":{"200":{"description":"Patient program enrollment record (active or finished)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProgram"}}}},"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":"### HTTP Request\n\n***GET*** `/{tenantName}/{instanceName}/patients/{patientId}/programs`\n\nin our example it would be:\n\n***GET*** `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |"}}}}
```

## Unassign Patient from Program

> \### HTTP Request\
> \
> \*\*\*DELETE\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/programs/{programId}\`\
> \
> in our example it would be:\
> \
> \*\*\*DELETE\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs/11132f11-cb33-4b5b-aece-abc125fed987\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 200 | OK |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |\
> \
> \*\*Note:\*\* the backend resolves this by patient-program enrollment ID, not by program name — confirm the exact identifier your gateway expects before relying on this path shape.

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Patient program","description":""}],"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"}},"ProgramName":{"name":"programName","in":"path","required":true,"description":"Machine-readable program name","schema":{"type":"string"}}},"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}/programs/{programName}":{"delete":{"summary":"Unassign Patient from Program","tags":["Patient program"],"operationId":"Unassign_Patient_from_Program","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/ProgramName"}],"responses":{"200":{"description":"Patient unassigned from program"},"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":"### HTTP Request\n\n***DELETE*** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programId}`\n\nin our example it would be:\n\n***DELETE*** `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs/11132f11-cb33-4b5b-aece-abc125fed987`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 200 | OK |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |\n\n**Note:** the backend resolves this by patient-program enrollment ID, not by program name — confirm the exact identifier your gateway expects before relying on this path shape."}}}}
```

## Update Patient Program status and assign Program

> \### HTTP Request\
> \
> \*\*\*PATCH\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}\`\
> \
> in our example it would be:\
> \
> \*\*\*PATCH\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs/prog-4\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 201 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Patient program","description":""}],"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"}},"ProgramName":{"name":"programName","in":"path","required":true,"description":"Machine-readable program name","schema":{"type":"string"}}},"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"]},"PatientProgramUpdateRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PatientProgramStatus"},"assigned":{"type":"boolean"},"phaseName":{"type":"string"}}}},"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}/programs/{programName}":{"patch":{"summary":"Update Patient Program status and assign Program","tags":["Patient program"],"operationId":"Update_Patient_Program_status_and_assign_Program","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/ProgramName"}],"responses":{"200":{"description":"Updated patient program","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProgram"}}}},"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":"### HTTP Request\n\n***PATCH*** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}`\n\nin our example it would be:\n\n***PATCH*** `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs/prog-4`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 201 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProgramUpdateRequest"}}}}}}}}
```

## Change Phase for Patient Program

> \### HTTP Request\
> \
> \*\*\*PATCH\*\*\* \`/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}/phases\`\
> \
> in our example it would be:\
> \
> \*\*\*PATCH\*\*\* \`<https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs/lead-management-program/phases\\`\\>
> \
> \*\*Responses\*\*\
> \
> \| Code | Description |\
> \| --- | --- |\
> \| 201 | Created |\
> \| 401 | Unauthorized |\
> \| 403 | Forbidden |\
> \| 404 | Not Found |

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Patient program","description":""}],"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"}},"ProgramName":{"name":"programName","in":"path","required":true,"description":"Machine-readable program name","schema":{"type":"string"}}},"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"]},"PatientProgramPhaseNavigateRequest":{"type":"object","required":["phaseName"],"properties":{"phaseName":{"type":"string"}}}},"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}/programs/{programName}/phases":{"patch":{"summary":"Change Phase for Patient Program","tags":["Patient program"],"operationId":"Change_Phase_for_Patient_Program","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/PatientId"},{"$ref":"#/components/parameters/ProgramName"}],"responses":{"200":{"description":"Updated patient program after phase change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProgram"}}}},"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":"### HTTP Request\n\n***PATCH*** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}/phases`\n\nin our example it would be:\n\n***PATCH*** `https://api.live.welkincloud.io/gh/sb-demo/patients/08632f11-cb33-4b5b-aece-aaa360f9f747/programs/lead-management-program/phases`\n\n**Responses**\n\n| Code | Description |\n| --- | --- |\n| 201 | Created |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not Found |","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProgramPhaseNavigateRequest"}}}}}}}}
```


---

# 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/patient-program.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.
