Brex · Capability

Brex Budgets API — Budgets

Brex Budgets API — Budgets. 10 operations. Lead operation: List Spend Limits (v1). Self-contained Naftiko capability covering one Brex business surface.

Run with Naftiko BrexBudgets

What You Can Do

GET
Listv1budgets — List Spend Limits (v1)
/v1/v1/budgets
POST
Createv1budget — Create a Spend Limit (v1)
/v1/v1/budgets
GET
Getv1budget — Retrieve a Spend Limit by ID (v1)
/v1/v1/budgets/{id}
PUT
Updatev1budget — Update a Spend Limit (v1)
/v1/v1/budgets/{id}
POST
Archivev1budget — Archive a Spend Limit (v1)
/v1/v1/budgets/{id}/archive
GET
Listv2budgets — List Budgets (v2)
/v1/v2/budgets
POST
Createv2budget — Create a Budget (v2)
/v1/v2/budgets
GET
Getv2budget — Retrieve a Budget by ID (v2)
/v1/v2/budgets/{id}
PUT
Updatev2budget — Update a Budget (v2)
/v1/v2/budgets/{id}
POST
Archivev2budget — Archive a Budget (v2)
/v1/v2/budgets/{id}/archive

MCP Tools

list-spend-limits-v1

List Spend Limits (v1)

read-only idempotent
create-spend-limit-v1

Create a Spend Limit (v1)

retrieve-spend-limit-id-v1

Retrieve a Spend Limit by ID (v1)

read-only idempotent
update-spend-limit-v1

Update a Spend Limit (v1)

idempotent
archive-spend-limit-v1

Archive a Spend Limit (v1)

list-budgets-v2

List Budgets (v2)

read-only idempotent
create-budget-v2

Create a Budget (v2)

read-only
retrieve-budget-id-v2

Retrieve a Budget by ID (v2)

read-only idempotent
update-budget-v2

Update a Budget (v2)

idempotent
archive-budget-v2

Archive a Budget (v2)

read-only

Capability Spec

brex-budgets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Brex Budgets API — Budgets
  description: 'Brex Budgets API — Budgets. 10 operations. Lead operation: List Spend Limits (v1). Self-contained Naftiko
    capability covering one Brex business surface.'
  tags:
  - Brex
  - Budgets
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BREX_API_KEY: BREX_API_KEY
capability:
  consumes:
  - type: http
    namespace: brex-budgets
    baseUri: https://platform.brexapis.com
    description: Brex Budgets API — Budgets business capability. Self-contained, no shared references.
    resources:
    - name: v1-budgets
      path: /v1/budgets
      operations:
      - name: listv1budgets
        method: GET
        description: List Spend Limits (v1)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createv1budget
        method: POST
        description: Create a Spend Limit (v1)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-budgets-id
      path: /v1/budgets/{id}
      operations:
      - name: getv1budget
        method: GET
        description: Retrieve a Spend Limit by ID (v1)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatev1budget
        method: PUT
        description: Update a Spend Limit (v1)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-budgets-id-archive
      path: /v1/budgets/{id}/archive
      operations:
      - name: archivev1budget
        method: POST
        description: Archive a Spend Limit (v1)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-budgets
      path: /v2/budgets
      operations:
      - name: listv2budgets
        method: GET
        description: List Budgets (v2)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createv2budget
        method: POST
        description: Create a Budget (v2)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-budgets-id
      path: /v2/budgets/{id}
      operations:
      - name: getv2budget
        method: GET
        description: Retrieve a Budget by ID (v2)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatev2budget
        method: PUT
        description: Update a Budget (v2)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-budgets-id-archive
      path: /v2/budgets/{id}/archive
      operations:
      - name: archivev2budget
        method: POST
        description: Archive a Budget (v2)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.BREX_API_KEY}}'
  exposes:
  - type: rest
    namespace: brex-budgets-rest
    port: 8080
    description: REST adapter for Brex Budgets API — Budgets. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/budgets
      name: v1-budgets
      description: REST surface for v1-budgets.
      operations:
      - method: GET
        name: listv1budgets
        description: List Spend Limits (v1)
        call: brex-budgets.listv1budgets
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createv1budget
        description: Create a Spend Limit (v1)
        call: brex-budgets.createv1budget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/budgets/{id}
      name: v1-budgets-id
      description: REST surface for v1-budgets-id.
      operations:
      - method: GET
        name: getv1budget
        description: Retrieve a Spend Limit by ID (v1)
        call: brex-budgets.getv1budget
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatev1budget
        description: Update a Spend Limit (v1)
        call: brex-budgets.updatev1budget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/budgets/{id}/archive
      name: v1-budgets-id-archive
      description: REST surface for v1-budgets-id-archive.
      operations:
      - method: POST
        name: archivev1budget
        description: Archive a Spend Limit (v1)
        call: brex-budgets.archivev1budget
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/budgets
      name: v2-budgets
      description: REST surface for v2-budgets.
      operations:
      - method: GET
        name: listv2budgets
        description: List Budgets (v2)
        call: brex-budgets.listv2budgets
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createv2budget
        description: Create a Budget (v2)
        call: brex-budgets.createv2budget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/budgets/{id}
      name: v2-budgets-id
      description: REST surface for v2-budgets-id.
      operations:
      - method: GET
        name: getv2budget
        description: Retrieve a Budget by ID (v2)
        call: brex-budgets.getv2budget
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatev2budget
        description: Update a Budget (v2)
        call: brex-budgets.updatev2budget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/budgets/{id}/archive
      name: v2-budgets-id-archive
      description: REST surface for v2-budgets-id-archive.
      operations:
      - method: POST
        name: archivev2budget
        description: Archive a Budget (v2)
        call: brex-budgets.archivev2budget
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: brex-budgets-mcp
    port: 9090
    transport: http
    description: MCP adapter for Brex Budgets API — Budgets. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-spend-limits-v1
      description: List Spend Limits (v1)
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: brex-budgets.listv1budgets
      outputParameters:
      - type: object
        mapping: $.
    - name: create-spend-limit-v1
      description: Create a Spend Limit (v1)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: brex-budgets.createv1budget
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-spend-limit-id-v1
      description: Retrieve a Spend Limit by ID (v1)
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: brex-budgets.getv1budget
      outputParameters:
      - type: object
        mapping: $.
    - name: update-spend-limit-v1
      description: Update a Spend Limit (v1)
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: brex-budgets.updatev1budget
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: archive-spend-limit-v1
      description: Archive a Spend Limit (v1)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: brex-budgets.archivev1budget
      outputParameters:
      - type: object
        mapping: $.
    - name: list-budgets-v2
      description: List Budgets (v2)
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: brex-budgets.listv2budgets
      outputParameters:
      - type: object
        mapping: $.
    - name: create-budget-v2
      description: Create a Budget (v2)
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: brex-budgets.createv2budget
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-budget-id-v2
      description: Retrieve a Budget by ID (v2)
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: brex-budgets.getv2budget
      outputParameters:
      - type: object
        mapping: $.
    - name: update-budget-v2
      description: Update a Budget (v2)
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: brex-budgets.updatev2budget
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: archive-budget-v2
      description: Archive a Budget (v2)
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: brex-budgets.archivev2budget
      outputParameters:
      - type: object
        mapping: $.