---
title: "Prepare a required customer webhook and return its signing secret"
method: PUT
path: "/v1/projects/{project_id}/environments/{environment_id}/mail-webhook"
---

# Prepare a required customer webhook and return its signing secret

`PUT /v1/projects/{project_id}/environments/{environment_id}/mail-webhook`

## Request

- Base URL: `https://app.ohmyho.st`
- URL: `https://app.ohmyho.st/v1/projects/{project_id}/environments/{environment_id}/mail-webhook`
- Auth: HTTP bearer

One production mail domain per project; environment_id is the project Prod environment ID. Dev and Prod application URLs do not create separate mail domains. Provider credentials never leave ohmyho.st. Content expires 72 hours after original receipt.

## Path parameters

- `project_id` string, required
- `environment_id` string, required

## Headers

- `X-Request-Id` string
- `Idempotency-Key` string, required

## Request body

- ManagedMailWebhookRequest
  - `url` string, uri, required

## Response `200`

Authorized mail result.

- ManagedMailWebhook
  - `url` string, uri, required
  - `signing_secret` string, required: Server-only signing secret. Never log or send it to the browser.
  - `status` 'verification_required', required

## Other responses

- `400`: The request failed.
- `401`: The request failed.
- `403`: The request failed.
- `404`: The request failed.
- `409`: The request failed.
- `429`: The request failed.
- `503`: The request failed.

---

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