---
title: "PATCH /api/projects/{project_id}/workflow_sending_rules/current/"
method: PATCH
path: "/api/projects/{project_id}/workflow_sending_rules/current/"
tags: ["workflow_sending_rules"]
---

# PATCH /api/projects/{project_id}/workflow_sending_rules/current/

`PATCH /api/projects/{project_id}/workflow_sending_rules/current/`

## Request

- Base URL: `https://us.posthog.com`
- URL: `https://us.posthog.com/api/projects/{project_id}/workflow_sending_rules/current/`
- Auth: HTTP bearer

The project-wide rules every workflow and broadcast follows when it sends a message.

## Path parameters

- `project_id` string, required

## Request body

- PatchedWorkflowSendingRules
  - `project_id` integer: The project these sending rules belong to.
  - `expected_project_id` integer: Optional. The project_id from the rules being changed. The update is rejected when it does not match the current project, so a change never lands in a project the user did not look at.
  - `marketing_frequency_cap_max_messages` integer, nullable: The most marketing messages one person gets in the window, across all workflows and broadcasts. Set it together with marketing_frequency_cap_window_days, or set both to null to turn the cap off. Transactional messages are never capped. The recommended cap is 1 message every 2 days.
  - `marketing_frequency_cap_window_days` integer, nullable: The length of the rolling frequency cap window, in days. Set it together with marketing_frequency_cap_max_messages, or set both to null to turn the cap off.
  - `email_tracking_consent_mode` 'off' | 'opt_out' | 'opt_in': * `off` - Off * `opt_out` - Opt Out * `opt_in` - Opt In
  - `capture_workflows_engagement_events` boolean: Capture email sends, opens, clicks and bounces as PostHog events, so they can be used in insights and funnels. These events count toward the project's event usage.

## Response `200`

- WorkflowSendingRules
  - `project_id` integer, required: The project these sending rules belong to.
  - `expected_project_id` integer: Optional. The project_id from the rules being changed. The update is rejected when it does not match the current project, so a change never lands in a project the user did not look at.
  - `marketing_frequency_cap_max_messages` integer, nullable: The most marketing messages one person gets in the window, across all workflows and broadcasts. Set it together with marketing_frequency_cap_window_days, or set both to null to turn the cap off. Transactional messages are never capped. The recommended cap is 1 message every 2 days.
  - `marketing_frequency_cap_window_days` integer, nullable: The length of the rolling frequency cap window, in days. Set it together with marketing_frequency_cap_max_messages, or set both to null to turn the cap off.
  - `email_tracking_consent_mode` 'off' | 'opt_out' | 'opt_in': * `off` - Off * `opt_out` - Opt Out * `opt_in` - Opt In
  - `capture_workflows_engagement_events` boolean: Capture email sends, opens, clicks and bounces as PostHog events, so they can be used in insights and funnels. These events count toward the project's event usage.

## Changes

> 53 revisions in range; 1 not diffed.

- **2026-10-20** `d214e42eafc1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/posthog/apis/posthog-api/changes/api/projects/:project_id/workflow_sending_rules/current/patch.md)

---

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