SMS senden
curl --request POST \
--url https://app.famulor.de/api/user/sms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": 123,
"to": "<string>",
"body": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from: 123, to: '<string>', body: JSON.stringify('<string>')})
};
fetch('https://app.famulor.de/api/user/sms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/sms"
payload = {
"from": 123,
"to": "<string>",
"body": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/sms",
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([
'from' => 123,
'to' => '<string>',
'body' => '<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/sms"
payload := strings.NewReader("{\n \"from\": 123,\n \"to\": \"<string>\",\n \"body\": \"<string>\"\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))
}{
"message": "SMS sent successfully",
"data": {
"sms_id": "SMS_67890",
"from": "+4912345678",
"to": "+4915123456789",
"body": "Hallo! Dies ist eine Test-SMS von Famulor.",
"segments": 1,
"cost": 0.05,
"currency": "EUR",
"status": "sent"
}
}
{
"message": "Invalid phone number format"
}
{
"message": "Insufficient balance to send SMS"
}
{
"message": "Phone number is not SMS-capable"
}
{
"message": "From number not found"
}
{
"message": "Failed to send SMS",
"error": "Twilio service temporarily unavailable"
}
SMS senden
Sende eine SMS über deine Famulor-Telefonnummer per API. Triggere transaktionale Texte oder Follow-ups nach KI-Anrufen, Lead-Capture oder Kampagnen.
POST
/
api
/
user
/
sms
SMS senden
curl --request POST \
--url https://app.famulor.de/api/user/sms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": 123,
"to": "<string>",
"body": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from: 123, to: '<string>', body: JSON.stringify('<string>')})
};
fetch('https://app.famulor.de/api/user/sms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/sms"
payload = {
"from": 123,
"to": "<string>",
"body": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/sms",
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([
'from' => 123,
'to' => '<string>',
'body' => '<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/sms"
payload := strings.NewReader("{\n \"from\": 123,\n \"to\": \"<string>\",\n \"body\": \"<string>\"\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))
}{
"message": "SMS sent successfully",
"data": {
"sms_id": "SMS_67890",
"from": "+4912345678",
"to": "+4915123456789",
"body": "Hallo! Dies ist eine Test-SMS von Famulor.",
"segments": 1,
"cost": 0.05,
"currency": "EUR",
"status": "sent"
}
}
{
"message": "Invalid phone number format"
}
{
"message": "Insufficient balance to send SMS"
}
{
"message": "Phone number is not SMS-capable"
}
{
"message": "From number not found"
}
{
"message": "Failed to send SMS",
"error": "Twilio service temporarily unavailable"
}
Dieser Endpunkt ermöglicht es dir, SMS-Nachrichten über deine erworbenen Telefonnummern zu senden. Die SMS wird über Twilio versendet und die Kosten werden automatisch von deinem Kontoguthaben abgezogen.
Anfrage-Body
integer
erforderlich
Die ID deiner Telefonnummer, von der die SMS gesendet werden soll (muss SMS-fähig sein)
string
erforderlich
Die Telefonnummer des Empfängers im internationalen Format (z.B. “+4915123456789”)
string
erforderlich
Der SMS-Nachrichteninhalt (max. 300 Zeichen)
Antwort-Felder
string
Erfolgsmeldung, die bestätigt, dass die SMS gesendet wurde
object
Zusätzliche Daten zur gesendeten SMS
Fehler-Antworten
object
Anzeigen Fehler-Details
Anzeigen Fehler-Details
string
Fehlermeldung, die das Problem beschreibt (ungültige Telefonnummer, unzureichendes Guthaben, etc.)
object
Hinweise
- Die Absender-Telefonnummer muss dem authentifizierten Benutzer gehören
- Die Absender-Telefonnummer muss SMS-fähig sein
- Das Telefonnummer-Abonnement muss aktiv sein (nicht abgelaufen)
- Ausreichendes Kontoguthaben ist erforderlich, um die SMS-Kosten zu decken
- Telefonnummern werden automatisch in das E.164-Format formatiert
- SMS-Kosten variieren je nach Zielland und werden pro Segment berechnet
- Lange Nachrichten können in mehrere Segmente aufgeteilt werden, was die Kosten erhöht
- Die Empfänger-Telefonnummer muss den internationalen Standards entsprechen
{
"message": "SMS sent successfully",
"data": {
"sms_id": "SMS_67890",
"from": "+4912345678",
"to": "+4915123456789",
"body": "Hallo! Dies ist eine Test-SMS von Famulor.",
"segments": 1,
"cost": 0.05,
"currency": "EUR",
"status": "sent"
}
}
{
"message": "Invalid phone number format"
}
{
"message": "Insufficient balance to send SMS"
}
{
"message": "Phone number is not SMS-capable"
}
{
"message": "From number not found"
}
{
"message": "Failed to send SMS",
"error": "Twilio service temporarily unavailable"
}
Passende Seiten: Introduction und Authentication Guide und API Integration Examples.
⌘I