---
title: "Create Model Demand"
method: POST
path: "/v1/forecasts/models/{model_id}/demand"
tags: ["Demand Data"]
---

# Create Model Demand

`POST /v1/forecasts/models/{model_id}/demand`

Uploads historical demand data for a forecast model. The model must exist and belong to the authenticated organization.

You can use any of the following content types:
- `application/json`: A JSON object with a `demand` array of `{date, demand}` objects.
- `text/csv`: A CSV file with lowercase headers `date,demand` and one row per data point.
- `application/x-ndjson`: Newline-delimited JSON where each line is a `{date, demand}` object.

The `date` field should be in `YYYY-MM-DD` format and `demand` must be a non-negative number.

## Path parameters

- `model_id` string, required

## Headers

- `Content-Type` 'text/csv' | 'application/x-ndjson' | 'application/json', required

## Request body

- CreateModelDemandRequest
  - `demand` DemandInput[], required — Array of demand data points to upload. Each item must include a date and demand value.
    - `demand` number, required — Number value (float or integer, must be a positive number). For example, it could be units sold, room bookings, or number of staff rostered on per day or any other unit.
    - `date` string, date, required — Expected format: `2025-02-21`

## Response `201`

Successful Response

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/predicthq/apis/predicthq-events-api.md) · [All operations](https://skmtc.net/predicthq/apis/predicthq-events-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/predicthq/predicthq-events-api/revisions/66cd8ff349dd/schema)
