전자 우편
이메일 보내기
전송을 위해 트랜잭션 이메일을 대기열에 넣습니다.
POST/emails
1curl -X POST 'https://sendtern.com/emails' \
2 -H 'Authorization: Bearer st_your_api_key' \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "from": "Acme <hello@mail.acme.io>",
6 "to": [
7 "ada@example.com"
8 ],
9 "subject": "Your sign-in code",
10 "html": "<p>482 913</p>",
11 "tags": [
12 {
13 "name": "category",
14 "value": "auth"
15 }
16 ]
17}'
응답
1{
2 "id": "47be30ca-24b7-48fb-b35d-ff287b89e66d"
3}
Accepts the email and returns HTTP 200 with its ID. Delivery happens asynchronously; follow it with Retrieve email. Send an Idempotency-Key header to retry safely.
몸의 매개변수
fromstring필요한 항목보낸 사람 주소. 친숙한 이름으로 Name <address>를 사용하십시오. 도메인은 확인되어야 합니다.
tostring | string[]필요한 항목수신자 주소 또는 최대 50개의 배열.
subjectstring필요한 항목이메일 제목, 최대 500 글자.
htmlstringHTML 본문. text가 설정되지 않은 경우 필수.
textstring일반 텍스트 본문. 텍스트, HTML 또는 게시된 템플릿을 제공합니다.
ccstring | string[]복사 받는 사람. 50명 수신자 한도를 향해 세어보십시오.
bccstring | string[]암호화된 복사본 수신자. 50명 수신자 한도를 향해 세십시오.
reply_tostring | string[]답변이 갈 곳이야
templateobject게시된 템플릿 ID 또는 별칭과 선택적 변수.
머릿말
Idempotency-Keystring최대 256자. 동일한 키를 참조하십시오.