---
title: "Log a sent email (internal use)"
method: POST
path: "/api/webhooks/email-sent"
tags: ["Webhooks"]
---

# Log a sent email (internal use)

`POST /api/webhooks/email-sent`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/webhooks/email-sent`
- Auth: API key in header `x-api-key`

Called by communications service to log emails after sending via Resend

## Request body

- object
  - `resend_id` string, required
  - `email_type` string, required
  - `from_email` string, required
  - `to_email` string, required
  - `subject` string, required
  - `user_id` string, uuid
  - `metadata` object

## Response `201`

Email logged successfully

## Other responses

- `400`: Invalid request
- `401`: Invalid API key

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
