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

# Upload a CSV file for ingestion

> Upload a CSV file and queue it for ingestion.

The file is accepted synchronously and processed asynchronously. The
response contains a record describing the upload; its ``status`` begins
as ``pending`` and transitions to ``processing`` and then ``completed``
(or ``failed``) as ingestion proceeds.

Parameters
----
`file` : multipart file.
    The CSV file to upload.

`slug` : `str`.
    The data category for this upload (e.g. ``kyc_cert_policy``,
    ``kyb_cert_policy``). Must be one of the categories supported for
    your account.

Returns
----
`file_upload` : `FileUpload`.
    The created upload record, including its ``id`` and current
    ``status``.

Raises
----
`ValidationError`.
    If the file name or ``slug`` is invalid.

Examples
-----
```bash
>>> curl -X POST https://app.solo.one/file-upload/ingest \
...   -H "Authorization: Bearer $TOKEN" \
...   -F "file=@sample.csv" \
...   -F "slug=kyc_cert_policy"
```



## OpenAPI

````yaml POST /v1/file-upload/ingest
openapi: 3.1.0
info:
  title: SOLO Network API
  version: v1
servers:
  - url: https://api.solo.one
    description: Production
  - url: https://api.sandbox.solo.one
    description: Sandbox
security: []
paths:
  /v1/file-upload/ingest:
    post:
      tags:
        - File Upload
      summary: Upload a CSV file for ingestion
      description: |-
        Upload a CSV file and queue it for ingestion.

        The file is accepted synchronously and processed asynchronously. The
        response contains a record describing the upload; its ``status`` begins
        as ``pending`` and transitions to ``processing`` and then ``completed``
        (or ``failed``) as ingestion proceeds.

        Parameters
        ----
        `file` : multipart file.
            The CSV file to upload.

        `slug` : `str`.
            The data category for this upload (e.g. ``kyc_cert_policy``,
            ``kyb_cert_policy``). Must be one of the categories supported for
            your account.

        Returns
        ----
        `file_upload` : `FileUpload`.
            The created upload record, including its ``id`` and current
            ``status``.

        Raises
        ----
        `ValidationError`.
            If the file name or ``slug`` is invalid.

        Examples
        -----
        ```bash
        >>> curl -X POST https://app.solo.one/file-upload/ingest \
        ...   -H "Authorization: Bearer $TOKEN" \
        ...   -F "file=@sample.csv" \
        ...   -F "slug=kyc_cert_policy"
        ```
      operationId: ingest_csv_v1_file_upload_ingest_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_ingest_csv_v1_file_upload_ingest_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUpload'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_ingest_csv_v1_file_upload_ingest_post:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
        slug:
          type: string
          title: Slug
      type: object
      required:
        - file
        - slug
      title: Body_ingest_csv_v1_file_upload_ingest_post
    FileUpload:
      properties:
        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
        id:
          type: string
          format: uuid
          title: Id
        entity_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Entity Id
        account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Account Id
        product_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Product Id
        network_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Network Id
        attestation_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Attestation Id
        s3_bucket:
          type: string
          title: S3 Bucket
        s3_key:
          type: string
          title: S3 Key
        status:
          type: string
          title: Status
          default: pending
        slug:
          type: string
          title: Slug
        source:
          type: string
          title: Source
          default: frontend
        original_filename:
          type: string
          title: Original Filename
        file_format:
          anyOf:
            - type: string
            - type: 'null'
          title: File Format
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        declared_byte_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Declared Byte Size
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
      type: object
      required:
        - s3_bucket
        - s3_key
        - slug
        - original_filename
      title: FileUpload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````