Riferimento API
Bozze e allegati
Costruisci flussi di composizione con archiviazione privata degli allegati.
Nessuna operazione corrisponde a questo filtro.
POST
Chiave API/draftsCrea una bozza di composizione
Crea una bozza di composizione
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
Chiave API/draftsElenca le bozze di composizione
Elenca le bozze di composizione
curl https://sendhq.cc/api/v1/drafts \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}GET
Chiave API/drafts/:idRecupera una bozza e i suoi allegati
Recupera una bozza e i suoi allegati
curl https://sendhq.cc/api/v1/drafts/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"id": "dr_…",
"attachments": []
}PUT
Chiave API/drafts/:idSostituisci il contenuto della bozza
Sostituisci il contenuto della bozza
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
Chiave API/drafts/:idElimina una bozza
Elimina una bozza
curl https://sendhq.cc/api/v1/drafts/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}POST
Chiave API/drafts/:id/attachmentsCarica un allegato in una bozza
Carica i byte grezzi del file. Imposta Content-Type e X-Filename. Un messaggio può contenere al massimo 10 file e 10 MB in totale.
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
Chiave API/attachments/:idScarica un allegato privato
Scarica un allegato privato
curl https://sendhq.cc/api/v1/attachments/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"DELETE
Chiave API/attachments/:idElimina un allegato privato
Elimina un allegato privato
curl https://sendhq.cc/api/v1/attachments/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}GET
Chiave API/sending-identitiesElenca le identità di invio verificate
Elenca le identità di invio verificate
curl https://sendhq.cc/api/v1/sending-identities \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"domains": [],
"addresses": [],
"localParts": []
}