Mail API reference

Mail API · Outbound-Messages

patch/v1/workspaces/{workspace_id}/messages/settingsAuth

Update this workspace's outbound-message settings. Gated on `mail.message.delete` — same privilege bar as RTBF, since both touch the PII boundary.

Path parameters

workspace_id*string · uuid

Id of the workspace.

Headers

Idempotency-Keystring

Opaque client-generated string (1–256 chars, `[A-Za-z0-9._:-]`) used to deduplicate retries within a 24h window. A retry with the same key and body returns the original response with `Idempotent-Replay: true`.

Request body

redact_bodies*boolean

When true, messages sent from now on are logged without their body (nothing is stored), and /messages/:id/body returns null body_html + body_text even to callers with mail.message.body.read. Turn it on for workspaces whose mail carries single-use links or codes. Turning it off later does not bring back bodies of messages sent while it was on. Defaults to false.

Response · 200

workspace_id*string · uuid

The workspace the settings belong to.

redact_bodies*boolean

When true, message bodies are not stored: `messages.body` returns nothing for new sends.

Example

Request

PATCH https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/messages/settings
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "redact_bodies": false
}

Response

{
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "redact_bodies": false
}