API-Referenz
Entwürfe und Anhänge
Composer-Abläufe mit privater Anhangspeicherung aufbauen.
Keine Operationen entsprechen diesem Filter.
POST
API-Schlüssel/draftsComposer-Entwurf erstellen
Composer-Entwurf erstellen
curl https://sendhq.cc/api/v1/drafts \
-X POST \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"hello@example.com","to":["customer@example.net"],"subject":"Hello"}'{
"id": "dr_…",
"attachments": []
}GET
API-Schlüssel/draftsComposer-Entwürfe auflisten
Composer-Entwürfe auflisten
curl https://sendhq.cc/api/v1/drafts \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}GET
API-Schlüssel/drafts/:idEntwurf und Anhänge abrufen
Entwurf und Anhänge abrufen
curl https://sendhq.cc/api/v1/drafts/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"id": "dr_…",
"attachments": []
}PUT
API-Schlüssel/drafts/:idEntwurfsinhalt ersetzen
Entwurfsinhalt ersetzen
curl https://sendhq.cc/api/v1/drafts/id_value \
-X PUT \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"hello@example.com","to":["customer@example.net"],"subject":"Updated subject","text":"Updated body"}'{
"id": "dr_…"
}DELETE
API-Schlüssel/drafts/:idEntwurf verwerfen
Entwurf verwerfen
curl https://sendhq.cc/api/v1/drafts/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}POST
API-Schlüssel/drafts/:id/attachmentsAnhang zu einem Entwurf hochladen
Laden Sie die rohen Dateibytes hoch. Setzen Sie Content-Type und X-Filename. Eine Nachricht kann höchstens 10 Dateien und insgesamt 10 MB enthalten.
curl https://sendhq.cc/api/v1/drafts/id_value/attachments \
-X POST \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/pdf" \
-H "X-Filename: invoice.pdf" \
--data-binary @invoice.pdf{
"id": "att_…",
"filename": "invoice.pdf",
"sizeBytes": 48231,
"available": true
}GET
API-Schlüssel/attachments/:idPrivaten Anhang herunterladen
Privaten Anhang herunterladen
curl https://sendhq.cc/api/v1/attachments/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"DELETE
API-Schlüssel/attachments/:idPrivaten Anhang löschen
Privaten Anhang löschen
curl https://sendhq.cc/api/v1/attachments/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}GET
API-Schlüssel/sending-identitiesVerifizierte Absenderidentitäten auflisten
Verifizierte Absenderidentitäten auflisten
curl https://sendhq.cc/api/v1/sending-identities \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"domains": [],
"addresses": [],
"localParts": []
}