---
title: "Send your first email"
description: "Make an API key and send. No agent to create first, no domain to add, no DNS to publish."
url: https://help.mails.ai/en/articles/2-send-your-first-email
collection: "Getting started"
updated: 2026-10-11
language: en
---

# Send your first email

Make an API key and send. No agent to create first, no domain to add, no DNS to publish.

![Mails.ai — Send your first email](https://staticfiles.gleap.io/p6a77ce6bbe980ea9dbca1955/ymEi1t4NwDH8WERojjURJDGs20BHZqQ1FKC4bByGSKkHSdTBim2giLnYq7ctJR86CtWML7x93Mm.png)

You do not have to set anything up before your first send: signup gave you an agent called `hello`. Create a key and put that name in the `from` field. On a paid plan, a new name there creates another agent on first use.

![The API keys page with two live keys and one test key](https://staticfiles.gleap.io/p6a77ce6bbe980ea9dbca1955/AMAKuWn1lnb37vuDHhi31x4m5blefYgjk6kEyTszoH5fsHM0SH6WZrVWHtujQoc7SF0vcl9Xj6y.png)

## 1\. Make a key

Open [API keys](https://app.mails.ai/api-keys) in the dashboard and press **New API key**. A live key starts `mk_live_`; a test key starts `mk_test_`. The full key is shown once — copy it then.

## 2\. Send

```bash
curl -X POST https://api.mails.ai/v1/messages \
  -H "Authorization: Bearer mk_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello",
    "to": "reply@test.mails.ai",
    "subject": "Demo confirmation",
    "body_text": "Confirmed for Tuesday at 2pm ET."
  }'
```

You get `201` with the new message's `id`, its `status` and its `from`: the agent that sent it, by its API address `hello@<your-workspace>.mails.ai`. Recipients see the mail from `hello.<your-workspace>@send.mails.ai`. `GET /v1/messages/{id}` returns the whole message. `reply@test.mails.ai` is our test address: nothing is delivered, and moments later a real reply lands in your agent's inbox, so you see the reply half work before you mail a customer.

## Or use an SDK

```javascript
// npm install @mailsai/sdk    (ESM — use import, not require)
import { createClient } from "@mailsai/sdk";

const mails = createClient();            // reads MAILS_API_KEY

const sent = await mails.send({
  from: "hello",
  to: "reply@test.mails.ai",
  subject: "Demo confirmation",
  body: "Confirmed for Tuesday at 2pm ET.",
});
console.log(sent.from);                  // hello@<your-workspace>.mails.ai
```

There is a Python SDK too: `pip install mailsai`. To drive mails.ai from Claude, ChatGPT or Cursor instead, add `https://api.mails.ai/mcp` as a connector and sign in. There is nothing to install.

[Create an API key](https://app.mails.ai/api-keys)
