---
title: "Update an opex row"
method: PUT
path: "/companies/{companyId}/forecast/{forecastId}/opex/{opexId}"
tags: ["Forecast"]
---

# Update an opex row

`PUT /companies/{companyId}/forecast/{forecastId}/opex/{opexId}`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/forecast/{forecastId}/opex/{opexId}`
- Auth: HTTP bearer

## Request body

- UpdateForecastOpexInput
  - `name` string
  - `behavior` 'fixed' | 'pct_revenue' | 'per_head'
  - `amountCents` integer, nullable
  - `pct` number, nullable
  - `position` integer

## Response `200`

Updated opex row

- object
  - `success` boolean
  - `data` ForecastOpex
    - `id` string, uuid
    - `forecastId` string, uuid
    - `name` string
    - `behavior` 'fixed' | 'pct_revenue' | 'per_head'
    - `amountCents` integer, nullable: Fixed or per-head amount in the model's authoritative minor units
    - `pct` number, nullable: Percentage of revenue (for pct_revenue), in [0,1]
    - `position` integer

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `422`: Validation error

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
