Contacts
Update a contact
Updates only the fields you send.
One of email, phone or linkedinUrl is required — without one there is no way to recognise this person again. Creating someone who already exists returns the existing contact rather than a duplicate, and a contact created here is the same person a lead with that email resolves to.
PATCH
/
contacts
/
{id}
Update a contact
curl --request PATCH \
--url https://backend.leadey.ai/v1/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"fullName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"linkedinUrl": "<string>",
"currentTitle": "<string>",
"currentCompany": "<string>",
"masterCompanyId": "<string>",
"location": "<string>"
}
'import requests
url = "https://backend.leadey.ai/v1/contacts/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"fullName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"linkedinUrl": "<string>",
"currentTitle": "<string>",
"currentCompany": "<string>",
"masterCompanyId": "<string>",
"location": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
fullName: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
linkedinUrl: '<string>',
currentTitle: '<string>',
currentCompany: '<string>',
masterCompanyId: '<string>',
location: '<string>'
})
};
fetch('https://backend.leadey.ai/v1/contacts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"fullName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"title": "<string>",
"company": "<string>",
"email": "<string>",
"emailStatus": "<string>",
"phone": "<string>",
"phoneStatus": "<string>",
"linkedinUrl": "<string>",
"location": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "One of email, phone or linkedinUrl is required",
"details": null
}
}{
"error": {
"message": "Invalid or revoked API key.",
"details": null
}
}{
"error": {
"message": "This API key is read-only. Create a key with write access in Settings → API Keys.",
"details": null
}
}{
"error": {
"message": "Lead not found",
"details": null
}
}Authorizations
Your API key, created in the Leadey dashboard under Settings → API Keys. Send it as Authorization: Bearer leadey_sk_live_….
Path Parameters
Body
application/json
Response
Success
Show child attributes
Show child attributes
⌘I
Update a contact
curl --request PATCH \
--url https://backend.leadey.ai/v1/contacts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"fullName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"linkedinUrl": "<string>",
"currentTitle": "<string>",
"currentCompany": "<string>",
"masterCompanyId": "<string>",
"location": "<string>"
}
'import requests
url = "https://backend.leadey.ai/v1/contacts/{id}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"fullName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"linkedinUrl": "<string>",
"currentTitle": "<string>",
"currentCompany": "<string>",
"masterCompanyId": "<string>",
"location": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
fullName: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
linkedinUrl: '<string>',
currentTitle: '<string>',
currentCompany: '<string>',
masterCompanyId: '<string>',
location: '<string>'
})
};
fetch('https://backend.leadey.ai/v1/contacts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"fullName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"title": "<string>",
"company": "<string>",
"email": "<string>",
"emailStatus": "<string>",
"phone": "<string>",
"phoneStatus": "<string>",
"linkedinUrl": "<string>",
"location": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "One of email, phone or linkedinUrl is required",
"details": null
}
}{
"error": {
"message": "Invalid or revoked API key.",
"details": null
}
}{
"error": {
"message": "This API key is read-only. Create a key with write access in Settings → API Keys.",
"details": null
}
}{
"error": {
"message": "Lead not found",
"details": null
}
}