시작하기
빠른 시작
키를 만들고, 도메인을 검증하고, 재시도해도 안전한 요청으로 통제된 이메일을 보냅니다.
시작하기 전에
Create a SendHQ workspace and keep the dashboard open. You can verify a domain and create an API key before paying. Sending requires an active subscription: there is no free allowance, including to your own address. Choose a plan at pricing.
1. API 키 만들기
대시보드에서 API keys를 열고 Production처럼 알아보기 쉬운 이름을 선택한 뒤, 키가 표시될 때 복사하세요. 서버 측 시크릿 관리자에 저장하세요. SendHQ는 전체 값을 다시 보여 주지 않습니다.
SENDHQ_API_KEY=re_your_key_here2. 발신 도메인 추가하기
Open Domains, add a domain you control, and publish the returned DKIM, SPF, DMARC, and domain verification records. Copy the records into your DNS host and click Verify. On Cloudflare, add them as DNS only (grey cloud). Add the records, then click Verify.
include:amazonses.com) into the existing v=spf1 value.3. 검증 기다리기
Use the dashboard or POST /domains/:id/verify. DNS can move through pending, checking, and propagating before the sending identity is verified.
4. 통제된 메시지 보내기
curl https://sendhq.cc/api/v1/emails \
-H "Authorization: Bearer $SENDHQ_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: onboarding-user-42" \
-d '{"from":"Acme <hello@example.com>","to":["owner@example.com"],"subject":"SendHQ is connected","html":"<h1>It works</h1><p>Your first controlled message was accepted.</p>","text":"It works. Your first controlled message was accepted."}'요청이 성공하면 SendHQ 이메일 ID, 제공업체 메시지 ID, 대화 스레드 ID가 반환됩니다. 이메일을 발생시킨 애플리케이션 이벤트와 함께 SendHQ ID를 저장해 두세요.
5. 결과 처리하기
API 요청이 접수되었다고 해서 수신자에게 전달된 것은 아닙니다. /emails/:id/events를 조회하거나 대시보드에서 전달, 반송, 스팸 신고, 거부, 열람, 클릭 이벤트를 확인하세요.