Update Lead
curl --request PUT \
--url https://api.buena.ai/api/v2/leads/{leadId} \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"company": "<string>",
"title": "<string>",
"status": "<string>",
"tags": [
{}
],
"customFields": {}
}
'import requests
url = "https://api.buena.ai/api/v2/leads/{leadId}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"company": "<string>",
"title": "<string>",
"status": "<string>",
"tags": [{}],
"customFields": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
email: '<string>',
company: '<string>',
title: '<string>',
status: '<string>',
tags: [{}],
customFields: {}
})
};
fetch('https://api.buena.ai/api/v2/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buena.ai/api/v2/leads/{leadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'lastName' => '<string>',
'email' => '<string>',
'company' => '<string>',
'title' => '<string>',
'status' => '<string>',
'tags' => [
[
]
],
'customFields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.buena.ai/api/v2/leads/{leadId}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"customFields\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.buena.ai/api/v2/leads/{leadId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"customFields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buena.ai/api/v2/leads/{leadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"customFields\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "lead_123abc",
"firstName": "John",
"lastName": "Doe",
"email": "john@techcorp.com",
"company": "Tech Corp",
"title": "Software Engineer",
"status": "contacted",
"tags": ["linkedin-outreach", "responded"],
"customFields": {
"lastContactDate": "2024-01-20",
"responseTime": "2 hours",
"interest": "high"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T15:30:00Z"
}
}
Lead Management
Update Lead
Update existing lead information and status
PUT
/
api
/
v2
/
leads
/
{leadId}
Update Lead
curl --request PUT \
--url https://api.buena.ai/api/v2/leads/{leadId} \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"company": "<string>",
"title": "<string>",
"status": "<string>",
"tags": [
{}
],
"customFields": {}
}
'import requests
url = "https://api.buena.ai/api/v2/leads/{leadId}"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"company": "<string>",
"title": "<string>",
"status": "<string>",
"tags": [{}],
"customFields": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
email: '<string>',
company: '<string>',
title: '<string>',
status: '<string>',
tags: [{}],
customFields: {}
})
};
fetch('https://api.buena.ai/api/v2/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buena.ai/api/v2/leads/{leadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'lastName' => '<string>',
'email' => '<string>',
'company' => '<string>',
'title' => '<string>',
'status' => '<string>',
'tags' => [
[
]
],
'customFields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.buena.ai/api/v2/leads/{leadId}"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"customFields\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.buena.ai/api/v2/leads/{leadId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"customFields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buena.ai/api/v2/leads/{leadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"status\": \"<string>\",\n \"tags\": [\n {}\n ],\n \"customFields\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "lead_123abc",
"firstName": "John",
"lastName": "Doe",
"email": "john@techcorp.com",
"company": "Tech Corp",
"title": "Software Engineer",
"status": "contacted",
"tags": ["linkedin-outreach", "responded"],
"customFields": {
"lastContactDate": "2024-01-20",
"responseTime": "2 hours",
"interest": "high"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T15:30:00Z"
}
}
Update Lead
Modify an existing lead’s contact information, status, tags, or custom fields. Useful for keeping lead data current and tracking engagement progress.Requires the
leads:write permission.Request
The unique identifier of the lead to update
Your API key with
leads:write permissionMust be
application/jsonBody Parameters
Lead’s first name
Lead’s last name
Primary email address
Company name
Job title
Lead status (e.g., “new”, “contacted”, “qualified”, “converted”,
“unqualified”)
Array of tag strings for categorization
Object containing custom field key-value pairs
Examples
Update Lead Status
curl -X PUT "https://api.buena.ai/api/v2/leads/lead_123abc" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "contacted",
"tags": ["linkedin-outreach", "responded"],
"customFields": {
"lastContactDate": "2024-01-20",
"responseTime": "2 hours",
"interest": "high"
}
}'
const response = await fetch("https://api.buena.ai/api/v2/leads/lead_123abc", {
method: "PUT",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
status: "contacted",
tags: ["linkedin-outreach", "responded"],
customFields: {
lastContactDate: "2024-01-20",
responseTime: "2 hours",
interest: "high",
},
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.put(
'https://api.buena.ai/api/v2/leads/lead_123abc',
headers={
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'status': 'contacted',
'tags': ['linkedin-outreach', 'responded'],
'customFields': {
'lastContactDate': '2024-01-20',
'responseTime': '2 hours',
'interest': 'high'
}
}
)
print(response.json())
Response
Always
true for successful requestsThe updated lead object
{
"success": true,
"data": {
"id": "lead_123abc",
"firstName": "John",
"lastName": "Doe",
"email": "john@techcorp.com",
"company": "Tech Corp",
"title": "Software Engineer",
"status": "contacted",
"tags": ["linkedin-outreach", "responded"],
"customFields": {
"lastContactDate": "2024-01-20",
"responseTime": "2 hours",
"interest": "high"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T15:30:00Z"
}
}
Next Steps
List Leads
View all your leads
Delete Lead
Remove a lead
Enrich Lead
Add enriched data
Lead Management
Learn lead management
⌘I

