---
title: "Create a new dynamic rule"
method: POST
path: "/v2/forecasts/dynamic-rules"
tags: ["Forecast Dynamic Rules"]
---

# Create a new dynamic rule

`POST /v2/forecasts/dynamic-rules`

## Query parameters

- `externalUnitId` string, required
- `externalSectionId` string

## Request body

- ForecastDataIngestionExternalDynamicRule
  - `forecastExternalVariableId` string, required
  - `amount` integer, required
  - `weekdays` integer[], required
  - `startTime` string, required
  - `endTime` string, required
  - `shiftTypes` ForecastDataIngestionExternalShiftType[], required
    - `externalShiftTypeId` string, required
    - `amount` integer, required

## Response `201`

Success

## Other responses

- `403` — Forbidden to perform this action

## Changes

- **2026-08-13** `70a12bbb88c9` — 2 info
  - the endpoint scheme security `OAuth2ClientCredentials` was added to the API
  - the endpoint scheme security `OAuth2ClientCredentials` was added to the API

[Change history](https://skmtc.dev/quinyx/apis/quinyx-api/changes/v2/forecasts/dynamic-rules/post.md)

---

[API](https://skmtc.dev/quinyx/apis/quinyx-api.md) · [All operations](https://skmtc.dev/quinyx/apis/quinyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/quinyx/quinyx-api/revisions/70a12bbb88c9/schema)
