Mettre à jour un numéro de téléphone
curl --request PUT \
--url https://app.famulor.de/api/user/phone-numbers/{id} \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "<string>"
}
'import requests
url = "https://app.famulor.de/api/user/phone-numbers/{id}"
payload = { "nickname": "<string>" }
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({nickname: '<string>'})
};
fetch('https://app.famulor.de/api/user/phone-numbers/{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/phone-numbers/{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([
'nickname' => '<string>'
]),
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/phone-numbers/{id}"
payload := strings.NewReader("{\n \"nickname\": \"<string>\"\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/phone-numbers/{id}")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/phone-numbers/{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 \"nickname\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Phone number updated successfully.",
"data": {
"id": 1,
"phone_number": "+14155551234",
"nickname": "Sales line",
"country_code": "US",
"type": "normal"
}
}
{
"error": "Phone number not found."
}
{
"message": "The nickname must not exceed 50 characters.",
"errors": {
"nickname": ["The nickname must not exceed 50 characters."]
}
}
Numéros de téléphone
Mettre à jour un numéro de téléphone
Met à jour le surnom d’un numéro de téléphone
PUT
/
api
/
user
/
phone-numbers
/
{id}
Mettre à jour un numéro de téléphone
curl --request PUT \
--url https://app.famulor.de/api/user/phone-numbers/{id} \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "<string>"
}
'import requests
url = "https://app.famulor.de/api/user/phone-numbers/{id}"
payload = { "nickname": "<string>" }
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({nickname: '<string>'})
};
fetch('https://app.famulor.de/api/user/phone-numbers/{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/phone-numbers/{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([
'nickname' => '<string>'
]),
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/phone-numbers/{id}"
payload := strings.NewReader("{\n \"nickname\": \"<string>\"\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/phone-numbers/{id}")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/phone-numbers/{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 \"nickname\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Phone number updated successfully.",
"data": {
"id": 1,
"phone_number": "+14155551234",
"nickname": "Sales line",
"country_code": "US",
"type": "normal"
}
}
{
"error": "Phone number not found."
}
{
"message": "The nickname must not exceed 50 characters.",
"errors": {
"nickname": ["The nickname must not exceed 50 characters."]
}
}
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
integer
requis
L’identifiant unique du numéro de téléphone à mettre à jour
Paramètres du corps
string
Une courte étiquette pour le numéro de téléphone. 50 caractères maximum. Envoyez
null ou une chaîne vide pour l’effacer.Réponse
string
Message de succès
object
Le numéro de téléphone mis à jour
{
"message": "Phone number updated successfully.",
"data": {
"id": 1,
"phone_number": "+14155551234",
"nickname": "Sales line",
"country_code": "US",
"type": "normal"
}
}
{
"error": "Phone number not found."
}
{
"message": "The nickname must not exceed 50 characters.",
"errors": {
"nickname": ["The nickname must not exceed 50 characters."]
}
}
Le surnom est la même étiquette que celle que vous pouvez définir dans le tableau de bord. Il est renvoyé par les points de terminaison de liste des numéros de téléphone (
GET /user/phone-numbers/all, GET /user/phone-numbers/sip-trunks), afin que les autres ressources faisant référence à un numéro via phone_number_id puissent en résoudre le surnom à partir de là.