> ## 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 funnel

> Create a new funnel (name required)



## OpenAPI

````yaml /api-reference/cx/swagger.json post /deals/funnel/
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/funnel/:
    post:
      tags:
        - deals
      summary: Create funnel
      description: Create a new funnel (name required)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/types.Funnel'
        description: Funnel creation data
        required: true
      responses:
        '200':
          description: Created funnel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.Funnel'
        '400':
          description: Bad request - invalid request body
          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:
    types.Funnel:
      type: object
      properties:
        _id:
          type: string
        created_at:
          type: string
        default_deal_value:
          type: number
        deleted_at:
          type: string
        lost_template:
          type: string
        name:
          type: string
        proposal_public:
          $ref: '#/components/schemas/types.RetirementPlanProposalPublicSettings'
        stages:
          type: array
          items:
            $ref: '#/components/schemas/types.FunnelStage'
        team:
          type: string
        won_template:
          type: string
    types.RetirementPlanProposalPublicSettings:
      type: object
      properties:
        allowed_scenarios:
          type: array
          items:
            type: string
        assignee:
          type: string
        client_settings:
          $ref: '#/components/schemas/types.RetirementPlanProposalClientSettings'
        collect_plan_design_preferences:
          type: boolean
        default_fee_schedule:
          type: string
        enabled:
          type: boolean
        flow_mode:
          type: string
        link_expiry_minutes:
          type: integer
        notify_assignee:
          type: boolean
    types.FunnelStage:
      type: object
      properties:
        _id:
          type: string
        avg_duration:
          description: Average duration of deals in this stage in days
          type: integer
        close_prior_projects:
          description: >-
            Should we clear prior projects for this deal when it enters this
            stage?
          type: boolean
        manual_close_probability:
          description: Let users set probability manually to get some initial estimations
          type: number
        name:
          type: string
        owner:
          description: Deal owner when stage is reached
          type: string
        probabilities:
          description: >-
            Fine-tune true probabilities of various outcomes with actual data to
            model out future sales
          type: array
          items:
            $ref: '#/components/schemas/types.Probability'
        template:
          description: Launch a project for the deal when it enters a stage?
          type: string
    types.RetirementPlanProposalClientSettings:
      type: object
      properties:
        allow_provision_changes:
          type: boolean
        allow_scenario_changes:
          type: boolean
        require_approval:
          type: boolean
        require_tpa_review:
          type: boolean
    types.Probability:
      type: object
      properties:
        days:
          description: Number of days from now
          type: integer
        of:
          description: '"advance", "revert", "win", "lose"'
          type: string
        percent:
          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.