Skip to main content
POST
/
v1
/
leads
Lead
curl --request POST \
  --url https://api.example.com/v1/leads
import 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_body

Create 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

ParameterTypeRequiredDescription
first_namestringNoFirst name of the lead
last_namestringNoLast name of the lead
emailstringConditionalEmail address (required if no phone)
phonestringConditionalPhone number in E.164 format (required if no email)
company_namestringNoCompany or organization name
titlestringNoJob title
linkedin_urlstringNoLinkedIn profile URL
company_websitestringNoCompany website URL
job_descriptionstringNoJob description or role details
company_sizestringNoCompany size range (e.g., “11-50”)
custom_variablesobjectNoKey-value pairs for custom data
metadataobjectNoAdditional 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

{
  "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"
  }
}