---
title: "Replace Model"
method: PUT
path: "/v1/forecasts/models/{model_id}"
tags: ["Models"]
---

# Replace Model

`PUT /v1/forecasts/models/{model_id}`

Replaces the full configuration of an existing forecast model. This is a full replacement — all mutable fields should be provided. Changes to `location`, `demand_type`, `forecast_window`, `algo`, or `generate_baseline` are blocked while the model is in `preparing`, `training`, or `forecasting` status. Changing any of those fields sets the model to `stale` status, requiring re-training to take effect.

## Path parameters

- `model_id` string, required

## Request body

- ReplaceModelRequest
  - `name` string, required — Name for the forecast model.
  - `external_id` string, nullable — User-provided external identifier for cross-referencing with other systems.
  - `forecast_window` '1d' | '7d' | '14d' | '28d' | '30d' | '60d' | '90d'
  - `label` string[], nullable — Set of labels you can use to better identify or group your forecast models.
  - `location` Location, required — Location of the Analysis. Supports one of the following location options: - `saved_location_id` - `geopoint` with `radius` and `unit`
    - `geopoint` GeoPoint — Contains `lat` and `lon` coordinates for your analysis, e.g. if you are creating an analysis for a store in Seattle you'd specify the latitude and longitude of your store.
      - `lat` string, required — Latitude coordinate as a decimal number between -90 and 90.
      - `lon` string, required — Longitude coordinate as a decimal number between -180 and 180.
    - `radius` number — Must be an integer or a float number up to 2 decimal places. It represents the radius of the event search around your `geopoint` to use for time series modelling and correlation. We **strongly recommend** using the [Suggested Radius API](https://docs.predicthq.com/api/suggested-radius/get-suggested-radius) to find a suitable radius for your location/industry.
    - `unit` 'm' | 'mi' | 'km' | 'ft' — The unit for `radius` where - `m` is meters - `km` is kilometers - `ft` is feet - `mi` is miles
    - `saved_location_id` string — The ID of a previously created Saved Location for your analysis as documented at [Saved Locations API](https://docs.predicthq.com/api/saved-locations/create-a-saved-location)
  - `algo` 'phq-xgboost' — Algorithm to use for forecasting.
  - `demand_type` InputDemandType
    - `interval` 'day'
    - `industry` 'accommodation' | 'cpg' | 'tourism' | 'marketing' | 'parking' | 'restaurants' | 'retail' | 'transportation' | 'other' — The industry of the demand data being analysed by Beam. Choosing the right `industry` is important as this will determine the type of features used in the Analysis and will impact the accuracy of the results.

## Response `204`

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)
