API 레퍼런스

이메일 및 스레드

이메일을 보내고, 조회하고, 검색하고, 답장하고, 전송 이벤트를 확인합니다.

POST/emails
API 키

이메일 한 통 발송

검증된 워크스페이스 도메인에서 트랜잭션 HTML, 텍스트 또는 호스팅 템플릿 콘텐츠를 발송합니다. 검증된 발신 도메인에 사용이 설정되어 있으면 직접 발송에서 message_class를 marketing으로 지정할 수 있습니다. 구성된 자사 연동이 눈에 보이는 자체 HTTPS 원클릭 URL을 제공하지 않는 한, marketing에는 관리형 수신 거부 헤더가 추가됩니다.

선택 헤더Idempotency-Key
요청
curl https://sendhq.cc/api/v1/emails \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"Acme <hello@example.com>","to":["customer@example.net"],"subject":"Welcome aboard","html":"<h1>Welcome</h1><p>Your workspace is ready.</p>","text":"Welcome. Your workspace is ready."}'
201 응답
{
  "id": "em_…",
  "providerMessageId": "provider-id",
  "threadId": "em_…"
}
POST/emails/batch
API 키

개별화된 메시지를 최대 100건까지 발송

개별화된 메시지를 최대 100건까지 발송

선택 헤더Idempotency-Key
요청
curl https://sendhq.cc/api/v1/emails/batch \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails":[{"from":"Acme <hello@example.com>","to":["customer@example.net"],"subject":"Welcome aboard","html":"<h1>Welcome</h1><p>Your workspace is ready.</p>","text":"Welcome. Your workspace is ready."}]}'
201 응답
{
  "data": [
    {
      "index": 0,
      "ok": true,
      "id": "em_…"
    }
  ],
  "count": 1,
  "successful": 1,
  "failed": 0
}
GET/emails
API 키

발신 및 수신 이메일 목록 조회

Newest-first list with filters. `query` searches subjects, bodies, participants, and attachment filenames. `label`, `domain`, and `category` accept one value or a comma-separated list (matches any); labels may be IDs or names. `outcome` filters sent mail to `bounced`, `complained`, `failed`, or `rejected` (comma-separated, matches any). `archived=false` returns the Inbox view for received mail. Received mail is classified as `primary`, `updates` (newsletters, bulk, and automated mail), or `spam`, and flagged `important`; spam is excluded unless `category=spam` or `include_spam=true`.

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

이메일과 첨부 파일 조회

이메일과 첨부 파일 조회

요청
curl https://sendhq.cc/api/v1/emails/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "id": "em_…",
  "direction": "out",
  "status": "sent",
  "attachments": []
}
PATCH/emails/:id
API 키

읽음, 보관, 스팸, 카테고리, 중요도 업데이트

`read`, `archived`, `category`(`primary`, `updates`, `spam` — 수신 메일에만 해당), `important`를 설정합니다. `category` 또는 `important`를 바꾸면 SendHQ가 해당 발신자를 학습합니다. 스팸으로 신고하면 그 발신자의 이후 메일이 스팸으로 분류되고, `Not spam`은 해당 발신자에 대한 자동 스팸 검사를 무시하며, 중요도는 발신자에 계속 적용됩니다. 이 메시지만 변경하려면 `learn: false`를 전달하세요.

요청
curl https://sendhq.cc/api/v1/emails/id_value \
  -X PATCH \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"spam"}'
200 응답
{
  "id": "em_…",
  "readAt": "2026-08-23T12:00:00.000Z",
  "archivedAt": null,
  "category": "spam",
  "important": false,
  "classification": "you moved it here"
}
DELETE/emails/:id
API 키

보관 중인 이메일 삭제

보관 중인 이메일 삭제

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

이메일의 전송 이벤트 목록 조회

이메일의 전송 이벤트 목록 조회

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

대화를 시간순으로 조회

대화를 시간순으로 조회

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

Delivery timeline for one email, with bounce and complaint reasons

Delivery timeline for one email, with bounce and complaint reasons

요청
curl https://sendhq.cc/api/v1/emails/id_value/delivery \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "emailId": "em_123",
  "status": "bounced",
  "timeline": [],
  "count": 0,
  "limit": 50,
  "offset": 0
}
GET/threads/:id/delivery
API 키

Per-thread delivery counts and per-message failure reasons

Per-thread delivery counts and per-message failure reasons

요청
curl https://sendhq.cc/api/v1/threads/id_value/delivery \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "threadId": "thr_123",
  "delivered": 0,
  "bounced": 0,
  "complained": 0,
  "failed": 0,
  "messages": []
}