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

# Upload CSV

> Uploads a CSV file and returns a preview with AI-suggested column mappings. Max 200 MB.



## OpenAPI

````yaml https://folksbase.onrender.com/api/openapi.json post /api/imports
openapi: 3.1.0
info:
  title: folksbase API
  description: >-
    Contact management API for folksbase. Upload CSVs, manage contacts and tags,
    export data.
  version: 1.0.0
servers:
  - url: https://folksbase.onrender.com
    description: Production
  - url: http://localhost:3001
    description: Local development
security:
  - bearerAuth: []
paths:
  /api/imports:
    post:
      tags:
        - Imports
      summary: Upload CSV
      description: >-
        Uploads a CSV file and returns a preview with AI-suggested column
        mappings. Max 200 MB.
      operationId: postApiImports
      responses:
        '201':
          description: Upload successful with preview
          content:
            application/json:
              schema:
                type: object
                properties:
                  importId:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  preview:
                    type: object
                    properties:
                      headers:
                        type: array
                        items:
                          type: string
                      rows:
                        type: array
                        items:
                          type: array
                          items:
                            type: string
                      totalRows:
                        type: number
                    required:
                      - headers
                      - rows
                      - totalRows
                  suggestions:
                    type: array
                    items:
                      type: object
                      properties:
                        header:
                          type: string
                        field:
                          anyOf:
                            - type: string
                            - type: 'null'
                        confidence:
                          type: string
                          enum:
                            - high
                            - low
                      required:
                        - header
                        - field
                        - confidence
                required:
                  - importId
                  - preview
                  - suggestions
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - code
                  - message
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase JWT token from Authorization header

````