> ## 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.

# Import one file now with a feed

> Import one file now with a feed's saved config, whether the feed is on or off, through the same job a file that arrives goes through: a file the feed received (import_id: one held while it was off, or one that failed), the whole file as CSV text (csv), or an object under an S3 feed's prefix (s3_key). as_of files the usage under a given period (csv or s3_key, on a feed without a date column). Returns the import, queued or running: follow it with integrations.get_import. A file imported already is a 409. Send an Idempotency-Key, so a retried call doesn't import twice.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/integrations/imports/feeds/{name}/run
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/feeds/{name}/run:
    post:
      tags:
        - integrations
      summary: Import one file now with a feed
      description: >-
        Import one file now with a feed's saved config, whether the feed is on
        or off, through the same job a file that arrives goes through: a file
        the feed received (import_id: one held while it was off, or one that
        failed), the whole file as CSV text (csv), or an object under an S3
        feed's prefix (s3_key). as_of files the usage under a given period (csv
        or s3_key, on a feed without a date column). Returns the import, queued
        or running: follow it with integrations.get_import. A file imported
        already is a 409. Send an Idempotency-Key, so a retried call doesn't
        import twice.
      operationId: integrations_run_feed
      parameters:
        - in: path
          name: name
          required: true
          schema:
            maxLength: 255
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                as_of:
                  anyOf:
                    - format: date
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    With csv or s3_key: a date in the period the file's usage is
                    for. Unset: the period before the run, as for a file that
                    arrives. A feed with a date column refuses it
                  title: As Of
                csv:
                  anyOf:
                    - maxLength: 8388608
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    Or the whole file as CSV text (a bigger one goes by email or
                    S3)
                  title: Csv
                filename:
                  anyOf:
                    - maxLength: 124
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: 'With csv: the name it shows under, ending in .csv'
                  title: Filename
                import_id:
                  anyOf:
                    - maxLength: 64
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    A file the feed received: one held while it was off, or one
                    that failed
                  title: Import Id
                s3_key:
                  anyOf:
                    - maxLength: 1024
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    Or, for an S3 feed, an object under its prefix, read with
                    its connection
                  title: S3 Key
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Import'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    Import:
      properties:
        completed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Completed At
        created_at:
          description: When the file was received
          format: date-time
          title: Created At
          type: string
        feed:
          anyOf:
            - type: string
            - type: 'null'
          description: The file feed the file matched; null for an upload
          title: Feed
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          description: The file's name; null when a delivery carried several files
          title: File Name
        id:
          title: Id
          type: string
        object:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            What an upload updates, e.g. account or people; null for a feed's
            file
          title: Object
        rows:
          anyOf:
            - $ref: '#/components/schemas/ImportRows'
            - type: 'null'
          description: Null until the file is processed
        source:
          description: How the file arrived
          enum:
            - upload
            - email
            - s3
            - api
          title: Source
          type: string
        status:
          enum:
            - queued
            - running
            - succeeded
            - failed
            - held
          title: Status
          type: string
      required:
        - id
        - file_name
        - source
        - object
        - feed
        - status
        - created_at
        - completed_at
        - rows
      title: Import
      type: object
    ImportRows:
      properties:
        created:
          anyOf:
            - type: integer
            - type: 'null'
          description: Records an upload created; null for a feed's file
          title: Created
        empty:
          anyOf:
            - type: integer
            - type: 'null'
          description: Entirely empty rows, not processed
          title: Empty
        failed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Failed
        skipped:
          anyOf:
            - type: integer
            - type: 'null'
          title: Skipped
        succeeded:
          anyOf:
            - type: integer
            - type: 'null'
          description: Rows written
          title: Succeeded
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: Rows read, empty rows aside
          title: Total
      required:
        - total
        - succeeded
        - created
        - skipped
        - empty
        - failed
      title: ImportRows
      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.