Lead
curl --request POST \
--url https://api.example.com/v1/leadsimport requests
url = "https://api.example.com/v1/leads"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/leads', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/leads")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyLeads
Lead
Creates a new lead in your workspace.
POST
/
v1
/
leads
Lead
curl --request POST \
--url https://api.example.com/v1/leadsimport requests
url = "https://api.example.com/v1/leads"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/leads', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/leads")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreate a Lead
Creates a new lead in your workspace. At least a phone number or email address is required.Request
POST /v1/leads
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | No | First name of the lead |
last_name | string | No | Last name of the lead |
email | string | Conditional | Email address (required if no phone) |
phone | string | Conditional | Phone number in E.164 format (required if no email) |
company_name | string | No | Company or organization name |
title | string | No | Job title |
linkedin_url | string | No | LinkedIn profile URL |
company_website | string | No | Company website URL |
job_description | string | No | Job description or role details |
company_size | string | No | Company size range (e.g., “11-50”) |
custom_variables | object | No | Key-value pairs for custom data |
metadata | object | No | Additional metadata as JSON |
At least one of
phone or email must be provided. Phone numbers should be in E.164 format (e.g., +33612345678).Example
curl -X POST \
"https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/leads" \
-H "Authorization: Bearer rchd_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john@acme.com",
"phone": "+33612345678",
"company_name": "Acme Corp",
"title": "VP Sales"
}'
const response = await fetch(
"https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/leads",
{
method: "POST",
headers: {
"Authorization": "Bearer rchd_live_xxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
first_name: "John",
last_name: "Doe",
email: "john@acme.com",
phone: "+33612345678",
company_name: "Acme Corp",
title: "VP Sales"
})
}
);
const data = await response.json();
import requests
response = requests.post(
"https://kdjmltmhxvvmiuehafgl.supabase.co/functions/v1/api-gateway/v1/leads",
headers={
"Authorization": "Bearer rchd_live_xxxxxxxxxxxx",
"Content-Type": "application/json"
},
json={
"first_name": "John",
"last_name": "Doe",
"email": "john@acme.com",
"phone": "+33612345678",
"company_name": "Acme Corp",
"title": "VP Sales"
}
)
data = response.json()
Response
- 201 Created
- 400 Bad Request
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"first_name": "John",
"last_name": "Doe",
"email": "john@acme.com",
"phone": "+33612345678",
"company_name": "Acme Corp",
"title": "VP Sales",
"status": "pending",
"source": "api",
"created_at": "2026-03-21T10:00:00.000Z"
}
}
{
"error": {
"code": "bad_request",
"message": "At least phone or email is required"
}
}
⌘I
.png?fit=max&auto=format&n=PYj-p9lRwfHX4QQS&q=85&s=967f00940a17d1d8cc11bd8995dc98d0)
.png?fit=max&auto=format&n=PYj-p9lRwfHX4QQS&q=85&s=5072033d90dfd5e7cc9349712ea4e145)