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

# Upload a CSV or Excel file for contact ingestion

> Parses the file and creates an ingestion session. Returns session ID and file metadata.



## OpenAPI

````yaml /openapi.json post /api/contact/ingestion/upload
openapi: 3.0.0
info:
  title: GoMobile Backend API
  description: >-
    API documentation for GoMobile telephony platform - automated calling
    campaigns, interactive voice flows, and call management
  version: '1.0'
  contact: {}
servers:
  - url: http://localhost:3000
    description: Local Development
security: []
tags:
  - name: Organizations
    description: Multi-tenant organization management
  - name: Teams
    description: Team structure and hierarchy
  - name: Contacts
    description: Customer contact management (CRM)
  - name: Entities
    description: Business entities management
  - name: Audiences
    description: Contact segmentation and groups
  - name: Programs
    description: Call campaign configuration
  - name: Call Flows
    description: Interactive call flow builder
paths:
  /api/contact/ingestion/upload:
    post:
      tags:
        - Contact Ingestion
      summary: Upload a CSV or Excel file for contact ingestion
      description: >-
        Parses the file and creates an ingestion session. Returns session ID and
        file metadata.
      operationId: IngestionController_upload
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadOptionsDto'
      responses:
        '201':
          description: File uploaded and parsed successfully
        '400':
          description: Invalid file format or empty file
components:
  schemas:
    UploadOptionsDto:
      type: object
      properties:
        previewRows:
          type: number
          description: 'Number of preview rows to return (default: 20, max: 100)'
          default: 20
          minimum: 1
          maximum: 100
        hasHeaderRow:
          type: boolean
          description: 'Whether the first row is a header row (default: false)'
          default: false
        audienceId:
          type: string
          description: Optional audience ID to link imported contacts to
          format: uuid

````