# Getting started

In this guide, you'll set up your account and send your first email using the Twilio Email API.

## Prerequisites

Before you begin, ensure you have the following:

* **A Twilio account**: [Sign up for a free account](https://www.twilio.com/try-twilio).
* **A Verified Sender**: An approved domain identity in the Twilio Console that matches the domain of the `from` address.
* **Compliance**: Ensure your email content and recipient lists comply with regional anti-spam regulations, for example CAN-SPAM and GDPR.

## Authenticate your requests

The API uses HTTP Basic authentication. To authenticate, include a Basic Auth header using one of the following pairs:

* Your **Account SID** and **Auth Token**
* Your **API Key SID** and **API Key Secret**

## Send your first email

```bash
curl -X POST 'https://comms.twilio.com/v1/Emails' \
-H 'Content-Type: application/json' \
-d '{
    "from": {
        "address": "support@example.com",
        "name": "Support Team"
    },
    "to": [
        {
            "address": "john.doe@example.com",
            "name": "John Doe"
        }
    ],
    "content": {
        "subject": "Your subject line",
        "html": "<p>Your message content in HTML format.</p>",
        "text": "Your message content in plain text."
    }
}' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

**Response (202 Accepted)**:

```json
{
    "operationId": "comms_operation_01h9krwprkeee8fzqspvwy6nq8",
    "operationLocation": "https://comms.twilio.com/v1/Emails/Operations/comms_operation_01h9krwprkeee8fzqspvwy6nq8"
}
```

## What's next?

See [Mail Send](/docs/email/api/mail-send) for more details on sending emails, including how to send to multiple recipients and use advanced features like templates and attachments.
