Dokumentation ›
Nachrichten › WhatsApp-Web-Nachricht senden
POST
WhatsApp-Web-Nachricht senden
POSThttps://app.sendapp.ai/api/whatsapp-web/send
Senden Sie eine Text- oder Mediennachricht über WhatsApp Web (Browser-Automatisierung). Setzen Sie
type=text für Text oder type=media, um eine Datei anzuhängen. Parameter
apikey
erforderlich
Ihr API Key.
token
erforderlich
Konto-Token.
number
erforderlich
Empfängernummer (z. B. 1234567890).
type
erforderlich
text oder media.
message
optional
Nachrichtentext (erforderlich, wenn
type=text).
media_url
optional
URL der Mediendatei (erforderlich, wenn
type=media).
filename
optional
Dateiname für das Medium.
Anfrage
curl -X POST 'https://app.sendapp.ai/api/whatsapp-web/send' \
-H 'Content-Type: application/json' \
-d '{
"apikey": "YOUR_API_KEY",
"token": "YOUR_ACCOUNT_TOKEN",
"number": "1234567890",
"type": "text",
"message": "Hallo, dies ist eine Testnachricht!"
}'<?php
$ch = curl_init('https://app.sendapp.ai/api/whatsapp-web/send');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'apikey' => 'YOUR_API_KEY',
'token' => 'YOUR_ACCOUNT_TOKEN',
'number' => '1234567890',
'type' => 'text',
'message' => 'Hallo, dies ist eine Testnachricht!',
]),
]);
echo curl_exec($ch);
curl_close($ch);const res = await fetch('https://app.sendapp.ai/api/whatsapp-web/send', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
apikey: 'YOUR_API_KEY',
token: 'YOUR_ACCOUNT_TOKEN',
number: '1234567890',
type: 'text',
message: 'Hallo, dies ist eine Testnachricht!'
})
});
console.log(await res.json());Antwort (200 OK)
{
"status": "success",
"message": "Message sent successfully"
}Fehler
{
"status": "error",
"message": "No active WhatsApp Web instance found"
}