# Send with cURL

> Send straight from the terminal to test your setup.

## Prerequisites

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

1. **Send an email**: 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. **Check the response**: A successful request returns `200 OK` with the email id. Use it to look the email up later.

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

> **tip:** Replace the example sender with an address on your [verified domain](https://sendtern.com/docs/domains).
