For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETList Contacts
      • POSTCreate Contact
      • GETGet Contact
      • DELDelete Contact
      • PATCHUpdate Contact
LogoLogo
HomeGet API key
API Referencecontacts

Update Contact

PATCH
https://api.agentphone.ai/v1/contacts/:contact_id
PATCH
/v1/contacts/:contact_id
1const url = 'https://api.agentphone.ai/v1/contacts/contact_id';
2const options = {
3 method: 'PATCH',
4 headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5 body: '{}'
6};
7
8try {
9 const response = await fetch(url, options);
10 const data = await response.json();
11 console.log(data);
12} catch (error) {
13 console.error(error);
14}
1{
2 "id": "c3f1a9e2-8b4d-4f7a-9d3e-2a1b5f6c7d8e",
3 "phoneNumber": "+14155552671",
4 "name": "Jane Doe",
5 "createdAt": "2024-01-15T09:30:00Z",
6 "updatedAt": "2024-01-15T09:30:00Z",
7 "email": "jane.doe@example.com",
8 "notes": "Met at the conference in 2023."
9}

Update a contact’s fields.

If phoneNumber is updated, it’s re-normalized and checked for uniqueness (409 on conflict).

Was this page helpful?
Previous

List Conversations

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

contact_idstringRequired

Request

This endpoint expects an object.
phoneNumberstring or nullOptional
namestring or nullOptional
emailstring or nullOptional
notesstring or nullOptional

Response

Successful Response
idstring
phoneNumberstring
namestring
createdAtdatetime
updatedAtdatetime
emailstring or null
notesstring or null

Errors

422
Unprocessable Entity Error