> ## Documentation Index
> Fetch the complete documentation index at: https://sure-917046f5-docs-cloudflare-tunnel-self-hosting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List budgets



## OpenAPI

````yaml /openapi.yaml get /api/v1/budgets
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation for the Sure API.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/budgets:
    get:
      tags:
        - Budgets
      summary: List budgets
      parameters:
        - name: page
          in: query
          required: false
          description: 'Page number (default: 1)'
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: 'Items per page (default: 25, max: 100)'
          schema:
            type: integer
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Filter budgets starting on or after this date
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Filter budgets ending on or before this date
      responses:
        '200':
          description: budgets listed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetCollection'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: invalid date filter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    BudgetCollection:
      type: object
      required:
        - budgets
        - pagination
      properties:
        budgets:
          type: array
          items:
            $ref: '#/components/schemas/BudgetSummary'
        pagination:
          $ref: '#/components/schemas/Pagination'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          nullable: true
        details:
          oneOf:
            - type: array
              items:
                type: string
            - type: object
          nullable: true
    BudgetSummary:
      type: object
      required:
        - id
        - start_date
        - end_date
        - name
        - currency
        - initialized
        - current
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        name:
          type: string
        currency:
          type: string
        initialized:
          type: boolean
        current:
          type: boolean
        budgeted_spending:
          type: string
          nullable: true
        budgeted_spending_cents:
          type: integer
          nullable: true
        expected_income:
          type: string
          nullable: true
        expected_income_cents:
          type: integer
          nullable: true
        allocated_spending:
          type: string
        allocated_spending_cents:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Pagination:
      type: object
      required:
        - page
        - per_page
        - total_count
        - total_pages
      properties:
        page:
          type: integer
          minimum: 1
        per_page:
          type: integer
          minimum: 1
        total_count:
          type: integer
          minimum: 0
        total_pages:
          type: integer
          minimum: 0
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.

````