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

# Upload creditor profile CSV

> Upload a creditor profile CSV, create queued upload history, and dispatch the import job on the imports queue.



## OpenAPI

````yaml /api/ecomailhub.openapi.yaml post /import-creditor-profiles
openapi: 3.1.0
info:
  title: YouNegotiate EcoMail Hub API
  version: '2.0'
  description: Stateless API endpoints for EcoMail Hub / EcoPortal users.
servers:
  - url: https://api.ecomailhub.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public EcoMail Hub domain system and health endpoints.
  - name: Authentication
    description: EcoMail Hub login, logout, password reset, and password change endpoints.
  - name: Profile
    description: Authenticated EcoMail Hub user profile endpoints.
  - name: Dashboard
    description: EcoMail Hub dashboard summary and notice-response bucket endpoints.
  - name: Manage Consumers
    description: >-
      EcoMail Hub consumer identity grouping and notice-response count
      endpoints.
  - name: Manage Creditors
    description: >-
      EcoMail Hub creditor profile and company-only member profile table
      endpoints.
  - name: Import Creditor Profiles
    description: EcoMail Hub creditor profile CSV import endpoints.
  - name: Manage Notice Response
    description: >-
      EcoMail Hub top-level notice-response review, reassignment, and close
      endpoints.
  - name: Manage Users
    description: EcoMail Hub user account management endpoints.
  - name: Reports
    description: EcoMail Hub one-time and scheduled CSV report endpoints.
  - name: Communications
    description: EcoMail Hub communication template editor endpoints.
paths:
  /import-creditor-profiles:
    post:
      tags:
        - Import Creditor Profiles
      summary: Upload creditor profile CSV
      description: >-
        Upload a creditor profile CSV, create queued upload history, and
        dispatch the import job on the imports queue.
      operationId: ecomailhubUploadCreditorProfileImport
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreditorProfileImportUploadRequest'
      responses:
        '201':
          description: Creditor profile import queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditorProfileImportHistoryResponse'
              example:
                message: Import queued.
                data:
                  id: 41
                  filename: Creditor-Profiles-20260705154530-a1b2c3d4.csv
                  original_filename: Creditor Profiles.csv
                  failed_filename: null
                  file_size_bytes: 4096
                  status: queued
                  status_label: Queued
                  total_records: 0
                  success_count: 0
                  error_count: 0
                  is_hidden: false
                  actions:
                    can_download_uploaded_file: true
                    can_download_failed_file: false
                    can_delete: true
                  processing_started_at: null
                  processing_completed_at: null
                  created_at: '2026-07-05T10:15:30.000000Z'
                  updated_at: '2026-07-05T10:15:30.000000Z'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    CreditorProfileImportUploadRequest:
      type: object
      required:
        - import_file
      properties:
        import_file:
          type: string
          format: binary
          description: CSV file with the expected creditor profile import headers.
    CreditorProfileImportHistoryResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
          example: Import queued.
        data:
          $ref: '#/components/schemas/CreditorProfileImportHistory'
    CreditorProfileImportHistory:
      type: object
      required:
        - id
        - filename
        - original_filename
        - failed_filename
        - file_size_bytes
        - status
        - status_label
        - total_records
        - success_count
        - error_count
        - is_hidden
        - actions
        - processing_started_at
        - processing_completed_at
        - created_at
        - updated_at
      properties:
        id:
          type: integer
          example: 41
        filename:
          type: string
          example: Creditor-Profiles-20260705154530-a1b2c3d4.csv
        original_filename:
          type: string
          example: Creditor Profiles.csv
        failed_filename:
          type:
            - string
            - 'null'
          example: null
        file_size_bytes:
          type:
            - integer
            - 'null'
          example: 4096
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - failed
          example: queued
        status_label:
          type: string
          example: Queued
        total_records:
          type: integer
          minimum: 0
          example: 0
        success_count:
          type: integer
          minimum: 0
          example: 0
        error_count:
          type: integer
          minimum: 0
          example: 0
        is_hidden:
          type: boolean
          example: false
        actions:
          type: object
          required:
            - can_download_uploaded_file
            - can_download_failed_file
            - can_delete
          properties:
            can_download_uploaded_file:
              type: boolean
              example: true
            can_download_failed_file:
              type: boolean
              example: true
            can_delete:
              type: boolean
              example: true
        processing_started_at:
          type:
            - string
            - 'null'
          format: date-time
          example: null
        processing_completed_at:
          type:
            - string
            - 'null'
          format: date-time
          example: null
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            message: Unauthenticated.
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            message: The given data was invalid.
            errors:
              email:
                - The email field is required.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum

````