---
title: "Create or replace the webhook configuration"
method: PATCH
path: "/v1/projectId/{projectId}/webhook"
tags: ["Webhook"]
---

# Create or replace the webhook configuration

`PATCH /v1/projectId/{projectId}/webhook`

## Request

- Base URL: `https://api.bluefox.email`
- URL: `https://api.bluefox.email/v1/projectId/{projectId}/webhook`
- Auth: HTTP bearer

## Path parameters

- `projectId` string, required

## Request body

- WebhookInput
  - `url` string, required
  - `secretKey` string, required: Must match one of this project's existing API keys (managed in the app under Project Settings > API Keys - not exposed via this API).
  - `bounce` boolean
  - `complaint` boolean
  - `click` boolean
  - `open` boolean
  - `sent` boolean
  - `failed` boolean
  - `subscription` boolean

## Response `200`

OK

- object
  - `status` integer
  - `result` Webhook
    - `url` string
    - `secretKey` string
    - `bounce` boolean
    - `complaint` boolean
    - `click` boolean
    - `open` boolean
    - `sent` boolean
    - `failed` boolean
    - `subscription` boolean

## Other responses

- `400`: Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
- `403`: Missing or invalid API key

---

[API](https://skmtc.dev/bluefox/apis/bluefox-email-public-api.md) · [All operations](https://skmtc.dev/bluefox/apis/bluefox-email-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bluefox/apis/bluefox-email-public-api/revisions/fa1a0a835c7f?raw)
