> For the complete documentation index, see [llms.txt](https://village-labs.gitbook.io/coworker-product-and-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://village-labs.gitbook.io/coworker-product-and-developer-docs/legacy-developer-docs/village-apis-introduction/patch-user-api.md).

# Patch User API

Make a PATCH request to update user information for existing users in Village.

{% hint style="info" %}
For detailed use cases and more advanced features, visit the [Village Postman collection](https://www.postman.com/village-labs/workspace/village-api-development/overview) to explore the endpoints and possible implementations.
{% endhint %}

{% hint style="warning" %}
**When to use Patch User vs User Status?**&#x20;

1. User Status API is primarily for creating users, and allows you to add key user information when creating them
2. The Patch User API to update personal and contact information of existing users
3. **NOTE:** Editing other user data requires the use of case-specific APIs, such as [editing referral connections](/coworker-product-and-developer-docs/legacy-developer-docs/village-apis-introduction/connections-referrals-apis.md) or [changing segment memberships](/coworker-product-and-developer-docs/legacy-developer-docs/village-apis-introduction/segments-api.md)
   {% endhint %}

Make a PATCH request to the Patch User API update basic user information for existing users in the Village System. Examples of data that can be updated are first name, last name, and contact phone number. It is a secure and efficient way to keep user information up-to-date.&#x20;

### Endpoint Path

PATCH <https://app.villagelabs.net/networks/{network\\_id}/users/{user\\_email}>

Replace `{network_id}` with your actual Network ID and `{user_email}` with the email of the user you want to update. These can be found in the Admin Dashboard.&#x20;

### Headers

As with all other Village API endpoints, the usual headers are required authenticate the PATCH request.  See details in [API Introduction](/coworker-product-and-developer-docs/legacy-developer-docs/village-apis-introduction.md).

| Header        | Value            |
| ------------- | ---------------- |
| Content-Type  | application/json |
| Accept        | application/json |
| Authorization | `Bearer API_KEY` |

### Request Example

To update a user's information, make a PATCH request to the endpoint with a JSON body containing the new data.

#### JSON Body:

```
{
    "first_name": "NewFirstName",
    "last_name": "NewLastName",
    "phone_number": "+15555555555"
}
```

Replace `NewFirstName` and `NewLastName` with the updated first and last names of the user, and `+1 555 555 5555` with the user's new contact phone number.

### Body Fields

* `first_name` - The new first name of the user.
* `last_name` - The new last name of the user.
* `phone_number` - The new contact phone number for the user, in international format.

### Use Cases

This API is particularly useful when you need to:

* Backfill existing users' name or contact information
* Correct user information&#x20;
* Update user details following a name change
* Change the contact phone number if the previous one is no longer in use.

<br>


---

# 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://village-labs.gitbook.io/coworker-product-and-developer-docs/legacy-developer-docs/village-apis-introduction/patch-user-api.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.
