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

# Create budget

> Create a Budget.



## OpenAPI

````yaml https://api.vantage.sh/v2/oas_v3.json post /budgets
openapi: 3.0.1
info:
  title: Vantage
  description: Vantage API
  termsOfService: https://www.vantage.sh/terms-of-use
  contact:
    name: Vantage Support
    url: https://www.vantage.sh
    email: support@vantage.sh
  version: 2.0.0
servers:
  - url: https://api.vantage.sh/v2
security:
  - oauth2:
      - read
tags:
  - name: AccessGrants
    description: Operations about AccessGrants
  - name: AnomalyAlerts
    description: Operations about AnomalyAlerts
  - name: AnomalyNotifications
    description: Operations about AnomalyNotifications
  - name: AuditLogs
    description: Operations about AuditLogs
  - name: BillingProfiles
    description: Operations about BillingProfiles
  - name: BillingRules
    description: Operations about BillingRules
  - name: BudgetAlerts
    description: Operations about BudgetAlerts
  - name: Budgets
    description: Operations about Budgets
  - name: BusinessMetrics
    description: Operations about BusinessMetrics
  - name: Canvases
    description: Operations about Canvases
  - name: CostAlertEvents
    description: Operations about CostAlertEvents
  - name: CostAlerts
    description: Operations about CostAlerts
  - name: CostProvider
    description: Operations about CostProviders
  - name: CostProviderAccounts
    description: Operations about CostProviderAccounts
  - name: Costs
    description: Operations about Costs
  - name: CostService
    description: Operations about CostServices
  - name: Dashboards
    description: Operations about Dashboards
  - name: DataExports
    description: Operations about DataExports
  - name: ExchangeRates
    description: Operations about ExchangeRates
  - name: FinancialCommitmentReports
    description: Operations about FinancialCommitmentReports
  - name: FinancialCommitments
    description: Operations about FinancialCommitments
  - name: Folders
    description: Operations about Folders
  - name: Integrations
    description: Operations about Integrations
  - name: Invoices
    description: Operations about Invoices
  - name: KubernetesEfficiencyReports
    description: Operations about KubernetesEfficiencyReports
  - name: ManagedAccounts
    description: Operations about ManagedAccounts
  - name: Me
    description: Operations about Mes
  - name: NetworkFlowReports
    description: Operations about NetworkFlowReports
  - name: OpenAPISpecification
    description: Operations about OpenAPISpecifications
  - name: Ping
    description: Operations about Pings
  - name: Prices
    description: Operations about Prices
  - name: Recommendations
    description: Operations about Recommendations
  - name: RecommendationViews
    description: Operations about RecommendationViews
  - name: ReportNotifications
    description: Operations about ReportNotifications
  - name: ResourceReports
    description: Operations about ResourceReports
  - name: Resources
    description: Operations about Resources
  - name: SavedFilters
    description: Operations about SavedFilters
  - name: Segments
    description: Operations about Segments
  - name: Tags
    description: Operations about Tags
  - name: Teams
    description: Operations about Teams
  - name: UnitCosts
    description: Operations about UnitCosts
  - name: UserFeedback
    description: Operations about UserFeedbacks
  - name: Users
    description: Operations about Users
  - name: VirtualTags
    description: Operations about VirtualTags
  - name: Workspaces
    description: Operations about Workspaces
paths:
  /budgets:
    post:
      tags:
        - Budgets
      summary: Create budget
      description: Create a Budget.
      operationId: createBudget
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createBudget'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Budget'
              example:
                token: bdgt_ea1eaec89d553e34
                name: New Budget Name
                workspace_token: wrkspc_b83e21368ee5fd9d
                user_token: null
                created_by_token: team_aea2488160e90528
                cost_report_token: null
                created_at: '2024-07-11T20:22:52Z'
                budget_alert_tokens: []
                periods:
                  - start_at: '2024-01-01'
                    end_at: '2024-01-31'
                    amount: '100.0'
                  - start_at: '2024-02-01'
                    end_at: '2024-02-29'
                    amount: '200.0'
                  - start_at: '2024-03-01'
                    end_at: '2024-04-30'
                    amount: '300.0'
                performance:
                  - date: April, 2024
                    actual: 0%
                    amount: '300.0'
                  - date: March, 2024
                    actual: 0%
                    amount: '300.0'
                  - date: February, 2024
                    actual: 0%
                    amount: '200.0'
                  - date: January, 2024
                    actual: 0%
                    amount: '100.0'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: UnprocessableEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
        - oauth2:
            - write
