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

# Test an AWS S3 connection

> The app's check of a connection on a bucket: it lists up to 10 objects (under prefix, when sent) and returns how many it found and up to 5 keys, or success false with why. A connection that doesn't exist is a 404. Writes nothing. Needs integrations:write: it returns your file names.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/integrations/imports/s3-connections/{key}/test
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/imports/s3-connections/{key}/test:
    post:
      tags:
        - integrations
      summary: Test an AWS S3 connection
      description: >-
        The app's check of a connection on a bucket: it lists up to 10 objects
        (under prefix, when sent) and returns how many it found and up to 5
        keys, or success false with why. A connection that doesn't exist is a
        404. Writes nothing. Needs integrations:write: it returns your file
        names.
      operationId: integrations_test_s3_connection
      parameters:
        - in: path
          name: key
          required: true
          schema:
            maxLength: 255
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                bucket:
                  maxLength: 63
                  minLength: 3
                  title: Bucket
                  type: string
                prefix:
                  anyOf:
                    - maxLength: 1024
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: Only keys under this
                  title: Prefix
              required:
                - bucket
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3ConnectionTest'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    S3ConnectionTest:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the check failed, with no secret
          title: Error
        files_found:
          anyOf:
            - type: integer
            - type: 'null'
          description: Objects listed, up to 10
          title: Files Found
        sample_files:
          description: Up to 5 of their keys
          items:
            type: string
          title: Sample Files
          type: array
        success:
          title: Success
          type: boolean
      required:
        - success
      title: S3ConnectionTest
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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