API 레퍼런스

초안 및 첨부 파일

비공개 첨부 파일 저장소로 작성 화면 흐름을 구축합니다.

POST/drafts
API 키

작성 화면 초안 생성

작성 화면 초안 생성

요청
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"}'
201 응답
{
  "id": "dr_…",
  "attachments": []
}
GET/drafts
API 키

작성 화면 초안 목록 조회

작성 화면 초안 목록 조회

요청
curl https://sendhq.cc/api/v1/drafts \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "data": [],
  "count": 0
}
GET/drafts/:id
API 키

초안과 첨부 파일 조회

초안과 첨부 파일 조회

요청
curl https://sendhq.cc/api/v1/drafts/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "id": "dr_…",
  "attachments": []
}
PUT/drafts/:id
API 키

초안 내용 교체

초안 내용 교체

요청
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"}'
200 응답
{
  "id": "dr_…"
}
DELETE/drafts/:id
API 키

초안 삭제

초안 삭제

요청
curl https://sendhq.cc/api/v1/drafts/id_value \
  -X DELETE \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "ok": true
}
POST/drafts/:id/attachments
API 키

초안에 첨부 파일 업로드

원본 파일 바이트를 업로드합니다. Content-Type과 X-Filename을 설정하세요. 메시지 하나에는 최대 10개 파일, 총 10 MB까지 포함할 수 있습니다.

선택 헤더X-Filename
요청
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
201 응답
{
  "id": "att_…",
  "filename": "invoice.pdf",
  "sizeBytes": 48231,
  "available": true
}
GET/attachments/:id
API 키

비공개 첨부 파일 다운로드

비공개 첨부 파일 다운로드

요청
curl https://sendhq.cc/api/v1/attachments/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
DELETE/attachments/:id
API 키

비공개 첨부 파일 삭제

비공개 첨부 파일 삭제

요청
curl https://sendhq.cc/api/v1/attachments/id_value \
  -X DELETE \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "ok": true
}
GET/sending-identities
API 키

검증된 발신 ID 목록 조회

검증된 발신 ID 목록 조회

요청
curl https://sendhq.cc/api/v1/sending-identities \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "domains": [],
  "addresses": [],
  "localParts": []
}