Telefonnummer aktualisieren
curl --request PUT \
--url https://app.famulor.de/api/user/phone-numbers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', '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));import requests
url = "https://app.famulor.de/api/user/phone-numbers/{id}"
payload = { "nickname": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?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 => [
"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://app.famulor.de/api/user/phone-numbers/{id}"
payload := strings.NewReader("{\n \"nickname\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"message": "Phone number updated successfully.",
"data": {
"id": 1,
"phone_number": "+14155551234",
"nickname": "Vertrieb",
"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."]
}
}
Telefonnummer aktualisieren
Spitzname einer Telefonnummer aktualisieren
PUT
/
api
/
user
/
phone-numbers
/
{id}
Telefonnummer aktualisieren
curl --request PUT \
--url https://app.famulor.de/api/user/phone-numbers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nickname": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', '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));import requests
url = "https://app.famulor.de/api/user/phone-numbers/{id}"
payload = { "nickname": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?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 => [
"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://app.famulor.de/api/user/phone-numbers/{id}"
payload := strings.NewReader("{\n \"nickname\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"message": "Phone number updated successfully.",
"data": {
"id": 1,
"phone_number": "+14155551234",
"nickname": "Vertrieb",
"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."]
}
}
Dieser Endpunkt aktualisiert die bearbeitbaren Attribute einer Telefonnummer, die dir gehört. Derzeit ist dies der Spitzname — ein kurzes, menschenlesbares Label (z. B. „Vertrieb“, „Support — US“), das neben der Nummer im Dashboard angezeigt wird.
Nur der Eigentümer der Nummer kann sie aktualisieren. Mit dir geteilte Nummern (granted) zeigen den Spitznamen an, können aber von dir nicht geändert werden.
Pfad-Parameter
integer
erforderlich
Die eindeutige Kennung der zu aktualisierenden Telefonnummer
Body-Parameter
string
Ein kurzes Label für die Telefonnummer. Maximal 50 Zeichen. Sende
null oder einen leeren String, um es zu löschen.Antwort
string
Erfolgsmeldung
object
Die aktualisierte Telefonnummer
{
"message": "Phone number updated successfully.",
"data": {
"id": 1,
"phone_number": "+14155551234",
"nickname": "Vertrieb",
"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."]
}
}
Der Spitzname ist dasselbe Label, das du im Dashboard setzen kannst. Er wird von den Auflistungs-Endpunkten (
GET /user/phone-numbers/all, GET /user/phone-numbers/sip-trunks) zurückgegeben, sodass andere Ressourcen, die eine Nummer per phone_number_id referenzieren, den Spitznamen dort auflösen können.