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

# Create a budget

> Create a budget under parent_budget_id.

Authorized like the internal budgets API: needs budget.configure and
budget.share on the parent. Omitting parent_budget_id creates the root
budget, which is a 409 when the account already has one.

See [Budgets](https://docs.devin.ai/admin/billing/budgets.md) for field details and examples.

## Permissions

Requires a [service user](https://docs.devin.ai/api-reference/v3/service-users/members-service-users.md) or [personal access token](https://docs.devin.ai/api-reference/personal-access-tokens.md) with the `ManageAcuLimits` permission at the enterprise level, or [delegated access](https://docs.devin.ai/admin/billing/budgets.md#who-can-manage-a-budget) to the budget.


## OpenAPI

````yaml v3-openapi.yaml POST /v3/enterprise/usage-policies/budgets
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/usage-policies/budgets:
    post:
      tags:
        - usage-policy-budgets
      summary: Create a budget
      description: |-
        Create a budget under parent_budget_id.

        Authorized like the internal budgets API: needs budget.configure and
        budget.share on the parent. Omitting parent_budget_id creates the root
        budget, which is a 409 when the account already has one.
      operationId: >-
        handle_create_usage_policy_budget_v3_enterprise_usage_policies_budgets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsagePolicyBudgetCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsagePolicyBudgetResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
components:
  schemas:
    UsagePolicyBudgetCreateRequest:
      additionalProperties: false
      description: >-
        A new budget. The API's own copy of the internal
        ``BudgetCreateRequest``,

        so internal changes to that model do not change the published contract.
      properties:
        copy_parent_grants:
          default: false
          description: Copy the parent budget's access grants to the new budget.
          title: Copy Parent Grants
          type: boolean
        cycle_acu_limit:
          anyOf:
            - maximum: 9223372036854776000
              minimum: 0
              type: integer
            - type: 'null'
          description: The budget's own per-cycle ACU limit; null sets none.
          title: Cycle Acu Limit
        name:
          description: Display name of the budget.
          maxLength: 255
          minLength: 1
          pattern: \S
          title: Name
          type: string
        parent_budget_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The active budget to create this one under. Omit to create the
            account's root budget.
          title: Parent Budget Id
      required:
        - name
      title: UsagePolicyBudgetCreateRequest
      type: object
    UsagePolicyBudgetResponse:
      description: |-
        A budget whose usage policies are managed under
        /usage-policies/budgets/{budget_id}/...
      properties:
        budget_id:
          description: Stable external identifier of the budget.
          title: Budget Id
          type: string
        cycle_acu_limit:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            The budget's per-cycle ACU limit on the consumption charged to it
            and its descendants; null means unlimited.
          title: Cycle Acu Limit
        name:
          description: Display name of the budget.
          title: Name
          type: string
        org_ids:
          description: >-
            The organizations linked to this budget. Their usage counts against
            it. Empty when no organization is linked.
          items:
            type: string
          title: Org Ids
          type: array
        parent_budget_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The parent budget; null for the account's root budget.
          title: Parent Budget Id
        status:
          description: Lifecycle status of the budget.
          enum:
            - active
            - archived
          title: Status
          type: string
        temporary_cycle_acu_limit:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            A limit that overrides cycle_acu_limit until the end of the current
            monthly billing window, present only while it is live.
          title: Temporary Cycle Acu Limit
      required:
        - budget_id
        - name
        - parent_budget_id
        - org_ids
        - status
        - cycle_acu_limit
        - temporary_cycle_acu_limit
      title: UsagePolicyBudgetResponse
      type: object
    ProblemDetail:
      description: >-
        RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat;
        the

        other members are additive. errors carries field-level validation
        failures

        (422 only).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Machine-readable code for blocked-action refusals (e.g.
            "user_frozen", "migrated_session").
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````

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