Patch User API
Make a PATCH request to update user information for existing users in Village.
For detailed use cases and more advanced features, visit the Village Postman collection to explore the endpoints and possible implementations.
When to use Patch User vs User Status?
User Status API is primarily for creating users, and allows you to add key user information when creating them
The Patch User API to update personal and contact information of existing users
NOTE: Editing other user data requires the use of case-specific APIs, such as editing referral connections or changing segment memberships
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.
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.
Headers
As with all other Village API endpoints, the usual headers are required authenticate the PATCH request. See details in API Introduction.
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:
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
Update user details following a name change
Change the contact phone number if the previous one is no longer in use.
Last updated