---
updatedAt: 2025-09-02T15:15:55.000Z
agentTools:
  projectIndex: https://docs.naxai.com/llms.txt
---

# Add and update contacts using the API

You add and update contacts [using the API.](https://docs.naxai.com/reference/putcontact)\
API requests to add or update contacts must include an **identifier** in the path; you can also include identifiers in the request payload.

You add or update a person depending on whether or not the identifier value in your request belongs to an existing person.

* **Add a contact**: If the identifier in your request path doesn't belong to an existing contact, your request adds a new contact.
* **Update a contact**: If the identifier in your request path belongs to a contact, your request updates that contact.\
  Note that if, in the payload, the identifier is used with a different value, then the contact will be updated, and his/her identifier will be changed to the identifier provided in the body.

The example below shows how to change the email address of a contact when it is the identifier.

![](https://files.readme.io/75c2065-image.png)