Ihr ERP, Kassensystem oder Desktop-Programm kann WhatsApp-Nachrichten von Ihrer verbundenen Nummer senden, Kundendaten neben dem Chat anzeigen und Fälle anlegen. Die Senderoute verwendet dasselbe Anfrageformat wie die WhatsApp Cloud API von Meta, sodass dafür geschriebener Code nur eine neue Basis-URL und einen SyBox-Geräteschlüssel braucht — und jeder Versand wird unter Ihrem eigenen WhatsApp Business-Konto an Meta weitergeleitet.
02Senden Sie Ihre erste Nachricht
Eine reine Textnachricht. Der Body entspricht der Standard-Cloud-API.
cURL
curl -X POST https://api.smartsybox.com/v26.0/PHONE_NUMBER_ID/messages \
-H "Authorization: Bearer YOUR_DEVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "text",
"text": { "body": "Hello from SyBox 👋" }
}'
C# · HttpClient
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "YOUR_DEVICE_KEY");
string json = @"{
""messaging_product"": ""whatsapp"",
""to"": ""15551234567"",
""type"": ""text"",
""text"": { ""body"": ""Hello from SyBox"" }
}";
var res = await http.PostAsync(
"https://api.smartsybox.com/v26.0/PHONE_NUMBER_ID/messages",
new StringContent(json, Encoding.UTF8, "application/json"));
Console.WriteLine(await res.Content.ReadAsStringAsync());
Die Antwort
Sie erhalten genau das zurück, was Meta zurückgibt, mit demselben HTTP-Status.
200 OK · application/json
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "15551234567", "wa_id": "15551234567" }],
"messages": [{ "id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgARGBI…" }]
}
04Zeigen Sie Ihre Daten neben dem Chat an
Wenn ein Mitarbeiter einen Chat öffnet, ruft SyBox IHREN Endpunkt auf und zeigt die Daten direkt neben dem Chat an.
Request · SyBox → your endpoint
POST YOUR_ERP_URL
Authorization: Bearer YOUR_ERP_KEY
X-Sybox-Action: lookup
# body: { "data": "<json string>" } — the decoded "data":
{
"phone": "15551234567",
"email": "customer@example.com",
"ref": ""
}
Your reply · application/json
{
"renderAs": "table",
"content": [
{ "Order": "#10432", "Status": "Shipped", "Total": "$1,250.00" }
]
}
renderAs
Legen Sie renderAs fest, um SyBox mitzuteilen, wie Ihr Inhalt dargestellt werden soll:
table
Rows & columns. content = an array of flat objects (or { rows: [ … ] }). Object keys become the column headers.
cards · kpi
Compact tiles (a balance, an order count). content = an array of { label, value } (or { cards: [ … ] }).
feed · list · thread
A timeline of rich cards. content = an array of { title, text, date, tags, media:[{ type, url, name }] }.
message
A single message-style card (one record laid out as a note).
html
Your own trusted HTML — content = a string. Use only for markup you generate yourself.
sections
Several blocks at once: content = { sections: [ { title, renderAs, content } ] } — mix a table + cards + a feed in one reply.
json
The default when renderAs is omitted — SyBox pretty-prints your content as-is.
Fügen Sie sybox_ref zu jeder Tabellenzeile hinzu, um sie anklickbar zu machen.
Wir senden Telefon und E-Mail — antworten Sie mit { renderAs, content }.
Produktsuche (X-Sybox-Action: products)
Derselbe Endpunkt kann auch Produktsuchen beantworten. Der Agent tippt, wonach der Kunde fragt, SyBox sendet es als "q", und Ihre Antwort erscheint als Produktkarten neben dem Chat — mit einer Senden-Schaltfläche, die den Produktlink ins Eingabefeld setzt.
Request · SyBox → your endpoint
POST YOUR_ERP_URL
Authorization: Bearer YOUR_ERP_KEY
X-Sybox-Action: products
# body: { "data": "<json string>" } — the decoded "data":
{
"q": "wireless keyboard",
"phone": "15551234567",
"email": "customer@example.com",
"ref": ""
}
Your reply · application/json
{
"content": [
{
"name": "Wireless Keyboard K380",
"price": 449,
"oldPrice": 520,
"currency": "USD",
"available": true,
"stock": 12,
"image": "https://cdn.example.com/k380.jpg",
"link": "https://shop.example.com/p/k380",
"note": "Ships in 24h"
}
]
}
name
Das einzige Pflichtfeld. Ein Produkt mit nur einem Namen ergibt trotzdem eine saubere Karte.
price · oldPrice · currency
Zahlen, keine formatierten Zeichenketten. Senden Sie oldPrice nur, wenn es einen echten früheren Preis gibt — der Rabatt wird aus beiden berechnet.
available · stock
available ist true/false; stock ist eine optionale Anzahl daneben. Lassen Sie beide weg, wenn Sie keinen Bestand führen — ein fehlendes Feld zeichnet nichts und wird nie als «nicht verfügbar» gelesen.
image
Eine direkte https-Bild-URL. Was nicht lädt, weicht einem neutralen Hintergrund.
link
Die URL der Produktseite. Ohne sie ist die Karte nur lesbar — Senden erscheint nur, wenn es etwas zu senden gibt.
note
Eine kurze freie Zeile unter dem Preis — Lieferzeit, Variante, Bedingung.
Nichts außer dem Endpunkt, den Sie bereits haben: dieselbe URL, derselbe Schlüssel, dieselbe { "data": "…" }-Hülle. Unterscheiden Sie über X-Sybox-Action zwischen Produktsuche und Kundenabfrage. Antworten Sie mit content als einfachem Array (oder { items: [ … ] }).