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

# List sales goals

> List sales goals for the team, optionally filtered by funnel and/or a date range the goal period must overlap.



## OpenAPI

````yaml /api-reference/cx/swagger.json get /deals/goals
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/goals:
    get:
      tags:
        - deals
      summary: List sales goals
      description: >-
        List sales goals for the team, optionally filtered by funnel and/or a
        date range the goal period must overlap.
      parameters:
        - description: Funnel ID (goals for this funnel plus team-wide goals)
          name: funnel
          in: query
          schema:
            type: string
        - description: Only goals whose period ends after this RFC3339 time
          name: start
          in: query
          schema:
            type: string
        - description: Only goals whose period starts before this RFC3339 time
          name: end
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Sales goals
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg_routes_deals_goals.ListGoalsResponse'
        '400':
          description: Bad request - invalid funnel ID or dates
          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_goals.ListGoalsResponse:
      type: object
      properties:
        goals:
          type: array
          items:
            $ref: >-
              #/components/schemas/stax_ai_cx_cx-api_pkg_routes_deals_reporting.SalesGoal
    stax_ai_cx_cx-api_pkg_routes_deals_reporting.SalesGoal:
      type: object
      properties:
        _id:
          type: string
        amount:
          type: number
        created_at:
          type: string
        created_by:
          type: string
        deleted_at:
          type: string
        funnel:
          description: nil = all funnels
          type: string
        period_end:
          type: string
        period_start:
          type: string
        team:
          type: string
        updated_at:
          type: string
  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.