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

# Import Csv

> Create a table from a CSV upload. ``spec`` is a JSON ImportCsvSpec
(name, id_type, has_header, columns).



## OpenAPI

````yaml post /v1/tables/import
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/tables/import:
    post:
      tags:
        - V1 - Tables
      summary: Import Csv
      description: |-
        Create a table from a CSV upload. ``spec`` is a JSON ImportCsvSpec
        (name, id_type, has_header, columns).
      operationId: import_csv
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_import_csv'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_import_csv:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
          format: binary
        spec:
          type: string
          title: Spec
      type: object
      required:
        - file
        - spec
      title: Body_import_csv
    TableResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        group_id:
          type: string
          format: uuid
          title: Group Id
        name:
          type: string
          title: Name
        sql_name:
          type: string
          title: Sql Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id_type:
          type: string
          enum:
            - uuid
            - autoincrement
          title: Id Type
        columns:
          items:
            $ref: '#/components/schemas/DataTableColumn'
          type: array
          title: Columns
        meta:
          additionalProperties: true
          type: object
          title: Meta
        source:
          type: string
          enum:
            - custom
            - platform
          title: Source
          default: custom
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - group_id
        - name
        - sql_name
        - description
        - id_type
        - columns
        - meta
        - created_at
        - updated_at
      title: TableResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DataTableColumn:
      properties:
        name:
          type: string
          title: Name
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - datetime
            - file
            - reference
          title: Type
        default:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: 'null'
          title: Default
        references:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: References
        on_delete:
          type: string
          enum:
            - restrict
            - cascade
            - set_null
          title: On Delete
          default: restrict
      type: object
      required:
        - name
        - type
      title: DataTableColumn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````