# 메시지 보내기 cURL

> 설정을 테스트하기 위해 터미널에서 바로 보내십시오.

## 전제 조건

- A Sendtern [API 키](https://sendtern.com/docs/authentication)로 저장 `SENDTERN_API_KEY`
- A terminal with `curl` installed (it ships with macOS, Linux and Windows 10+)

1. **이메일 보내기**: Run this in your terminal.

```
curl -X POST https://sendtern.com/emails \
  -H "Authorization: Bearer $SENDTERN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <hello@mail.example.com>",
    "to": ["you@example.com"],
    "subject": "Hello from the terminal",
    "html": "<p>It works!</p>"
  }'
```

2. **응답을 확인하십시오**: 성공적인 요청은 이메일 id와 함께 `200 OK`를 반환합니다. 이를 사용하여 나중에 이메일을 찾을 수 있습니다.

```
{
  "id": "47be30ca-24b7-48fb-b35d-ff287b89e66d"
}
```

> **tip:** 예제 발신자를 [확인된 도메인](https://sendtern.com/docs/domains)의 주소로 바꿉니다.
