Update a contact by ID
Modify an existing contact in your OpenPhone workspace using the contact’s unique identifier.
curl --request PATCH \
--url https://api.openphone.com/v1/contacts/{id} \
--header 'Content-Type: application/json' \
--data '{
"externalId": "664d0db69fcac7cf2e6ec",
"source": "public-api",
"defaultFields": {
"company": "OpenPhone",
"emails": [
{
"name": "company email",
"value": "[email protected]",
"id": "acb123"
}
],
"firstName": "John",
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+15555555555",
"id": "acb123"
}
],
"role": "Sales"
},
"customFields": [
{
"key": "inbound-lead",
"id": "66d0d87d534de8fd1c433cec3",
"value": [
"option1",
"option2"
]
}
]
}'
{
"data": {
"id": "664d0db69fcac7cf2e6ec",
"externalId": "664d0db69fcac7cf2e6ec",
"source": "public-api",
"defaultFields": {
"company": "OpenPhone",
"emails": [
{
"name": "company email",
"value": "[email protected]",
"id": "acb123"
}
],
"firstName": "John",
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+12345678901",
"id": "acb123"
}
],
"role": "Sales"
},
"customFields": [
{
"name": "Inbound Lead",
"key": "inbound-lead",
"type": "multi-select",
"value": [
"option1",
"option2"
]
}
],
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"createdByUserId": "US123abc"
}
}
Path Parameters
The unique identifier of the contact.
Body
An external identifier of the contact.
1 - 75
Indicates how the contact was created or where it originated from.
1 - 75
The contact's company name.
The name for the contact's email address.
The contact's email address. If set to null during a patch operation, it will remove the email item from the contact.
The unique identifier for the contact email field.
The contact's first name.
The contact's last name.
The name of the contact's phone number.
The contact's phone number. If set to null during a patch operation, it will remove the phone number item from the contact.
The unique identifier of the contact phone number field.
The contact's role.
Response
The unique identifier of the contact.
An external identifier of the contact.
1 - 75
Indicates how the contact was created or where it originated from.
1 - 75
The contact's company name.
The contact's first name.
The contact's last name.
The contact's role.
The name of the custom contact field. This name is set by users in the OpenPhone interface when the custom field is created.
multi-select
Value defined for the multi select type custom field.
The identifying key for contact custom field.
Timestamp of contact creation in ISO 8601 format.
Timestamp of last contact update in ISO 8601 format.
The unique identifier of the user who created the contact.
Was this page helpful?
curl --request PATCH \
--url https://api.openphone.com/v1/contacts/{id} \
--header 'Content-Type: application/json' \
--data '{
"externalId": "664d0db69fcac7cf2e6ec",
"source": "public-api",
"defaultFields": {
"company": "OpenPhone",
"emails": [
{
"name": "company email",
"value": "[email protected]",
"id": "acb123"
}
],
"firstName": "John",
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+15555555555",
"id": "acb123"
}
],
"role": "Sales"
},
"customFields": [
{
"key": "inbound-lead",
"id": "66d0d87d534de8fd1c433cec3",
"value": [
"option1",
"option2"
]
}
]
}'
{
"data": {
"id": "664d0db69fcac7cf2e6ec",
"externalId": "664d0db69fcac7cf2e6ec",
"source": "public-api",
"defaultFields": {
"company": "OpenPhone",
"emails": [
{
"name": "company email",
"value": "[email protected]",
"id": "acb123"
}
],
"firstName": "John",
"lastName": "Doe",
"phoneNumbers": [
{
"name": "company phone",
"value": "+12345678901",
"id": "acb123"
}
],
"role": "Sales"
},
"customFields": [
{
"name": "Inbound Lead",
"key": "inbound-lead",
"type": "multi-select",
"value": [
"option1",
"option2"
]
}
],
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"createdByUserId": "US123abc"
}
}