Obtenir une conversation par téléphone
curl --request GET \
--url https://api.setteo.io/v1/conversations/{phone} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.setteo.io/v1/conversations/{phone}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.setteo.io/v1/conversations/{phone}', 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/conversations/{phone}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.setteo.io/v1/conversations/{phone}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.setteo.io/v1/conversations/{phone}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.setteo.io/v1/conversations/{phone}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 456,
"platform": "whatsapp",
"agent_id": "agent_abc123",
"agent_name": "Assistant commercial",
"ai_stopped": false,
"lead": {
"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,
"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"
}
]
},
"summary": "Le prospect demande un devis et souhaite démarrer en septembre.",
"summary_generated_at": "2026-07-08T12:10:00Z",
"last_inbound_at": "2026-07-08T12:00:00Z",
"last_outbound_at": "2026-07-08T12:05:00Z",
"messages_count": 12,
"messages": [
{
"id": 789,
"conversation_id": 456,
"direction": "inbound",
"message": "Bonjour, je souhaite en savoir plus.",
"has_link": false,
"is_ai_generated": true,
"timestamp": "2026-07-08T12:10:00Z"
}
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}Conversations
Obtenir une conversation par téléphone
Retourne la conversation WhatsApp associée au téléphone du prospect.
GET
/
v1
/
conversations
/
{phone}
Obtenir une conversation par téléphone
curl --request GET \
--url https://api.setteo.io/v1/conversations/{phone} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.setteo.io/v1/conversations/{phone}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.setteo.io/v1/conversations/{phone}', 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/conversations/{phone}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.setteo.io/v1/conversations/{phone}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.setteo.io/v1/conversations/{phone}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.setteo.io/v1/conversations/{phone}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 456,
"platform": "whatsapp",
"agent_id": "agent_abc123",
"agent_name": "Assistant commercial",
"ai_stopped": false,
"lead": {
"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,
"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"
}
]
},
"summary": "Le prospect demande un devis et souhaite démarrer en septembre.",
"summary_generated_at": "2026-07-08T12:10:00Z",
"last_inbound_at": "2026-07-08T12:00:00Z",
"last_outbound_at": "2026-07-08T12:05:00Z",
"messages_count": 12,
"messages": [
{
"id": 789,
"conversation_id": 456,
"direction": "inbound",
"message": "Bonjour, je souhaite en savoir plus.",
"has_link": false,
"is_ai_generated": true,
"timestamp": "2026-07-08T12:10:00Z"
}
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}{
"message": "The given data was invalid.",
"errors": {
"phone": [
"The phone has already been taken."
]
}
}{
"message": "Unauthenticated."
}{
"message": "Unauthenticated."
}