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

# Import entity records from CSV

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates records in one of the app's entities from a CSV file, and returns the records it created.

Send the file as `multipart/form-data` in a field named `file`. The first row has to be a header row with no blank or repeated column names. Commas, semicolons, and tabs all work as the delimiter, and the file can be up to 10 MB.

Base44 pairs each of the entity's fields with the column of the same name, ignoring case, spaces, and punctuation. For any field it can't pair by name, an AI model picks a matching column or leaves the field out. Columns that match no field are ignored, and every required field needs a column.

The import is all or nothing. Every row is checked against the entity's schema before anything is written, and if one row fails, no records are created. A file Base44 can't import still returns a successful response, with `status` set to `error` and the reason in `details`, so read `status` before `output`.

Each row becomes a new record, so importing the same file twice creates every record twice. Row-level security applies, so the whole call is rejected when the entity's `rls` create rule doesn't cover one of the rows. Imported records don't trigger the app's webhooks, automations, or workflows.

<Note>This endpoint accepts a personal API key belonging to a user with access to the app, or a workspace API key, which acts as the workspace owner. A read-only key is refused.</Note>

Runs as your user in this app, so the app's access rules decide which records you can read or change.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/entities/{entity_name}/import
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/entities/{entity_name}/import:
    post:
      summary: Import entity records from CSV
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Creates records in one of the app's entities from a CSV file, and
        returns the records it created.


        Send the file as `multipart/form-data` in a field named `file`. The
        first row has to be a header row with no blank or repeated column names.
        Commas, semicolons, and tabs all work as the delimiter, and the file can
        be up to 10 MB.


        Base44 pairs each of the entity's fields with the column of the same
        name, ignoring case, spaces, and punctuation. For any field it can't
        pair by name, an AI model picks a matching column or leaves the field
        out. Columns that match no field are ignored, and every required field
        needs a column.


        The import is all or nothing. Every row is checked against the entity's
        schema before anything is written, and if one row fails, no records are
        created. A file Base44 can't import still returns a successful response,
        with `status` set to `error` and the reason in `details`, so read
        `status` before `output`.


        Each row becomes a new record, so importing the same file twice creates
        every record twice. Row-level security applies, so the whole call is
        rejected when the entity's `rls` create rule doesn't cover one of the
        rows. Imported records don't trigger the app's webhooks, automations, or
        workflows.


        <Note>This endpoint accepts a personal API key belonging to a user with
        access to the app, or a workspace API key, which acts as the workspace
        owner. A read-only key is refused.</Note>


        Runs as your user in this app, so the app's access rules decide which
        records you can read or change.
      operationId: import_entities_api_apps__app_id__entities__entity_name__import_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app that owns the entity.
            title: App Id
          description: ID of the app that owns the entity.
          example: 6820f3a4e7b91d003c45a1f2
        - name: entity_name
          in: path
          required: true
          schema:
            type: string
            description: >-
              Name of the entity, exactly as [List entity
              schemas](/api-reference/list-entity-schemas) reports it. Don't
              pass `User` here. It doesn't fail, but it reads and writes a
              separate, disconnected set of records stored under that name, not
              the app's real user accounts, which are managed through their own
              endpoints.
            title: Entity Name
          description: >-
            Name of the entity, exactly as [List entity
            schemas](/api-reference/list-entity-schemas) reports it. Don't pass
            `User` here. It doesn't fail, but it reads and writes a separate,
            disconnected set of records stored under that name, not the app's
            real user accounts, which are managed through their own endpoints.
          example: Invoice
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              title: ImportEntityRecords
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    The CSV file to import, with a header row naming each
                    column. Up to 10 MB.
      responses:
        '200':
          description: The import's outcome, including when the file couldn't be imported.
          content:
            application/json:
              schema:
                type: object
                title: ImportEntityRecordsResult
                description: The outcome of a CSV import.
                properties:
                  status:
                    type: string
                    enum:
                      - success
                      - error
                    description: >-
                      Whether the import went through. Either `"success"` or
                      `"error"`. On `error` no records were created.
                    example: success
                  details:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      What happened, in plain language. On `error` it says why
                      the file couldn't be imported, for example a required
                      field no column matched.
                    example: Successfully imported 2 entities with RLS enforcement
                  output:
                    anyOf:
                      - type: array
                        items:
                          additionalProperties: true
                          description: One record in one of an app's entities.
                          properties:
                            id:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                ID of the record. Pass it as `entity_id` to [Get
                                entity
                                record](/api-reference/get-entity-record),
                                [Update entity
                                record](/api-reference/update-entity-record) or
                                [Delete entity
                                record](/api-reference/delete-entity-record).
                              example: 6886b8d390dc7e2f4a2c91b3
                              title: Id
                            created_date:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                When the record was created, as a UTC timestamp
                                in ISO 8601 format. A record Base44 has just
                                created carries a `Z` suffix, and a record read
                                back from storage does not.
                              example: '2026-06-01T09:23:41.481000'
                              title: Created Date
                            updated_date:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                When the record last changed, as a UTC timestamp
                                in ISO 8601 format. A record Base44 has just
                                created carries a `Z` suffix, and a record read
                                back from storage does not.
                              example: '2026-06-04T14:07:02.115000'
                              title: Updated Date
                            created_by:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Email of the app user who created the record, or
                                `anonymous` when a visitor created it on an app
                                that needs no login. Apps that hide record
                                authorship leave this field out of the response.
                              example: jane@acme.com
                              title: Created By
                            created_by_id:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                ID of the app user who created the record, or
                                `anonymous` when a visitor created it on an app
                                that needs no login.
                              example: 6874b0c2e1a94d0031bb77de
                              title: Created By Id
                            is_sample:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                              description: >-
                                Whether Base44 stored the record as sample data
                                while the app was being built. A record you
                                create reports `false`.
                              example: false
                              title: Is Sample
                          title: EntityRecord
                          type: object
                      - type: 'null'
                    description: >-
                      The records the import created, in the same shape as [List
                      entity records](/api-reference/list-entity-records)
                      returns them, or `null` when `status` is `error`.
                    example:
                      - id: 6886b8d390dc7e2f4a2c91b3
                        created_date: '2026-06-01T09:23:41.481000Z'
                        updated_date: '2026-06-01T09:23:41.481000Z'
                        created_by: jane@acme.com
                        created_by_id: 6874b0c2e1a94d0031bb77de
                        is_sample: false
                        amount: 4200
                        status: draft
                        customer_email: jane@acme.com
                required:
                  - status
                  - details
                  - output
        '400':
          description: >-
            The file is over 10 MB, or on some apps a value is over 20,000
            characters.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have access to this app, the entity's `rls` create rule
            doesn't cover one of the rows, or your API key is read-only. On apps
            with private-file protection on, also returned with code
            `private_file_access_denied` when the change adds a private file you
            can't open.
        '404':
          description: App not found, or the app has no entity with this name.
        '405':
          description: The entity is `User`, whose records can't be imported.
        '413':
          description: >-
            `entity_record_too_many_values`: a new record would hold more
            distinct values than the per-record limit (10,000 by default; a list
            counts each distinct item), an edit would grow a record already over
            it or rewrite more values than the limit, or an update-many call
            would add more than the limit to each matched record. Other edits of
            a record over the limit, and removing values, still succeed. Split
            the data into several smaller records. `details` gives
            `entity_name`, `record_values` and `limit_values`.
        '422':
          description: The request has no `file` field.
        '429':
          description: >-
            Rate limit exceeded. The base limit is 20 requests per minute. See
            [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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