---
title: "Replace producer birth-history settings"
method: PUT
path: "/v1/farm/{farm_id}/birth-history/settings"
tags: ["birth-history"]
---

# Replace producer birth-history settings

`PUT /v1/farm/{farm_id}/birth-history/settings`

## Request

- Base URL: `https://api.ranch.bot`
- URL: `https://api.ranch.bot/v1/farm/{farm_id}/birth-history/settings`
- Auth: HTTP bearer

Requires write:records and current editor membership. The producer supplies species gestation/age intervals and zero-to-many absolute birth windows. An empty window list means no planned windows. Configuration changes invalidate earlier birth previews.

## Path parameters

- `farm_id` string, uuid, required

## Request body

- BirthHistorySettings
  - `version` 1, required
  - `species` 'BISON' | 'CATTLE' | 'ELK' | 'GOAT' | 'HORSE' | 'OTHER' | 'PIG' | 'SHEEP', required
  - `gestation_days` object
    - `min` integer, required
    - `max` integer, required
  - `minimum_sire_age_days` integer
  - `birth_windows` object[]
    - `label` string, required
    - `start_date` string, required
    - `end_date` string, required

## Response `200`

Farm-scoped birth history

- object
  - `species` string, required
  - `settings` BirthHistorySettings, required
    - `version` 1, required
    - `species` 'BISON' | 'CATTLE' | 'ELK' | 'GOAT' | 'HORSE' | 'OTHER' | 'PIG' | 'SHEEP', required
    - `gestation_days` object
      - `min` integer, required
      - `max` integer, required
    - `minimum_sire_age_days` integer
    - `birth_windows` object[]
      - `label` string, required
      - `start_date` string, required
      - `end_date` string, required

## Other responses

- `400`: Invalid dates, bounds, or mismatched species
- `401`: Authentication required
- `403`: Current farm access and required scopes required
- `404`: Farm or animal not found

---

[API](https://skmtc.dev/ranch/apis/ranch-bot-http-api.md) · [All operations](https://skmtc.dev/ranch/apis/ranch-bot-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranch/apis/ranch-bot-http-api/revisions/24109d33fa02?raw)
