# AutoSend Inbound Email API

> Receive, parse, and reply to inbound emails via REST API. AutoSend handles parsing, attachment extraction, authentication verdicts (SPF, DKIM, DMARC), and threading. Available on Starter 10k and above.

Last updated: July 2026

---

## How It Works

Inbound email is webhook-driven. When an email arrives at your receiving address, AutoSend fires a webhook event to your endpoint. You then use the message ID from the event to fetch the full parsed email via API.

**Three steps:**

1. **Set up a webhook** — subscribe to the `email.received` event in your project settings
2. **Receive the event** — AutoSend POSTs the message ID, sender, subject, and thread metadata to your endpoint
3. **Fetch the parsed email** — call the Get Message endpoint to retrieve bodies, attachments, headers, and auth verdicts

---

## Receiving Domains

Every project gets a default receiving domain with no DNS setup required. You can also enable inbound on any verified custom domain.

---

## API Endpoints

**Base URL**: `https://api.autosend.com/v1/inbound/messages`

All requests require `Authorization: Bearer YOUR_API_KEY`.

---

### List Messages

Retrieve all inbound messages for your project, paginated.

**Endpoint**: `GET /v1/inbound/messages`

**Query params**: `page` (default: 1), `limit` (default: 50)

```bash
curl --location 'https://api.autosend.com/v1/inbound/messages?page=1&limit=50' \
--header 'Authorization: Bearer YOUR_API_KEY'
```

**Response**:

```json
{
	"success": true,
	"data": {
		"items": [
			{
				"id": "60d5ec49f1b2c72d9c8b1234",
				"messageId": "<CADxyz@mail.gmail.com>",
				"domainName": "support.example.com",
				"from": { "email": "customer@gmail.com", "name": "Jane Customer" },
				"to": [{ "email": "help@support.example.com", "name": null }],
				"cc": [],
				"subject": "Question about my order",
				"status": "PROCESSED",
				"attachmentCount": 0,
				"receivedAt": "2026-06-20T10:15:30.000Z"
			}
		],
		"pagination": { "page": 1, "limit": 50, "total": 1, "pages": 1 }
	}
}
```

---

### Get Message

Fetch a single message by ID with full parsed content.

**Endpoint**: `GET /v1/inbound/messages/:id`

```bash
curl --location 'https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234' \
--header 'Authorization: Bearer YOUR_API_KEY'
```

**Response**:

```json
{
	"success": true,
	"data": {
		"id": "60d5ec49f1b2c72d9c8b1234",
		"messageId": "<CADxyz@mail.gmail.com>",
		"domainName": "support.example.com",
		"from": { "email": "customer@gmail.com", "name": "Jane Customer" },
		"to": [{ "email": "help@support.example.com", "name": null }],
		"subject": "Question about my order",
		"text": "Hi, I wanted to check on the status of order #4821.",
		"html": "<p>Hi, I wanted to check on the status of order #4821.</p>",
		"attachments": [
			{
				"attachmentId": "att_60d5ec49f1b2c72d9c8b9999",
				"filename": "receipt.pdf",
				"contentType": "application/pdf",
				"size": 20480,
				"index": 0
			}
		],
		"spamVerdict": "PASS",
		"virusVerdict": "PASS",
		"spfVerdict": "PASS",
		"dkimVerdict": "PASS",
		"dmarcVerdict": "PASS",
		"status": "PROCESSED",
		"threadId": "60d5ec49f1b2c72d9c8b1234",
		"receivedAt": "2026-06-20T10:15:30.000Z"
	}
}
```

---

### Download Attachment

Download a file attachment by its index.

**Endpoint**: `GET /v1/inbound/messages/:id/attachments/:index`

```bash
curl --location \
  'https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/attachments/0' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--output receipt.pdf
```

Returns binary file content. `Content-Type` and `Content-Disposition` headers are set based on the original attachment.

---

### Reply to Message

Send a threaded reply to an inbound message. AutoSend sets `In-Reply-To` and `References` headers automatically so the conversation threads correctly in any email client.

**Endpoint**: `POST /v1/inbound/messages/:id/reply`

```bash
curl --location \
  'https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "from": {
    "email": "support@example.com",
    "name": "Support Team"
  },
  "html": "<p>Thanks for reaching out! We will look into order #4821 and get back to you shortly.</p>",
  "text": "Thanks for reaching out! We will look into order #4821 and get back to you shortly."
}'
```

**Response**:

```json
{
	"success": true,
	"message": "Reply queued",
	"data": {
		"emailId": "0102018f-0000-0000-0000-000000000000",
		"message": "Email queued successfully.",
		"status": "QUEUED",
		"totalRecipients": 1
	}
}
```

---

## Authentication Verdicts

Every inbound message includes SPF, DKIM, DMARC, spam, and virus verdicts. Possible values per verdict: `PASS`, `FAIL`, `GRAY`, `PROCESSING_FAILED`.

Use these to filter messages, flag suspicious senders, or enforce your own policies before processing.

---

## Scope and Limitations

- Inbound email is available on the **Starter 10k** plan and above
- API-only — there is no SMTP or SDK interface for receiving email
- Replies go through the same sending infrastructure as transactional emails and count toward your monthly volume
- Automation sequences cannot be triggered by inbound email events yet (planned)

---

## FAQs

**Do I need a custom domain to receive email?**
No. Every project gets a default receiving domain. Custom domains work too — enable inbound on any verified domain in your project settings.

**How do I get notified when an email arrives?**
Set up a webhook subscribed to the `email.received` event. AutoSend posts the message metadata to your endpoint as soon as the email is processed.

**Can I reply to inbound emails through the API?**
Yes. Use the Reply to Message endpoint with the message ID. AutoSend handles threading headers automatically.

**How do I access attachments?**
The Get Message response includes attachment metadata (filename, content type, size, index) for every file. Download any attachment by calling the Download Attachment endpoint with the attachment index.

**What authentication checks does AutoSend run on inbound email?**
AutoSend checks SPF, DKIM, and DMARC for every incoming message, plus spam and virus scanning. All verdicts are included in the Get Message response.

---

## Resources

- [Inbound Email page](https://autosend.com/inbound)
- [Inbound API Reference](https://docs.autosend.com/api-reference/inbound)
- [Webhooks Docs](https://docs.autosend.com/webhooks)
- [Pricing](https://autosend.com/pricing)
- [Support](mailto:support@autosend.com)
