# An email was sent directly

Source: https://docs.emelia.io/docs/inbox-api/draft-sent

Guide: [Inbox API](https://docs.emelia.io/docs/inbox-api.md)

Webhook event `draft.sent`: Emelia sends an HTTP POST request to your URL.

Fired by direct sends only: `POST /drafts/send` and the direct send of the inbox app. Not fired when a saved draft is sent from the app, nor for scheduled sends, auto-replies or auto-forwards.

Registration: webhook subscriptions cannot be created with an API key, and Emelia has no screen for them yet: contact support.

## Headers

| Header | Description |
|---|---|
| `X-Maylee-Event` | Event name, same as `event` in the body. |
| `X-Maylee-Signature` | `t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" keyed with the webhook secret>`. Reject deliveries older than 300 seconds and compare in constant time. |
| `User-Agent` | Fixed User-Agent of the delivery client. Do not use it to authenticate a delivery: verify the signature. |

## Payload

| Field | Type | Required | Description |
|---|---|---|---|
| `event` | any | yes |  |
| `createdAt` | string (date-time) | yes | Time of THIS delivery attempt (changes on retries). |
| `data` | object | yes |  |
| `data.mailboxId` | string | yes |  |
| `data.messageId` | string | yes |  |
| `data.threadId` | string or null | yes |  |
| `data.to` | array of string | yes | Addresses of `to` only (cc and bcc are not listed). |
| `data.subject` | string | yes |  |

```json
{
  "event": "draft.sent",
  "createdAt": "2026-10-08T09:12:51.000Z",
  "data": {
    "mailboxId": "cmbxacme0000000000000001",
    "messageId": "<20261008100233.acme02@acme.com>",
    "threadId": "18c2acme0001",
    "to": [
      "jane.roe@example.com"
    ],
    "subject": "Re: Partnership with Acme"
  }
}
```
