# Send a transactional email: from, to, subject, body curl -sS -X POST 'https://app.sendarix.com/v1/email/send' \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_API_KEY' \ -H 'Idempotency-Key: otp_8842' \ -d '{"from":"no-reply@yourdomain.com","to":"user@example.com","subject":"Your sign-in code","text":"Your code is 482913"}'
// Node 18+ (built-in fetch) const res = await fetch("https://app.sendarix.com/v1/email/send", { method: "POST", headers: { "Content-Type": "application/json", "X-API-Key": process.env.SENDARIX_API_KEY, "Idempotency-Key": "otp_8842" }, body: JSON.stringify({ from: "no-reply@yourdomain.com", to: "user@example.com", subject: "Your sign-in code", text: "Your code is 482913" }) }); console.log(await res.json()); // message_id, status, request_id, sx_trace_id
# Drop-in SMTP — 기존 통합 유지, control plane 확보 host: smtp.sendarix.net port: 587 (STARTTLS) username: "YOUR_SMTP_USERNAME" # dashboard › SMTP password: "YOUR_SMTP_PASSWORD"
기능 감사(이 플랫폼)
아래 수치는 애플리케이션이 현재 통합자에게 노출하는 내용을 반영합니다. HTTPS + JSON을 보낼 수 있는 모든 언어가 이러한 엔드포인트를 호출할 수 있으며, 페이지에는 복사-붙여넣기 예제 스택 여섯 개가 포함되어 있습니다.
4
통합 표면
6
예제 언어
6
사용 패턴
Surfaces: (1) Transactional send REST, (2) Deliverability Intel REST, (3) SMTP relay (protocol, not JSON), (4) Outbound engagement webhooks (you receive signed HTTPS POSTs from Sendarix). Older /v1 endpoints for alerts, message lookup, domains, events, suppressions and usage are retired and return 410.
통합 표면
| 표면 | 메커니즘 | 베이스 / 진입 |
|---|---|---|
| 트랜잭션 발송 | POST JSON, 계정 API 키 | POST /v1/email/send |
| Retired v1 endpoints | Return 410 with code API_KEYS_RETIRED | /v1/send, /v1/alerts/ingest, /v1/email/{id}, /v1/domains, /v1/events, /v1/suppressions, /v1/reports/usage |
| Deliverability Intel | GET/POST JSON, 워크스페이스 전달성 API 키 | /api/deliverability/v1/* (7개 경로) |
| SMTP 릴레이 | SMTP AUTH(대시보드의 호스트, 포트, 사용자 이름, 비밀번호) | SMTP 릴레이 참조 |
| 참여 웹훅 | HTTPS 엔드포인트가 서명된 POST 수신 | 앱에서 구성 → 웹훅 |
인증
- Send API key: header
X-API-Key: …orAuthorization: Bearer …. Keys in the query string are not accepted. Each key belongs to one sending domain and service, andfrommust use that domain. - 전달성 API 키: 헤더
X-API-Key(워크스코프; Intel/전달성 모니터용으로 발급). - 멱등성(발송): 안전한 재시도를 위한 선택적
Idempotency-Key헤더.
Create and revoke keys in the dashboard under Developers › API keys. How many keys you can create depends on your plan (see Pricing).
Send API
POST https://app.sendarix.com/v1/email/send
JSON 본문 필드(명시되지 않은 한 필수):
from— required; an address on the domain the API key belongs toto— 문자열 또는 주소 배열subjecttextand/orhtml— optional strings; send at least one so the message has a body- Optional:
reply_to(one address),headers(up to 20; onlyList-Unsubscribe,List-Unsubscribe-Post,List-Id,In-Reply-To,References,Auto-Submitted,Precedence),metadata(up to 20 keys) - Not supported:
cc,bccandattachmentsare rejected with422 UNSUPPORTED_FIELD. There are no template or routing-policy fields; build the subject and body in your application.
to takes one address or a list of up to 50. Duplicates are removed, and each address is checked against suppressions, routed and sent as its own message. The response then adds results, recipient_count and accepted_count.A single-recipient send returns 200 with message_id, status, request_id and sx_trace_id. A suppressed address returns status: "suppressed" and is not sent. If the outcome cannot be confirmed, the API returns 202 with status: "unknown". With Idempotency-Key (up to 64 characters) a retry returns the stored result; the same key with a different body returns 409.
Retired endpoints
POST /v1/send, POST /v1/alerts/ingest and the older /v1 lookup endpoints return 410 API_KEYS_RETIRED.
Send with POST /v1/email/send or SMTP. Use the dashboard for logs and suppressions, and signed webhooks for delivery events. Remove calls to retired endpoints from existing integrations.
Deliverability Intel API
베이스: /api/deliverability/v1/. 엔드포인트에는 워크스페이스, 클라이언트, 도메인, 블랙리스트 상태, 보고서 생성이 포함됩니다. 모두 전달성 워크스페이스 API 키가 필요합니다.
GET | /workspaces |
GET | /clients |
POST | /clients |
GET | /domains |
POST | /domains |
GET | /blacklists/status |
POST | /reports/generate |
SMTP 릴레이 및 인바운드 스타일 웹훅
SMTP는 대시보드 자격 증명으로 표준 메일 제출을 사용합니다—레거시 앱 및 MTA에 적합합니다. 참여 웹훅은 전달 및 참여 이벤트를 위해 Sendarix에서 URL로 아웃바운드됩니다(페이로드 및 보안은 제품 페이지 참조).
제공업체 대면 인바운드 웹훅(예: Postal)은 인프라 엔드포인트이며 고객 통합 대상이 아닙니다.
Send API — 예제(6개 언어)
YOUR_API_KEY와 주소를 바꾸세요. 모든 스택에 동일한 JSON.
# Bash — 트랜잭션 발송
curl -sS -X POST 'https://app.sendarix.com/v1/email/send' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Idempotency-Key: order-10042-reset' \
-d '{
"from": "noreply@example.com",
"to": "user@example.com",
"subject": "\ube44\ubc00\ubc88\ud638 \uc7ac\uc124\uc815",
"text": "\uc774 \ub9c1\ud06c\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube44\ubc00\ubc88\ud638\ub97c \uc7ac\uc124\uc815\ud558\uc138\uc694.",
"html": "<p>\uc774 \ub9c1\ud06c\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube44\ubc00\ubc88\ud638\ub97c \uc7ac\uc124\uc815\ud558\uc138\uc694.</p>"
}'// Node 18+ (global fetch)
const res = await fetch('https://app.sendarix.com/v1/email/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY',
'Idempotency-Key': 'order-10042-reset',
},
body: JSON.stringify({
from: 'noreply@example.com',
to: 'user@example.com',
subject: "비밀번호 재설정",
text: "이 링크를 사용하여 비밀번호를 재설정하세요.",
html: "<p>이 링크를 사용하여 비밀번호를 재설정하세요.<\/p>",
}),
});
console.log(await res.json());# Python 3
import json, urllib.request
req = urllib.request.Request(
'https://app.sendarix.com/v1/email/send',
data=json.dumps({
'from': 'noreply@example.com',
'to': 'user@example.com',
'subject': "비밀번호 재설정",
'text': "이 링크를 사용하여 비밀번호를 재설정하세요.",
'html': "<p>이 링크를 사용하여 비밀번호를 재설정하세요.<\/p>",
}).encode(),
headers={
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY',
'Idempotency-Key': 'order-10042-reset',
},
method='POST',
)
with urllib.request.urlopen(req) as r:
print(r.read().decode())<?php
$ch = curl_init('https://app.sendarix.com/v1/email/send');
$payload = json_encode([
'from' => 'noreply@example.com',
'to' => 'user@example.com',
'subject' => '비밀번호 재설정',
'text' => '이 링크를 사용하여 비밀번호를 재설정하세요.',
'html' => '<p>이 링크를 사용하여 비밀번호를 재설정하세요.</p>',
]);\ncurl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY',
'Idempotency-Key: order-10042-reset',
],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);// Go
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]any{
"from": "noreply@example.com",
"to": "user@example.com",
"subject": "비밀번호 재설정",
"text": "이 링크를 사용하여 비밀번호를 재설정하세요.",
"html": "<p>이 링크를 사용하여 비밀번호를 재설정하세요.<\/p>",
})
req, _ := http.NewRequest("POST", "https://app.sendarix.com/v1/email/send", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Idempotency-Key", "order-10042-reset")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
}# Ruby — net/http
require 'json'
require 'net/http'
uri = URI('https://app.sendarix.com/v1/email/send')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req['X-API-Key'] = 'YOUR_API_KEY'
req['Idempotency-Key'] = 'order-10042-reset'
req.body = {
from: 'noreply@example.com',
to: 'user@example.com',
subject: "비밀번호 재설정",
text: "이 링크를 사용하여 비밀번호를 재설정하세요.",
html: "<p>이 링크를 사용하여 비밀번호를 재설정하세요.<\/p>",
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body 사용 패턴(6)
- 일회성 발송 — 메시지당 단일 POST, 멱등 헤더 없음.
- 멱등 재시도 — 네트워크 실패 시 동일한
Idempotency-Key+ 본문. - Bearer 인증 —
X-API-Key를Authorization: Bearer YOUR_API_KEY로 교체. - HTML + text — 지원되는 경우 multipart-alternative 스타일 렌더링을 위해 둘 다 제공.
- Several recipients — put up to 50 addresses in
toand compareaccepted_countwithrecipient_count. - 전달성 자동화 — 워크스페이스 키로
/api/deliverability/v1/*에서 Intel 리소스를 폴링 또는 변경.
관련