Stripe · Capability

Stripe Files API — Files

Stripe Files API — Files. 3 operations. Lead operation: Files. Self-contained Naftiko capability covering one Stripe business surface.

Run with Naftiko StripeFiles

What You Can Do

GET
Getfiles

Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.

/v1/v1/files
POST
Postfiles

To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.

/v1/v1/files
GET
Getfilesfile

Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.

/v1/v1/files/{file}

MCP Tools

p-returns-list-files-that-your

Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.

read-only idempotent
p-to-upload-file-stripe-you

To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.

p-retrieves-details-existing-file-object

Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.

read-only idempotent

Capability Spec

files-files.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stripe Files API — Files
  description: 'Stripe Files API — Files. 3 operations. Lead operation: Files. Self-contained Naftiko capability covering
    one Stripe business surface.'
  tags:
  - Stripe
  - Files
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STRIPE_API_KEY: STRIPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: files-files
    baseUri: https://api.stripe.com
    description: Stripe Files API — Files business capability. Self-contained, no shared references.
    resources:
    - name: v1-files
      path: /v1/files
      operations:
      - name: getfiles
        method: GET
        description: <p>Returns a list of the files that your account has access to. Stripe sorts and returns the files by
          their creation dates, placing the most recently created files at the top.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created
          in: query
          type: string
        - name: ending_before
          in: query
          type: string
          description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list.
            For instance, if you make a list request and receive 100 ob
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
        - name: limit
          in: query
          type: integer
          description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default
            is 10.
        - name: purpose
          in: query
          type: string
          description: Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
        - name: starting_after
          in: query
          type: string
          description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list.
            For instance, if you make a list request and receive 100 o
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: postfiles
        method: POST
        description: <p>To upload a file to Stripe, you need to send a request of type <code>multipart/form-data</code>. Include
          the file you want to upload in the request, and the parameters for creating a file.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-files-file
      path: /v1/files/{file}
      operations:
      - name: getfilesfile
        method: GET
        description: <p>Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns
          the corresponding file object. Learn how to <a href="/docs/file-upload#download-file-contents">access file contents</a>.</p>
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: expand
          in: query
          type: array
          description: Specifies which fields in the response should be expanded.
        - name: file
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.STRIPE_API_KEY}}'
  exposes:
  - type: rest
    namespace: files-files-rest
    port: 8080
    description: REST adapter for Stripe Files API — Files. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/files
      name: v1-files
      description: REST surface for v1-files.
      operations:
      - method: GET
        name: getfiles
        description: <p>Returns a list of the files that your account has access to. Stripe sorts and returns the files by
          their creation dates, placing the most recently created files at the top.</p>
        call: files-files.getfiles
        with:
          created: rest.created
          ending_before: rest.ending_before
          expand: rest.expand
          limit: rest.limit
          purpose: rest.purpose
          starting_after: rest.starting_after
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postfiles
        description: <p>To upload a file to Stripe, you need to send a request of type <code>multipart/form-data</code>. Include
          the file you want to upload in the request, and the parameters for creating a file.</p>
        call: files-files.postfiles
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/files/{file}
      name: v1-files-file
      description: REST surface for v1-files-file.
      operations:
      - method: GET
        name: getfilesfile
        description: <p>Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns
          the corresponding file object. Learn how to <a href="/docs/file-upload#download-file-contents">access file contents</a>.</p>
        call: files-files.getfilesfile
        with:
          expand: rest.expand
          file: rest.file
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: files-files-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stripe Files API — Files. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: p-returns-list-files-that-your
      description: <p>Returns a list of the files that your account has access to. Stripe sorts and returns the files by their
        creation dates, placing the most recently created files at the top.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: files-files.getfiles
      with:
        created: tools.created
        ending_before: tools.ending_before
        expand: tools.expand
        limit: tools.limit
        purpose: tools.purpose
        starting_after: tools.starting_after
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-to-upload-file-stripe-you
      description: <p>To upload a file to Stripe, you need to send a request of type <code>multipart/form-data</code>. Include
        the file you want to upload in the request, and the parameters for creating a file.</p>
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: files-files.postfiles
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: p-retrieves-details-existing-file-object
      description: <p>Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns
        the corresponding file object. Learn how to <a href="/docs/file-upload#download-file-contents">access file contents</a>.</p>
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: files-files.getfilesfile
      with:
        expand: tools.expand
        file: tools.file
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.