> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stax.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create forecast scenario

> Save a named forecast scenario with its assumptions.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /deals/forecast/scenario
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /deals/forecast/scenario:
    post:
      tags:
        - deals
      summary: Create forecast scenario
      description: Save a named forecast scenario with its assumptions.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_deals_forecast.NewScenarioRequest
        description: Scenario creation data
        required: true
      responses:
        '200':
          description: Created scenario
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/stax_ai_cx_cx-api_pkg_routes_deals_reporting.ForecastScenario
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Forbidden - deals analytics not enabled
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_deals_forecast.NewScenarioRequest:
      type: object
      properties:
        assumptions:
          $ref: >-
            #/components/schemas/stax_ai_cx_cx-api_pkg_routes_deals_reporting.ForecastAssumptions
        funnel:
          type: string
        name:
          type: string
    stax_ai_cx_cx-api_pkg_routes_deals_reporting.ForecastScenario:
      type: object
      properties:
        _id:
          type: string
        assumptions:
          $ref: >-
            #/components/schemas/stax_ai_cx_cx-api_pkg_routes_deals_reporting.ForecastAssumptions
        created_at:
          type: string
        created_by:
          type: string
        deleted_at:
          type: string
        funnel:
          description: nil = all funnels
          type: string
        name:
          type: string
        team:
          type: string
        updated_at:
          type: string
    stax_ai_cx_cx-api_pkg_routes_deals_reporting.ForecastAssumptions:
      type: object
      properties:
        cycle_days_fixed:
          description: >-
            Fixed sales cycle length in days; overrides VelocityMultiplier when
            set (implied multiplier = historical avg cycle / fixed)
          type: number
        pipeline_gen_monthly:
          description: Monthly $ of new pipeline generated; nil = derive from historicals
          type: number
        reps_added:
          description: >-
            Number of hypothetical reps added (each contributes the per-rep
            average pipeline generation)
          type: integer
        reps_removed:
          description: >-
            Existing reps removed from the model (their open deals and
            contribution are excluded)
          type: array
          items:
            type: string
        tolerance_pct:
          description: >-
            Tolerance band around the forecast total (0.2 = ±20%); nil = derive
            from historicals
          type: number
        velocity_multiplier:
          description: >-
            Multiplier applied to deal velocity; >1 = faster (durations divided
            by this, default 1.0)
          type: number
        win_rate_fixed:
          description: >-
            Fixed win probability (0-1) applied to all deals; overrides
            WinRateMultiplier when set
          type: number
        win_rate_multiplier:
          description: Multiplier applied to all win probabilities (default 1.0)
          type: number
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.