---
title: "Add a revenue stream to the forecast"
method: POST
path: "/companies/{companyId}/forecast/{forecastId}/streams"
tags: ["Forecast"]
---

# Add a revenue stream to the forecast

`POST /companies/{companyId}/forecast/{forecastId}/streams`

## Request

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

## Request body

- CreateForecastStreamInput
  - `type` 'subscription' | 'usage' | 'license' | 'onetime' | 'services_hours' | 'services_retainer', required
  - `label` string, required
  - `position` integer
  - `drivers` object, required: Discriminated driver fields for the stream type; validated against DRIVER_BOUNDS

## Response `200`

Created stream

- object
  - `success` boolean
  - `data` ForecastStream
    - `id` string, uuid
    - `forecastId` string, uuid
    - `type` 'subscription' | 'usage' | 'license' | 'onetime' | 'services_hours' | 'services_retainer' | 'ledger_run_rate'
    - `label` string
    - `position` integer
    - `drivers` object
    - `archived` boolean
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `422`: Validation error (unknown stream type or out-of-range driver)

---

[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)
