Update a Lead
curl --request PUT \
--url https://api.example.com/v1/leads/:idimport requests
url = "https://api.example.com/v1/leads/:id"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/leads/:id', 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.example.com/v1/leads/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/leads/:id"
req, _ := http.NewRequest("PUT", url, nil)
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.example.com/v1/leads/:id")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/leads/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyLeads
Update a Lead
Updates the specified lead with the provided fields.
PUT
/
v1
/
leads
/
:id
Update a Lead
curl --request PUT \
--url https://api.example.com/v1/leads/:idimport requests
url = "https://api.example.com/v1/leads/:id"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/leads/:id', 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.example.com/v1/leads/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/leads/:id"
req, _ := http.NewRequest("PUT", url, nil)
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.example.com/v1/leads/:id")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/leads/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyUpdate a Lead
Updates the specified lead with the provided fields. Only the fields you include in the request body will be updated (partial update).Request
PUT /v1/leads/:id
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | The unique identifier of the lead |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | No | First name |
last_name | string | No | Last name |
email | string | No | Email address |
phone | string | No | Phone number in E.164 format |
company_name | string | No | Company name |
title | string | No | Job title |
status | string | No | Lead status |
call_outcome | string | No | Call outcome disposition |
notes | string | No | Free-text notes |
custom_variables | object | No | Custom key-value data |
Only include the fields you want to update. Omitted fields will remain unchanged.
Example
curl -X PUT \
"https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/leads/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer rchd_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"title": "CRO",
"notes": "Interested in Q2 demo"
}'
const leadId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
const response = await fetch(
`https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/leads/${leadId}`,
{
method: "PUT",
headers: {
"Authorization": "Bearer rchd_live_xxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
title: "CRO",
notes: "Interested in Q2 demo"
})
}
);
const { data } = await response.json();
import requests
lead_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.put(
f"https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/leads/{lead_id}",
headers={
"Authorization": "Bearer rchd_live_xxxxxxxxxxxx",
"Content-Type": "application/json"
},
json={
"title": "CRO",
"notes": "Interested in Q2 demo"
}
)
data = response.json()
Response
{
"data": {
"id": "a1b2c3d4-...",
"first_name": "John",
"last_name": "Doe",
"title": "CRO",
"notes": "Interested in Q2 demo",
"updated_at": "2026-03-21T11:00:00.000Z"
}
}
.png?fit=max&auto=format&n=PYj-p9lRwfHX4QQS&q=85&s=967f00940a17d1d8cc11bd8995dc98d0)
.png?fit=max&auto=format&n=PYj-p9lRwfHX4QQS&q=85&s=5072033d90dfd5e7cc9349712ea4e145)