Referencia de la API
Borradores y adjuntos
Cree flujos de redacción con almacenamiento privado de adjuntos.
Ninguna operación coincide con este filtro.
POST
Clave de API/draftsCrear un borrador de redacción
Crear un borrador de redacción
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
Clave de API/draftsListar los borradores de redacción
Listar los borradores de redacción
curl https://sendhq.cc/api/v1/drafts \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}GET
Clave de API/drafts/:idObtener un borrador y sus adjuntos
Obtener un borrador y sus adjuntos
curl https://sendhq.cc/api/v1/drafts/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"id": "dr_…",
"attachments": []
}PUT
Clave de API/drafts/:idReemplazar el contenido del borrador
Reemplazar el contenido del borrador
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
Clave de API/drafts/:idDescartar un borrador
Descartar un borrador
curl https://sendhq.cc/api/v1/drafts/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}POST
Clave de API/drafts/:id/attachmentsSubir un adjunto a un borrador
Suba los bytes sin procesar del archivo. Establezca Content-Type y X-Filename. Un mensaje puede contener como máximo 10 archivos y 10 MB en total.
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
Clave de API/attachments/:idDescargar un adjunto privado
Descargar un adjunto privado
curl https://sendhq.cc/api/v1/attachments/id_value \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"DELETE
Clave de API/attachments/:idEliminar un adjunto privado
Eliminar un adjunto privado
curl https://sendhq.cc/api/v1/attachments/id_value \
-X DELETE \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"ok": true
}GET
Clave de API/sending-identitiesListar las identidades de remitente verificadas
Listar las identidades de remitente verificadas
curl https://sendhq.cc/api/v1/sending-identities \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"domains": [],
"addresses": [],
"localParts": []
}