---
title: "Record an email in or out of an agent mailbox"
method: POST
path: "/api/v1/agent-memory/events"
tags: ["Agent Memory"]
---

# Record an email in or out of an agent mailbox

`POST /api/v1/agent-memory/events`

## Request

- Base URL: `https://api.presscart.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.presscart.com/api/v1/agent-memory/events`
- Auth: HTTP bearer

## Request body

- object
  - `source` 'gmail' | 'front', required
  - `mailbox` string, email, required
  - `source_event_id` string, required
  - `external_thread_id` string, required
  - `occurred_at` string, date-time, required
  - `from` string, email, required
  - `to` string[]
  - `cc` string[]
  - `sent_by_agent` boolean
  - `sender_authenticated` boolean, required: Whether Gmail Authentication-Results shows an aligned DKIM pass or dmarc=pass; ignored on outgoing email. Front gives no authentication result, so a Front email must send false, and Front events record incoming email only.
  - `approved_by` string
  - `rfc_message_id` string
  - `in_reply_to` string
  - `references` string[]
  - `subject` string
  - `body` string, required

## Response `201`

Event recorded or already recorded

- object
  - `event_id` string, uuid, required
  - `conversation_id` string, uuid, required
  - `participant_mismatch` boolean, required

## Other responses

- `401`: Invalid agent token
- `403`: Missing scope or mailbox not allowed

---

[API](https://skmtc.dev/presscart/apis/presscart-prod-api.md) · [All operations](https://skmtc.dev/presscart/apis/presscart-prod-api/llms.txt) · [OpenAPI document](https://skmtc.dev/presscart/apis/presscart-prod-api/revisions/2154581d845e?raw)
