API-referentie
Concepten en bijlagen
Bouw flows voor het opstellen van berichten met privéopslag voor bijlagen.
Geen operaties gevonden voor dit filter.
POST
API-sleutel/draftsEen concept aanmaken
Een concept aanmaken
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-sleutel/draftsConcepten opvragen
Concepten opvragen
curl https://sendhq.cc/api/v1/drafts \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}GET
API-sleutel/drafts/:idEen concept en de bijlagen ophalen
Een concept en de bijlagen ophalen
curl https://sendhq.cc/api/v1/drafts/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"id": "dr_…",
"attachments": []
}PUT
API-sleutel/drafts/:idDe inhoud van een concept vervangen
De inhoud van een concept vervangen
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-sleutel/drafts/:idEen concept verwijderen
Een concept verwijderen
curl https://sendhq.cc/api/v1/drafts/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}POST
API-sleutel/drafts/:id/attachmentsEen bijlage uploaden naar een concept
Upload de ruwe bytes van het bestand. Stel Content-Type en X-Filename in. Een bericht kan maximaal 10 bestanden en in totaal 10 MB bevatten.
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-sleutel/attachments/:idEen privébijlage downloaden
Een privébijlage downloaden
curl https://sendhq.cc/api/v1/attachments/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"DELETE
API-sleutel/attachments/:idEen privébijlage verwijderen
Een privébijlage verwijderen
curl https://sendhq.cc/api/v1/attachments/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}GET
API-sleutel/sending-identitiesGeverifieerde afzenderidentiteiten opvragen
Geverifieerde afzenderidentiteiten opvragen
curl https://sendhq.cc/api/v1/sending-identities \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"domains": [],
"addresses": [],
"localParts": []
}