Flatfile · Capability

API Reference — subpackage_accounts

API Reference — subpackage_accounts. 2 operations. Lead operation: Get the current account. Self-contained Naftiko capability covering one Flatfile business surface.

Run with Naftiko Flatfilesubpackage_accounts

What You Can Do

GET
Getcurrent — Get the current account
/v1/accounts/current
PATCH
Updatecurrent — Update the current account
/v1/accounts/current

MCP Tools

get-current-account

Get the current account

read-only idempotent
update-current-account

Update the current account

idempotent

Capability Spec

flatfile-subpackage-accounts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Reference — subpackage_accounts
  description: 'API Reference — subpackage_accounts. 2 operations. Lead operation: Get the current account. Self-contained
    Naftiko capability covering one Flatfile business surface.'
  tags:
  - Flatfile
  - subpackage_accounts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FLATFILE_API_KEY: FLATFILE_API_KEY
capability:
  consumes:
  - type: http
    namespace: flatfile-subpackage-accounts
    baseUri: https://api.x.flatfile.com/v1
    description: API Reference — subpackage_accounts business capability. Self-contained, no shared references.
    resources:
    - name: accounts-current
      path: /accounts/current
      operations:
      - name: getcurrent
        method: GET
        description: Get the current account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
          description: Bearer authentication
          required: true
        - name: X-Disable-Hooks
          in: header
          type: string
          required: true
      - name: updatecurrent
        method: PATCH
        description: Update the current account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
          description: Bearer authentication
          required: true
        - name: X-Disable-Hooks
          in: header
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.FLATFILE_API_KEY}}'
  exposes:
  - type: rest
    namespace: flatfile-subpackage-accounts-rest
    port: 8080
    description: REST adapter for API Reference — subpackage_accounts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/accounts/current
      name: accounts-current
      description: REST surface for accounts-current.
      operations:
      - method: GET
        name: getcurrent
        description: Get the current account
        call: flatfile-subpackage-accounts.getcurrent
        with:
          Authorization: rest.Authorization
          X-Disable-Hooks: rest.X-Disable-Hooks
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatecurrent
        description: Update the current account
        call: flatfile-subpackage-accounts.updatecurrent
        with:
          Authorization: rest.Authorization
          X-Disable-Hooks: rest.X-Disable-Hooks
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: flatfile-subpackage-accounts-mcp
    port: 9090
    transport: http
    description: MCP adapter for API Reference — subpackage_accounts. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-current-account
      description: Get the current account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: flatfile-subpackage-accounts.getcurrent
      with:
        Authorization: tools.Authorization
        X-Disable-Hooks: tools.X-Disable-Hooks
      outputParameters:
      - type: object
        mapping: $.
    - name: update-current-account
      description: Update the current account
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: flatfile-subpackage-accounts.updatecurrent
      with:
        Authorization: tools.Authorization
        X-Disable-Hooks: tools.X-Disable-Hooks
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.