---
title: "Email API | Prontuno"
description: "Send receipts, password resets, and account alerts with a single HTTP request. The same integration works for your first email and your millionth."
canonical: https://prontuno.com/features/email-api/
---

# Transactional email, built into your application.

**Email API · REST · JSON**

Send receipts, password resets, and account alerts with a single HTTP request. The same integration works for your first email and your millionth.

[Request access](https://app.prontuno.com/get-started/) · [Read the send email reference](https://prontuno.com/api-reference/emails/send-email/)

## Send an email

### Example request and response

`POST /v1/emails`

```json
{
  "from": "receipts@example.com",
  "to": "ada@example.com",
  "subject": "Your receipt",
  "html": "<p>Thanks for your order.</p>"
}
```

`202 Accepted`

```json
{
  "emails": [{
    "id": "email_01kxwz4bfhe00rr3ww02remnap",
    "status": "queued"
  }]
}
```

Accepted requests return an email ID you can use to inspect delivery.

## Everything you need to send and track email

The API suits applications you write yourself: your code sends each message and can follow what happened to it, without running mail servers.

### Send one or many

Create a single email, or submit up to 1,000 emails in one batch request.

### Manage domains and keys

Add sending domains, create a key bound to each one, and manage the addresses you should not send to, from the same API.

### Look up any message

Check an email’s status and see when it was sent, delivered, bounced, or rejected.

## Built for integrations that retry

Networks fail and background jobs run twice. The API is designed so that retrying a request is safe and every error can be handled in code.

### Idempotent sends

A request sent with an Idempotency-Key header is accepted once. Repeating it within 24 hours returns the original response instead of sending again.

### Batches of up to 1,000

Every email in a batch is validated before any is accepted, so one invalid item cannot leave a batch half-sent.

### Attachments and headers

Emails can carry file attachments, inline images referenced by Content-ID, and custom headers, up to 25 MB per message (32 MB HTTP request limit).

### Errors your code can act on

Every error includes a code, the field that caused it, whether a retry can succeed, and a suggested next action.

### Send an email examples

#### cURL

```shell
curl https://api.prontuno.net/v1/emails \
  -H "Authorization: Bearer $PRONTUNO_SENDING_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042-receipt" \
  -d '{
    "from": "receipts@example.com",
    "to": "ada@example.com",
    "subject": "Your receipt",
    "html": "<p>Thanks for your order.</p>"
  }'
```

#### Node.js

```js
import { Prontuno } from 'prontuno';

const prontuno = new Prontuno({
  sendingKey: process.env.PRONTUNO_SENDING_KEY,
});

const { emails } = await prontuno.emails.send(
  {
    from: 'receipts@example.com',
    to: 'ada@example.com',
    subject: 'Your receipt',
    html: '<p>Thanks for your order.</p>',
  },
  { idempotencyKey: 'order-1042-receipt' },
);
```

#### PHP

```php
use Prontuno\Prontuno;

$prontuno = new Prontuno(
    sendingKey: getenv('PRONTUNO_SENDING_KEY') ?: null,
);

$result = $prontuno->emails->send([
    'from' => 'receipts@example.com',
    'to' => 'ada@example.com',
    'subject' => 'Your receipt',
    'html' => '<p>Thanks for your order.</p>',
], idempotencyKey: 'order-1042-receipt');

$emails = $result['emails'];
```

#### Laravel

```php
use Prontuno\Laravel\Facades\Prontuno;

// Uses PRONTUNO_SENDING_KEY from your .env file.
$result = Prontuno::emails()->send([
    'from' => 'receipts@example.com',
    'to' => 'ada@example.com',
    'subject' => 'Your receipt',
    'html' => '<p>Thanks for your order.</p>',
], idempotencyKey: 'order-1042-receipt');

$emails = $result['emails'];
```

#### Go

```go
client, err := prontuno.NewClient(
	prontuno.WithSendingKey(os.Getenv("PRONTUNO_SENDING_KEY")),
)

result, err := client.Emails.Send(ctx, &prontuno.EmailInput{
	From:    "receipts@example.com",
	To:      []string{"ada@example.com"},
	Subject: "Your receipt",
	HTML:    "<p>Thanks for your order.</p>",
}, prontuno.WithIdempotencyKey("order-1042-receipt"))
```

#### Python

```python
import os
from prontuno import Prontuno

prontuno = Prontuno(sending_key=os.environ["PRONTUNO_SENDING_KEY"])

result = prontuno.emails.send(
    {
        "from": "receipts@example.com",
        "to": "ada@example.com",
        "subject": "Your receipt",
        "html": "<p>Thanks for your order.</p>",
    },
    idempotency_key="order-1042-receipt",
)

emails = result["emails"]
```

#### Ruby

```ruby
require "prontuno"

prontuno = Prontuno::Client.new(
  sending_key: ENV.fetch("PRONTUNO_SENDING_KEY")
)

result = prontuno.emails.send(
  {
    from: "receipts@example.com",
    to: "ada@example.com",
    subject: "Your receipt",
    html: "<p>Thanks for your order.</p>"
  },
  idempotency_key: "order-1042-receipt"
)

emails = result[:emails]
```

## Send your first email

1. Request access and verify a sending domain.
2. Create an API key with sending access.
3. Send an email and check its delivery status.

[Read the send email reference](https://prontuno.com/api-reference/emails/send-email/)

## Explore more of Prontuno

- [Webhooks](https://prontuno.com/features/webhooks/) — Get delivery events in real time.
- [SMTP relay](https://prontuno.com/features/smtp-relay/) — Connect existing apps over SMTP.
- [Domain authentication](https://prontuno.com/features/domain-authentication/) — Set up SPF, DKIM, and DMARC.
- [Dedicated IP](https://prontuno.com/features/dedicated-ip/) — An IP reserved for your team.

## Request access

Ready to send with Prontuno? Request access and tell us about your sending needs. Applications are reviewed within 24 hours.

[Request access](https://app.prontuno.com/get-started/)
