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

# List imports

> Lists the account's imports, newest first. Without a status filter only imports that have started running (RUNNING, SUCCEEDED or FAILED) are listed; pass a status to list imports in any other state, such as the UPLOADED or MAPPED import that blocks a new one.



## OpenAPI

````yaml /openapi.json get /api/contact/import
openapi: 3.0.0
info:
  description: >-
    Public REST API for Benchmark Email.


    Authenticate every request by including your API key in the `X-API-Key`
    header.

    Each key is issued with one or more scopes that control which endpoints it
    may call.


    Rate limits: 60 requests per minute per account.

    Monthly quota: determined by your subscription plan.


    Contact text field values are HTML-entity encoded. When a contact is
    created, updated or imported, Benchmark stores its text field values
    HTML-entity escaped: `&` `<` `>` `"` `'` `/` `\` and the backtick become
    `&amp;` `&lt;` `&gt;` `&quot;` `&#x27;` `&#x2F;` `&#x5C;` and `&#96;`.
    Responses return that stored form (for example `Maple &amp; Co` for `Maple &
    Co`), so decode values before displaying them. Send plain, unescaped text in
    requests and search filters: Benchmark escapes it before storing or matching
    it. Create and update also remove anything that looks like an HTML tag,
    including the text after a bare `<`.
  title: Benchmark Email API
  version: 1.0.0
servers:
  - description: >-
      Your account's API base URL. Copy the full URL shown on Settings > API
      Keys in your Benchmark Email account and paste it here.
    url: '{apiBaseUrl}'
    variables:
      apiBaseUrl:
        default: ''
        description: >-
          Your account's API base URL. Copy it from Settings > API Keys in your
          Benchmark Email account.
security:
  - apiKeyAuth: []
tags:
  - description: Account related endpoints
    name: account
  - description: File upload (Unlayer custom storage) endpoints
    name: file-upload
  - description: Contact related endpoints
    name: contact
  - description: Contact structure related endpoints
    name: contact-structure
  - description: List related endpoints
    name: lists
  - description: Contact import related endpoints
    name: contact-import
  - description: Email domain related endpoints
    name: email-domain
  - description: Email campaign related endpoints
    name: email-campaign
  - description: Email template related endpoints
    name: email-template
  - description: Report related endpoints
    name: reports
paths:
  /api/contact/import:
    get:
      tags:
        - contact-import
      summary: List imports
      description: >-
        Lists the account's imports, newest first. Without a status filter only
        imports that have started running (RUNNING, SUCCEEDED or FAILED) are
        listed; pass a status to list imports in any other state, such as the
        UPLOADED or MAPPED import that blocks a new one.
      operationId: get_api_contact_import
      parameters:
        - description: page number
          in: query
          name: page
          schema:
            minimum: 1
            type: integer
        - description: Page size, at most 50; a larger value is treated as 50
          in: query
          name: size
          schema:
            default: 50
            maximum: 50
            minimum: 1
            type: integer
        - description: Only imports for this contact structure
          in: query
          name: contactStructureId
          schema:
            format: mongo-id
            type: string
        - description: >-
            Only imports in this status. Leave it out to list RUNNING, SUCCEEDED
            and FAILED imports.
          in: query
          name: status
          schema:
            enum:
              - UPLOADING
              - UPLOADED
              - MAPPING
              - MAPPED
              - RUNNING
              - SUCCEEDED
              - FAILED
              - ABORTED
            type: string
        - description: Only imports of this type
          in: query
          name: importType
          schema:
            enum:
              - manual
              - migration_bme_classic
            type: string
        - description: Order by creation date
          in: query
          name: sort
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  records:
                    items:
                      properties:
                        _id:
                          description: Id of the import
                          type: string
                        createdAt:
                          format: date-time
                          type: string
                        fileName:
                          description: Original name of the uploaded file
                          type: string
                        importType:
                          description: manual for a file upload
                          enum:
                            - manual
                            - migration_bme_classic
                          type: string
                        mappingResult:
                          description: >-
                            Outcome of applying the mapping; set once the import
                            reaches MAPPED
                          properties:
                            error:
                              description: Why the mapping failed, when it did
                              type: string
                            keys:
                              properties:
                                duplicated:
                                  description: Keys that appear more than once in the file
                                  type: number
                                existing:
                                  description: Keys that match an existing contact
                                  type: number
                                new:
                                  description: Keys not yet on the contact structure
                                  type: number
                              type: object
                            rowsToImport:
                              description: Rows that will be imported
                              type: number
                            rowsWithErrors:
                              description: Rows with at least one invalid field
                              type: number
                            skippedRows:
                              description: >-
                                Rows skipped for an invalid or duplicated key,
                                available in the skipped-rows file
                              type: number
                            tags:
                              properties:
                                existing:
                                  description: >-
                                    Tag values that already exist on the
                                    structure
                                  type: number
                                list:
                                  description: The new tag values
                                  items:
                                    type: string
                                  type: array
                                new:
                                  description: Tag values the import will create
                                  type: number
                              type: object
                          type: object
                        migrationStats:
                          description: >-
                            Discovery stats from the originating migration
                            session; present only for BME Classic migration
                            imports.
                          nullable: true
                          type: object
                        result:
                          additionalProperties: false
                          description: >-
                            Counts of what the import did; set while RUNNING and
                            final once SUCCEEDED or FAILED
                          properties:
                            bounced:
                              description: >-
                                Contacts marked as bounced; only a migration
                                import sets this, a file import reports 0
                              type: number
                            existing:
                              description: Rows that matched an existing contact
                              type: number
                            existingUpdated:
                              description: Existing contacts that were changed
                              type: number
                            failed:
                              description: Rows that could not be imported
                              type: number
                            new:
                              description: Contacts created
                              type: number
                            unsubscribed:
                              description: >-
                                Contacts unsubscribed by the import (unsubscribe
                                matching)
                              type: number
                          type: object
                        status:
                          description: >-
                            Current status. An import moves through UPLOADING
                            (file being parsed), UPLOADED (ready for a mapping),
                            MAPPING (mapping being applied), MAPPED (ready to
                            start), RUNNING, then SUCCEEDED or FAILED. ABORTED
                            is set by an explicit abort or when a new import for
                            the same contact structure is started with
                            cancelIncomplete=true.
                          enum:
                            - UPLOADING
                            - UPLOADED
                            - MAPPING
                            - MAPPED
                            - RUNNING
                            - SUCCEEDED
                            - FAILED
                            - ABORTED
                          type: string
                        totalRecords:
                          description: Number of data rows in the uploaded file
                          type: number
                        updatedAt:
                          format: date-time
                          type: string
                      type: object
                    type: array
                  total:
                    description: Total number of matching imports
                    type: number
                type: object
          description: Imports on the account
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: API key missing the required scope
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      description: API key authentication
      in: header
      name: X-API-Key
      type: apiKey

````

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