---
title: "Update an email delivery connection"
method: PATCH
path: "/v1/email-delivery-connections/{connection_id}"
tags: ["Email Delivery Connections"]
---

# Update an email delivery connection

`PATCH /v1/email-delivery-connections/{connection_id}`

## Request

- Base URL: `https://api.mailrith.com`
- URL: `https://api.mailrith.com/v1/email-delivery-connections/{connection_id}`
- Auth: HTTP bearer

Changes non-secret details for one connection linked only to the authenticated workspace. Use a secure setup session to replace provider credentials. Shared connections must be changed in the Mailrith UI.

## Path parameters

- `connection_id` string, required

## Request body

- EmailDeliveryConnectionUpdateRequest: Updates non-secret connection details. Use a secure setup session to replace provider credentials.
  - `name` string
  - `from_email` string, email
  - `from_name` string

## Response `200`

Successful response

- object
  - `data` EmailDeliveryConnection, required
    - `self` string, required: Stable relative Public API path for retrieving this resource.
    - `id` string, required
    - `name` string, required
    - `provider` 'amazon-ses' | 'postmark' | 'sendgrid' | 'mailgun' | 'resend' | 'brevo' | 'custom-smtp', required
    - `from_email` string, email, required
    - `from_name` string, required
    - `enabled` boolean, required
    - `provider_config` EmailDeliveryProviderPublicConfig, required: Secret-free provider settings. Boolean fields only indicate whether a saved credential exists.
      - `region` string
      - `access_key_id` string
      - `has_secret_access_key` boolean
      - `has_server_token` boolean
      - `has_account_token` boolean
      - `message_stream` string, nullable
      - `has_api_key` boolean
      - `domain` string
      - `host` string
      - `port` integer
      - `secure_mode` 'starttls' | 'tls' | 'none'
      - `username` string
      - `has_password` boolean
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: The non-secret connection details are invalid.
- `409`: The connection is shared or currently in use and cannot be changed through a workspace-scoped credential.

---

[API](https://skmtc.dev/mailrith/apis/mailrith-api.md) · [All operations](https://skmtc.dev/mailrith/apis/mailrith-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailrith/apis/mailrith-api/revisions/41f09536f2da?raw)
