Mettre à jour un lead
curl --request PUT \
--url https://app.famulor.de/api/user/leads/{id} \
--header 'Content-Type: application/json' \
--data '
{
"campaign_id": 123,
"phone_number": "<string>",
"status": "<string>",
"variables": {}
}
'import requests
url = "https://app.famulor.de/api/user/leads/{id}"
payload = {
"campaign_id": 123,
"phone_number": "<string>",
"status": "<string>",
"variables": {}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({campaign_id: 123, phone_number: '<string>', status: '<string>', variables: {}})
};
fetch('https://app.famulor.de/api/user/leads/{id}', 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://app.famulor.de/api/user/leads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'campaign_id' => 123,
'phone_number' => '<string>',
'status' => '<string>',
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://app.famulor.de/api/user/leads/{id}"
payload := strings.NewReader("{\n \"campaign_id\": 123,\n \"phone_number\": \"<string>\",\n \"status\": \"<string>\",\n \"variables\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://app.famulor.de/api/user/leads/{id}")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": 123,\n \"phone_number\": \"<string>\",\n \"status\": \"<string>\",\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/leads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_id\": 123,\n \"phone_number\": \"<string>\",\n \"status\": \"<string>\",\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"message": "Lead successfully updated"
}
Prospects
Mettre à jour un lead
Met à jour un lead Famulor existant via l’API. Modifie les informations de contact, les variables personnalisées, le statut et l’attribution de campagne pour la prospection vocale IA.
PUT
/
api
/
user
/
leads
/
{id}
Mettre à jour un lead
curl --request PUT \
--url https://app.famulor.de/api/user/leads/{id} \
--header 'Content-Type: application/json' \
--data '
{
"campaign_id": 123,
"phone_number": "<string>",
"status": "<string>",
"variables": {}
}
'import requests
url = "https://app.famulor.de/api/user/leads/{id}"
payload = {
"campaign_id": 123,
"phone_number": "<string>",
"status": "<string>",
"variables": {}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({campaign_id: 123, phone_number: '<string>', status: '<string>', variables: {}})
};
fetch('https://app.famulor.de/api/user/leads/{id}', 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://app.famulor.de/api/user/leads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'campaign_id' => 123,
'phone_number' => '<string>',
'status' => '<string>',
'variables' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://app.famulor.de/api/user/leads/{id}"
payload := strings.NewReader("{\n \"campaign_id\": 123,\n \"phone_number\": \"<string>\",\n \"status\": \"<string>\",\n \"variables\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://app.famulor.de/api/user/leads/{id}")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": 123,\n \"phone_number\": \"<string>\",\n \"status\": \"<string>\",\n \"variables\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/leads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_id\": 123,\n \"phone_number\": \"<string>\",\n \"status\": \"<string>\",\n \"variables\": {}\n}"
response = http.request(request)
puts response.read_body{
"message": "Lead successfully updated"
}
API Famulor 1.0 (héritée). Cette page concerne uniquement Famulor 1.0 (
app.famulor.de) et est conservée pour la compatibilité. Pour la plateforme actuelle, consultez la référence API Famulor 2.0.Paramètres de chemin
Corps de la requête
Le statut du lead. Doit être l’une des valeurs suivantes : created, completed, reached-max-retries
Champs de réponse
Remarques
- Le lead doit appartenir à l’utilisateur authentifié
- Lors de la mise à jour de la campagne, la nouvelle campagne doit également appartenir à l’utilisateur authentifié
- Les numéros de téléphone sont automatiquement formatés et validés
- Les variables sont fusionnées avec les variables existantes (et non remplacées)
- Seuls les champs autorisés peuvent être mis à jour : campaign_id, phone_number, status, variables
- Le champ status a des valeurs restreintes afin de préserver l’intégrité des données
{
"message": "Lead successfully updated"
}
Pages associées : Introduction et Guide d’authentification, et Exemples d’intégration API.