Créer un prospect
curl --request POST \
--url https://api.setteo.io/v1/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ext_id": "crm_123",
"first_name": "Jean",
"last_name": "Dupont",
"username": "jdupont",
"image": "https://example.com/avatar.jpg",
"email": "jean.dupont@example.com",
"phone": "+33612345678",
"source": "api",
"warmth": "warm",
"pipeline_stage": "qualified",
"data": {
"company": "Acme Corp"
},
"variables": {
"plan": "pro"
},
"enrolled_at": "2026-07-08T12:00:00Z",
"whatsapp_phone_number_id": 12,
"tag_ids": [
1,
2
]
}
'import requests
url = "https://api.setteo.io/v1/leads"
payload = {
"ext_id": "crm_123",
"first_name": "Jean",
"last_name": "Dupont",
"username": "jdupont",
"image": "https://example.com/avatar.jpg",
"email": "jean.dupont@example.com",
"phone": "+33612345678",
"source": "api",
"warmth": "warm",
"pipeline_stage": "qualified",
"data": { "company": "Acme Corp" },
"variables": { "plan": "pro" },
"enrolled_at": "2026-07-08T12:00:00Z",
"whatsapp_phone_number_id": 12,
"tag_ids": [1, 2]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ext_id: 'crm_123',
first_name: 'Jean',
last_name: 'Dupont',
username: 'jdupont',
image: 'https://example.com/avatar.jpg',
email: 'jean.dupont@example.com',
phone: '+33612345678',
source: 'api',
warmth: 'warm',
pipeline_stage: 'qualified',
data: {company: 'Acme Corp'},
variables: {plan: 'pro'},
enrolled_at: '2026-07-08T12:00:00Z',
whatsapp_phone_number_id: 12,
tag_ids: [1, 2]
})
};
fetch('https://api.setteo.io/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.setteo.io/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([
'ext_id' => 'crm_123',
'first_name' => 'Jean',
'last_name' => 'Dupont',
'username' => 'jdupont',
'image' => 'https://example.com/avatar.jpg',
'email' => 'jean.dupont@example.com',
'phone' => '+33612345678',
'source' => 'api',
'warmth' => 'warm',
'pipeline_stage' => 'qualified',
'data' => [
'company' => 'Acme Corp'
],
'variables' => [
'plan' => 'pro'
],
'enrolled_at' => '2026-07-08T12:00:00Z',
'whatsapp_phone_number_id' => 12,
'tag_ids' => [
1,
2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.setteo.io/v1/leads"
payload := strings.NewReader("{\n \"ext_id\": \"crm_123\",\n \"first_name\": \"Jean\",\n \"last_name\": \"Dupont\",\n \"username\": \"jdupont\",\n \"image\": \"https://example.com/avatar.jpg\",\n \"email\": \"jean.dupont@example.com\",\n \"phone\": \"+33612345678\",\n \"source\": \"api\",\n \"warmth\": \"warm\",\n \"pipeline_stage\": \"qualified\",\n \"data\": {\n \"company\": \"Acme Corp\"\n },\n \"variables\": {\n \"plan\": \"pro\"\n },\n \"enrolled_at\": \"2026-07-08T12:00:00Z\",\n \"whatsapp_phone_number_id\": 12,\n \"tag_ids\": [\n 1,\n 2\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.setteo.io/v1/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ext_id\": \"crm_123\",\n \"first_name\": \"Jean\",\n \"last_name\": \"Dupont\",\n \"username\": \"jdupont\",\n \"image\": \"https://example.com/avatar.jpg\",\n \"email\": \"jean.dupont@example.com\",\n \"phone\": \"+33612345678\",\n \"source\": \"api\",\n \"warmth\": \"warm\",\n \"pipeline_stage\": \"qualified\",\n \"data\": {\n \"company\": \"Acme Corp\"\n },\n \"variables\": {\n \"plan\": \"pro\"\n },\n \"enrolled_at\": \"2026-07-08T12:00:00Z\",\n \"whatsapp_phone_number_id\": 12,\n \"tag_ids\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.setteo.io/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ext_id\": \"crm_123\",\n \"first_name\": \"Jean\",\n \"last_name\": \"Dupont\",\n \"username\": \"jdupont\",\n \"image\": \"https://example.com/avatar.jpg\",\n \"email\": \"jean.dupont@example.com\",\n \"phone\": \"+33612345678\",\n \"source\": \"api\",\n \"warmth\": \"warm\",\n \"pipeline_stage\": \"qualified\",\n \"data\": {\n \"company\": \"Acme Corp\"\n },\n \"variables\": {\n \"plan\": \"pro\"\n },\n \"enrolled_at\": \"2026-07-08T12:00:00Z\",\n \"whatsapp_phone_number_id\": 12,\n \"tag_ids\": [\n 1,\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"ext_id": "crm_123",
"first_name": "Jean",
"last_name": "Dupont",
"username": "jdupont",
"image": "https://example.com/avatar.jpg",
"email": "jean.dupont@example.com",
"phone": "+33612345678",
"source": "api",
"warmth": "warm",
"pipeline_stage": "qualified",
"is_optout": false,
"variables": {
"plan": "pro"
},
"whatsapp_phone_number_id": 12,
"age": 34,
"occupation_status": "self_employed",
"maturity_level": "advanced",
"engagement_level": "high",
"is_lost": false,
"lost_reason": "price_objection",
"profile_extracted_at": "2026-07-08T12:00:00Z",
"profile": {
"professional_situation": "Dirige une agence de deux personnes.",
"primary_objective": "Doubler le nombre de leads entrants.",
"blockers": [
"Pas de budget avant le T4"
],
"levers": [
"Utilise déjà un CRM"
],
"verbatim": "On en reparle en octobre.",
"lost_reason_detail": "Budget gelé jusqu’au prochain exercice."
},
"created_at": "2026-07-08T12:00:00Z",
"updated_at": "2026-07-08T12:00:00Z",
"tags": [
{
"id": 1,
"label": "Prospect chaud",
"description": "Prospect prêt à réserver un appel.",
"pipeline_stage": "qualified",
"created_at": "2026-07-08T12:00:00Z",
"updated_at": "2026-07-08T12:00:00Z"
}
],
"conversations": [
{
"id": 456,
"platform": "whatsapp",
"last_inbound_at": "2026-07-08T12:00:00Z",
"last_outbound_at": "2026-07-08T12:05:00Z",
"summary": "Le prospect demande un devis et souhaite démarrer en septembre.",
"summary_generated_at": "2026-07-08T12:10:00Z",
"messages_count": 12
}
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}Prospects
Créer un prospect
Crée un prospect.
POST
/
v1
/
leads
Créer un prospect
curl --request POST \
--url https://api.setteo.io/v1/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ext_id": "crm_123",
"first_name": "Jean",
"last_name": "Dupont",
"username": "jdupont",
"image": "https://example.com/avatar.jpg",
"email": "jean.dupont@example.com",
"phone": "+33612345678",
"source": "api",
"warmth": "warm",
"pipeline_stage": "qualified",
"data": {
"company": "Acme Corp"
},
"variables": {
"plan": "pro"
},
"enrolled_at": "2026-07-08T12:00:00Z",
"whatsapp_phone_number_id": 12,
"tag_ids": [
1,
2
]
}
'import requests
url = "https://api.setteo.io/v1/leads"
payload = {
"ext_id": "crm_123",
"first_name": "Jean",
"last_name": "Dupont",
"username": "jdupont",
"image": "https://example.com/avatar.jpg",
"email": "jean.dupont@example.com",
"phone": "+33612345678",
"source": "api",
"warmth": "warm",
"pipeline_stage": "qualified",
"data": { "company": "Acme Corp" },
"variables": { "plan": "pro" },
"enrolled_at": "2026-07-08T12:00:00Z",
"whatsapp_phone_number_id": 12,
"tag_ids": [1, 2]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ext_id: 'crm_123',
first_name: 'Jean',
last_name: 'Dupont',
username: 'jdupont',
image: 'https://example.com/avatar.jpg',
email: 'jean.dupont@example.com',
phone: '+33612345678',
source: 'api',
warmth: 'warm',
pipeline_stage: 'qualified',
data: {company: 'Acme Corp'},
variables: {plan: 'pro'},
enrolled_at: '2026-07-08T12:00:00Z',
whatsapp_phone_number_id: 12,
tag_ids: [1, 2]
})
};
fetch('https://api.setteo.io/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.setteo.io/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([
'ext_id' => 'crm_123',
'first_name' => 'Jean',
'last_name' => 'Dupont',
'username' => 'jdupont',
'image' => 'https://example.com/avatar.jpg',
'email' => 'jean.dupont@example.com',
'phone' => '+33612345678',
'source' => 'api',
'warmth' => 'warm',
'pipeline_stage' => 'qualified',
'data' => [
'company' => 'Acme Corp'
],
'variables' => [
'plan' => 'pro'
],
'enrolled_at' => '2026-07-08T12:00:00Z',
'whatsapp_phone_number_id' => 12,
'tag_ids' => [
1,
2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.setteo.io/v1/leads"
payload := strings.NewReader("{\n \"ext_id\": \"crm_123\",\n \"first_name\": \"Jean\",\n \"last_name\": \"Dupont\",\n \"username\": \"jdupont\",\n \"image\": \"https://example.com/avatar.jpg\",\n \"email\": \"jean.dupont@example.com\",\n \"phone\": \"+33612345678\",\n \"source\": \"api\",\n \"warmth\": \"warm\",\n \"pipeline_stage\": \"qualified\",\n \"data\": {\n \"company\": \"Acme Corp\"\n },\n \"variables\": {\n \"plan\": \"pro\"\n },\n \"enrolled_at\": \"2026-07-08T12:00:00Z\",\n \"whatsapp_phone_number_id\": 12,\n \"tag_ids\": [\n 1,\n 2\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.setteo.io/v1/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ext_id\": \"crm_123\",\n \"first_name\": \"Jean\",\n \"last_name\": \"Dupont\",\n \"username\": \"jdupont\",\n \"image\": \"https://example.com/avatar.jpg\",\n \"email\": \"jean.dupont@example.com\",\n \"phone\": \"+33612345678\",\n \"source\": \"api\",\n \"warmth\": \"warm\",\n \"pipeline_stage\": \"qualified\",\n \"data\": {\n \"company\": \"Acme Corp\"\n },\n \"variables\": {\n \"plan\": \"pro\"\n },\n \"enrolled_at\": \"2026-07-08T12:00:00Z\",\n \"whatsapp_phone_number_id\": 12,\n \"tag_ids\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.setteo.io/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ext_id\": \"crm_123\",\n \"first_name\": \"Jean\",\n \"last_name\": \"Dupont\",\n \"username\": \"jdupont\",\n \"image\": \"https://example.com/avatar.jpg\",\n \"email\": \"jean.dupont@example.com\",\n \"phone\": \"+33612345678\",\n \"source\": \"api\",\n \"warmth\": \"warm\",\n \"pipeline_stage\": \"qualified\",\n \"data\": {\n \"company\": \"Acme Corp\"\n },\n \"variables\": {\n \"plan\": \"pro\"\n },\n \"enrolled_at\": \"2026-07-08T12:00:00Z\",\n \"whatsapp_phone_number_id\": 12,\n \"tag_ids\": [\n 1,\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"ext_id": "crm_123",
"first_name": "Jean",
"last_name": "Dupont",
"username": "jdupont",
"image": "https://example.com/avatar.jpg",
"email": "jean.dupont@example.com",
"phone": "+33612345678",
"source": "api",
"warmth": "warm",
"pipeline_stage": "qualified",
"is_optout": false,
"variables": {
"plan": "pro"
},
"whatsapp_phone_number_id": 12,
"age": 34,
"occupation_status": "self_employed",
"maturity_level": "advanced",
"engagement_level": "high",
"is_lost": false,
"lost_reason": "price_objection",
"profile_extracted_at": "2026-07-08T12:00:00Z",
"profile": {
"professional_situation": "Dirige une agence de deux personnes.",
"primary_objective": "Doubler le nombre de leads entrants.",
"blockers": [
"Pas de budget avant le T4"
],
"levers": [
"Utilise déjà un CRM"
],
"verbatim": "On en reparle en octobre.",
"lost_reason_detail": "Budget gelé jusqu’au prochain exercice."
},
"created_at": "2026-07-08T12:00:00Z",
"updated_at": "2026-07-08T12:00:00Z",
"tags": [
{
"id": 1,
"label": "Prospect chaud",
"description": "Prospect prêt à réserver un appel.",
"pipeline_stage": "qualified",
"created_at": "2026-07-08T12:00:00Z",
"updated_at": "2026-07-08T12:00:00Z"
}
],
"conversations": [
{
"id": 456,
"platform": "whatsapp",
"last_inbound_at": "2026-07-08T12:00:00Z",
"last_outbound_at": "2026-07-08T12:05:00Z",
"summary": "Le prospect demande un devis et souhaite démarrer en septembre.",
"summary_generated_at": "2026-07-08T12:10:00Z",
"messages_count": 12
}
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}Authorizations
Token API généré depuis votre espace de travail Setteo.
Body
application/json
Maximum string length:
255Example:
"crm_123"
Maximum string length:
255Example:
"Jean"
Maximum string length:
255Example:
"Dupont"
Maximum string length:
255Example:
"jdupont"
Example:
"https://example.com/avatar.jpg"
Maximum string length:
255Example:
"jean.dupont@example.com"
Maximum string length:
255Example:
"+33612345678"
Available options:
webhook, instagram, whatsapp, import, api, iclosed, calendly, null Example:
"api"
Available options:
cold, warm, hot, null Example:
"warm"
Available options:
new, contacted, engaged, qualified, call_booked, won, lost, null Example:
"qualified"
Example:
{ "company": "Acme Corp" }
Example:
{ "plan": "pro" }
Example:
"2026-07-08T12:00:00Z"
Example:
12
Example:
[1, 2]
Response
Prospect créé.
Représentation complète d’un prospect, incluant l’analyse de profil.
Show child attributes
Show child attributes