components:
  schemas:
    createBudget:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: The name of the Budget.
        workspace_token:
          type: string
          description: The token of the Workspace to add the Budget to.
        cost_report_token:
          type: string
          description: The CostReport token. Ignored for hierarchical Budgets.
        child_budget_tokens:
          type: array
          description: The tokens of any child Budgets when creating a hierarchical Budget.
          items:
            type: string
        periods:
          type: array
          description: >-
            The periods for the Budget. The start_at and end_at must be iso8601
            formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.
          items:
            required:
              - amount
              - start_at
            type: object
            properties:
              start_at:
                type: string
                description: The start date of the period.
                format: date
              end_at:
                type: string
                description: The end date of the period.
                format: date
                nullable: true
              amount:
                type: number
                description: The amount of the period.
                format: double
      description: Create a Budget.
    Budget:
      required:
        - budget_alert_tokens
        - child_budget_tokens
        - created_at
        - name
        - periods
        - token
        - workspace_token
      type: object
      properties:
        token:
          type: string
          nullable: false
        name:
          type: string
          description: The name of the Budget.
          nullable: true
          example: Acme123 Budget
        workspace_token:
          type: string
          description: The token for the Workspace the Budget is a part of.
          nullable: false
        user_token:
          type: string
          description: The token for the User who created this Budget.
          nullable: true
        created_by_token:
          type: string
          description: The token of the Creator of the Budget.
          nullable: true
        cost_report_token:
          type: string
          description: The token of the Report associated with the Budget.
          nullable: true
        created_at:
          type: string
          description: >-
            The date and time, in UTC, the Budget was created. ISO 8601
            Formatted.
          nullable: false
          example: '2024-03-19T00:00:00Z'
        budget_alert_tokens:
          type: array
          description: The tokens of the BudgetAlerts associated with the Budget.
          nullable: false
          items:
            type: string
            example: ''
        child_budget_tokens:
          type: array
          description: >-
            The tokens of the child Budgets associated with the hierarchical
            Budget.
          nullable: false
          items:
            type: string
            example: ''
        periods:
          type: array
          description: The budget periods associated with the Budget.
          items:
            $ref: '#/components/schemas/BudgetPeriod'
        performance:
          type: array
          description: The historical performance of the Budget.
          items:
            $ref: '#/components/schemas/BudgetPerformance'
      description: Budget model
    Errors:
      required:
        - errors
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        errors:
          type: array
          nullable: false
          items:
            type: string
      description: Errors model
    BudgetPeriod:
      required:
        - amount
        - end_at
        - start_at
      type: object
      properties:
        start_at:
          type: string
          description: >-
            The date and time, in UTC, the Budget was created. ISO 8601
            Formatted.
          nullable: false
          example: '2024-03-19T00:00:00Z'
        end_at:
          type: string
          description: >-
            The date and time, in UTC, the Budget was created. ISO 8601
            Formatted.
          nullable: false
          example: '2024-03-19T00:00:00Z'
        amount:
          type: string
          description: The amount of the Budget Period as a string to ensure precision.
          nullable: false
          example: '100.00'
    BudgetPerformance:
      required:
        - actual
        - amount
        - date
      type: object
      properties:
        date:
          type: string
          description: >-
            The date and time, in UTC, the Budget was created. ISO 8601
            Formatted.
          nullable: false
          example: '2024-03-19T00:00:00Z'
        actual:
          type: string
          description: >-
            The date and time, in UTC, the Budget was created. ISO 8601
            Formatted.
          nullable: false
          example: '2024-03-19T00:00:00Z'
        amount:
          type: string
          description: The amount of the Budget Period as a string to ensure precision.
          nullable: false
          example: '100.00'
    Links:
      type: object
      properties:
        self:
          type: string
          description: The URL of the current page of results.
          nullable: true
        first:
          type: string
          description: The URL of the first page of results.
          nullable: true
        next:
          type: string
          description: The URL of the next page of results, if one exists.
          nullable: true
        last:
          type: string
          description: The URL of the last page of results, if one exists.
          nullable: true
        prev:
          type: string
          description: The URL of the previous page of results, if one exists.
          nullable: true
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://console.vantage.sh/account/profile
          scopes:
            read: Grants read access
            write: Grants write access

````