---
title: "Create or update configuration v2"
method: POST
path: "/resources/mail/v2/configurations"
tags: ["Email configuration"]
---

# Create or update configuration v2

`POST /resources/mail/v2/configurations`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/mail/v2/configurations`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/mail/v2/configurations/post.ts> (a function with typed inputs; its response is checked against the schema)

Configure and manage email settings with our controller, supporting SES, Mailgun, and SendGrid. Easily set the email provider and sender details, include additional parameters as needed, and send configuration data via POST. A vendor token from the authentication route is required.

## Request body

- object
  - `payload` union
    - SendGridDto
      - `provider` 'sendgrid', required
      - `secret` string, required
    - SesDto
      - `provider` 'ses', required
      - `secret` string, required
      - `id` string, required
      - `region` string, required
    - MailgunDto
      - `provider` 'mailgun', required
      - `secret` string, required
      - `domain` string, required
      - `region` number, required
    - SesRoleDto
      - `provider` 'ses-role', required
      - `secret` string, required
      - `region` string, required

## Response `201`

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
