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

# Update Contact

## Update an existing contact

> Updates an existing contact in the HealthSherpa system. The contact must be owned by the agent specified in the request. Only fields that are included in the request will be updated.<br>

```json
{"openapi":"3.0.3","info":{"title":"HealthSherpa for Medicare Partner API","version":"1.0.0"},"servers":[{"url":"https://api.medicare.healthsherpa.com/v1","description":"Production environment"},{"url":"https://api.medicare-staging.healthsherpa.com/v1","description":"Staging environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key for authentication"}},"schemas":{"Contact":{"type":"object","required":["external_id","first_name","last_name"],"properties":{"external_id":{"type":"string","minLength":1,"maxLength":100,"description":"Your system's unique identifier for this contact. Can be set on create or updated if the current value is null."},"first_name":{"type":"string","description":"Contact's first name","minLength":1,"maxLength":100},"last_name":{"type":"string","description":"Contact's last name","minLength":1,"maxLength":100},"address_1":{"type":"string","description":"Primary address line","minLength":1,"maxLength":100},"address_2":{"type":"string","nullable":true,"description":"Secondary address line","minLength":1,"maxLength":100},"birth_date":{"type":"string","description":"Contact's date of birth","enum":["01-15-1955","01/15/1955","1955-01-15","1955/01/15"]},"city":{"type":"string","description":"City name","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","description":"Contact's email address"},"extra_help":{"type":["boolean","string"],"nullable":true,"description":"Whether the contact receives Extra Help","enum":[true,false,null]},"medicaid_eligible":{"type":["boolean","string"],"nullable":true,"description":"Whether the contact is eligible for Medicaid","enum":[true,false,null]},"medicaid_number":{"type":"string","description":"Contact's Medicaid number"},"medicare_number":{"type":"string","description":"Contact's Medicare number","minLength":1,"maxLength":1000},"medicare_part_a_effective_date":{"type":"string","description":"Medicare Part A effective date","enum":["01-01-2024","01/01/2024","2024-01-01","2024/01/01"]},"medicare_part_b_effective_date":{"type":"string","description":"Medicare Part B effective date","enum":["01-01-2024","01/01/2024","2024-01-01","2024/01/01"]},"notes":{"type":"array","description":"Array of notes about the contact. Each item in the notes array will be added as a note on the contact record. When updating, it will append to the existing notes and not overwrite any of the existing notes.","items":{"type":"string","minLength":1,"maxLength":1000},"minItems":1,"maxItems":50},"phone":{"type":"string","description":"Contact's phone number"},"sex":{"type":"string","description":"Contact's sex","enum":["male","female","M","F","m","f"]},"state":{"type":"string","description":"Two-letter state code"},"type":{"type":"string","description":"Contact type","enum":["client","lead"]},"zip":{"type":"string","description":"ZIP code"},"authorized_representative_name":{"type":"string","description":"Name of the authorized representative","minLength":1,"maxLength":100},"authorized_representative_relationship":{"type":"string","description":"Relationship of the authorized representative to the contact","enum":["natural_child","spouse","mother","father","power_of_attorney","other"]},"authorized_representative_phone_number":{"type":"string","description":"Phone number of the authorized representative"},"authorized_representative_email":{"type":"string","format":"email","description":"Email address of the authorized representative"},"authorized_representative_address":{"type":"string","description":"Street address of the authorized representative","minLength":1,"maxLength":100},"authorized_representative_city":{"type":"string","description":"City of the authorized representative","minLength":1,"maxLength":100},"authorized_representative_state":{"type":"string","description":"Two-letter state code of the authorized representative"},"authorized_representative_zip_code":{"type":"string","description":"ZIP code of the authorized representative"},"mailing_address_street":{"type":"string","description":"Street address for mailing","minLength":1,"maxLength":100},"mailing_address_unit_number":{"type":"string","nullable":true,"description":"Unit number for mailing address","minLength":1,"maxLength":100},"mailing_address_city":{"type":"string","description":"City for mailing address","minLength":1,"maxLength":100},"mailing_address_state":{"type":"string","description":"Two-letter state code for mailing address"},"mailing_address_zip_code":{"type":"string","description":"ZIP code for mailing address"}}},"RedirectUrl":{"type":"string","description":"URL to access the contact's quote page on HealthSherpa"},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code","enum":["invalid_api_key","resource_not_found","validation_error","agent_not_found","unprocessable_entity"]},"details":{"type":"array","description":"Detailed validation errors","items":{"type":"object","properties":{"field":{"type":"string","description":"The field that failed validation"},"message":{"type":"string","description":"The validation error message"}}}}}}}}},"responses":{"ValidationError":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Unauthorized - Invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"AgentNotFound":{"description":"Agent not found or not associated with the agency","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"The request was well-formed but could not be processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/contacts/{contact_id}":{"patch":{"summary":"Update an existing contact","description":"Updates an existing contact in the HealthSherpa system. The contact must be owned by the agent specified in the request. Only fields that are included in the request will be updated.\n","operationId":"updateContact","tags":["Contacts"],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string"},"description":"The HealthSherpa system ID of the contact to update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_email","contact"],"properties":{"agent_email":{"type":"string","format":"email","description":"Email of the agent who owns this contact"},"contact":{"$ref":"#/components/schemas/Contact"}}}}}},"responses":{"200":{"description":"Contact updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"},"redirect_url":{"$ref":"#/components/schemas/RedirectUrl"}}}}}}}},"204":{"description":"No changes were made to the contact","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/AgentNotFound"}]}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"}}}}}}
```


---

# 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.medicare.healthsherpa.com/api-reference/version-1-api-keys/endpoints/update-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.
