API-Referenz
E-Mail senden
POST /api/send
POST
/
api
/
send
E-Mail senden
curl --request POST \
--url https://api.events-52grad.de/api/sendimport requests
url = "https://api.events-52grad.de/api/send"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.events-52grad.de/api/send', 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://api.events-52grad.de/api/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.events-52grad.de/api/send"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.events-52grad.de/api/send")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.events-52grad.de/api/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRequest
Headers
Content-Type: application/json
Authorization: Bearer {API_SECRET}
Body
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
to | string | ✅ | Empfänger-Adresse(n) |
subject | string | ✅ | Betreff |
text_body | string | ✅* | Plain-Text-Inhalt |
html_body | string | ✅* | HTML-Inhalt |
cc | string | — | CC-Empfänger |
bcc | string | — | BCC-Empfänger |
in_reply_to | string | — | Message-ID der Ursprungsmail (für Threading) |
thread_id | string | — | UUID des bestehenden Threads |
customer_id | string | — | UUID des zugehörigen Kunden |
company_id | string | — | UUID des zugehörigen Unternehmens |
attachments | array | — | Anhänge (siehe unten) |
text_body oder html_body muss angegeben werden.
Attachment-Objekt
| Feld | Typ | Beschreibung |
|---|---|---|
filename | string | Dateiname |
content | string | Base64-kodierter Inhalt |
content_type | string | MIME-Type (z.B. application/pdf) |
Beispiele
Einfache Mail
{
"to": "kunde@example.com",
"subject": "Vielen Dank für Ihre Anfrage",
"text_body": "Guten Tag, wir melden uns in Kürze bei Ihnen."
}
Antwort auf bestehende Mail
{
"to": "kunde@example.com",
"subject": "Re: Anfrage Hochzeit Juli",
"text_body": "Vielen Dank für Ihre Nachricht...",
"in_reply_to": "<original-message-id@ionos.de>",
"customer_id": "abc-123-def"
}
Mail mit Anhang
{
"to": "kunde@example.com",
"subject": "Ihr Angebot",
"text_body": "Anbei finden Sie unser Angebot.",
"attachments": [
{
"filename": "Angebot.pdf",
"content": "JVBERi0xLjQK...",
"content_type": "application/pdf"
}
]
}
Response
Erfolg (200)
{
"status": "sent",
"id": "uuid-der-email-in-supabase",
"messageId": "<generated-message-id@ionos.de>",
"threadId": "uuid-des-threads"
}
Teilweise erfolgreich (207)
E-Mail wurde gesendet, aber nicht in der Datenbank gespeichert:{
"status": "partial",
"message": "E-Mail wurde gesendet, aber nicht in der Datenbank gespeichert",
"messageId": "<generated-message-id@ionos.de>",
"error": "Fehlerbeschreibung"
}
Fehler (400)
{
"error": "Empfänger (to) und Betreff (subject) sind Pflicht"
}
Fehler (500)
{
"error": "E-Mail-Versand fehlgeschlagen",
"details": "Fehlerbeschreibung"
}
⌘I
E-Mail senden
curl --request POST \
--url https://api.events-52grad.de/api/sendimport requests
url = "https://api.events-52grad.de/api/send"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.events-52grad.de/api/send', 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://api.events-52grad.de/api/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.events-52grad.de/api/send"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.events-52grad.de/api/send")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.events-52grad.de/api/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body