> 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"]},"status":{"type":"string","description":"Contact's workflow status. Defaults to `new` when omitted on create; unsupported values are also treated as `new`.","enum":["new","contacted","in_progress","enrolled","not_interested","inactive","do_not_contact","deceased"]},"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"}}}}}}
```
