curl --request POST \
--url https://api.example.com/v1/leads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"subject": "<string>",
"source_form_name": "<string>",
"source_url": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/v1/leads"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"subject": "<string>",
"source_form_name": "<string>",
"source_url": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
subject: '<string>',
source_form_name: '<string>',
source_url: '<string>',
notes: '<string>'
})
};
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",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'subject' => '<string>',
'source_form_name' => '<string>',
'source_url' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.example.com/v1/leads"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"subject\": \"<string>\",\n \"source_form_name\": \"<string>\",\n \"source_url\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"subject\": \"<string>\",\n \"source_form_name\": \"<string>\",\n \"source_url\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.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)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"subject\": \"<string>\",\n \"source_form_name\": \"<string>\",\n \"source_url\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"form_id": "<string>",
"source_form_name": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"subject": "<string>",
"audience": "student",
"status": "<string>",
"assigned_tutor_id": "<string>",
"source_url": "<string>",
"notes": "<string>",
"converted_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}Create Lead
Capture an inbound lead into your org’s CRM (e.g. a website quote funnel). The
free-form details (name/phone/subject) are stored in the lead’s payload; email,
source_url, notes and a source_form_name snapshot are columns; status starts
at ‘new’. audience (‘student’/‘tutor’/‘parent’) defaults to ‘student’ when omitted.
Honours Idempotency-Key. Requires leads:write (the coarse write umbrella grants
it).
curl --request POST \
--url https://api.example.com/v1/leads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"subject": "<string>",
"source_form_name": "<string>",
"source_url": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/v1/leads"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"subject": "<string>",
"source_form_name": "<string>",
"source_url": "<string>",
"notes": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
subject: '<string>',
source_form_name: '<string>',
source_url: '<string>',
notes: '<string>'
})
};
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",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'subject' => '<string>',
'source_form_name' => '<string>',
'source_url' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.example.com/v1/leads"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"subject\": \"<string>\",\n \"source_form_name\": \"<string>\",\n \"source_url\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"subject\": \"<string>\",\n \"source_form_name\": \"<string>\",\n \"source_url\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.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)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"subject\": \"<string>\",\n \"source_form_name\": \"<string>\",\n \"source_url\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"form_id": "<string>",
"source_form_name": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"subject": "<string>",
"audience": "student",
"status": "<string>",
"assigned_tutor_id": "<string>",
"source_url": "<string>",
"notes": "<string>",
"converted_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}Authorizations
Org API key as Token token=ei_live_...
Headers
Body
POST /v1/leads — capture an inbound lead into the key's org (e.g. a website quote
funnel). name/phone/subject are stored in the lead's free-form payload; email,
source_url, notes and a source_form_name snapshot are columns. organization_id,
form_id, status and timestamps are server-set, never accepted; status starts 'new'.
Lead's full name.
1Lead's email address (required).
Subject of interest, e.g. 'Methods'.
Who this lead is: 'student' (enrolment, the default), 'tutor' (recruitment), or 'parent' (enrolment, on behalf of a student). Omit to use the org_leads column default ('student').
student, tutor, parent Where the lead came from, e.g. 'website quote funnel'.
Response
Successful Response
An inbound lead captured by an org lead form. The free-form payload is
NOT exposed; only a safe subset (name/email/phone/subject) is flattened.
student, tutor, parent Was this page helpful?