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

# View File Details

> Retrieve details of a previously uploaded file including processing status, statistics, and metadata

This endpoint retrieves detailed information about a previously uploaded file, including processing status, email statistics, and metadata.

## Path Parameters

The file ID is required in the URL path:

* **file\_id**: The unique identifier of the uploaded file (obtained from the file upload response)

## How it Works

<Steps>
  <Step title="Get File ID">
    Obtain the file ID from a previous file upload response or file listing
  </Step>

  <Step title="Make Request">
    Send a GET request to `/v1/api/filesupload/{file_id}` replacing `{file_id}`
    with the actual file ID
  </Step>

  <Step title="Receive File Details">
    Get comprehensive information about the file including processing status and
    statistics
  </Step>
</Steps>

## Response Information

The response includes comprehensive file information:

### File Metadata

* **Basic Info**: ID, name, filename, size, status
* **User Info**: Owner details (ID, username, email)
* **File URL**: Direct link to access the uploaded file
* **Timestamps**: Creation and last update dates

### Processing Statistics

* **Email Counts**: Total, billable, duplicate, dropped emails
* **Validation Results**: Valid, invalid, clean email counts
* **Quality Metrics**: Bounce rate, progress percentage
* **Job IDs**: References to cleaning or validation jobs

### File Status

The `status` field indicates the current processing state:

* **pending**: File uploaded but not yet processed
* **processing**: File is currently being processed
* **validated**: Email validation completed
* **cleaned**: Email cleaning completed
* **failed**: Processing failed

## Example Usage

```bash theme={null}
# Get details for file ID 740
GET /v1/api/filesupload/740/
```

```json theme={null}
{
  "id": 740,
  "name": "Customer Email List",
  "file_name": "Book Sheet1.csv",
  "file_size": "328",
  "status": "validated",
  "user": {
    "id": 100,
    "username": "test_user",
    "email": "cool@gmail.com"
  },
  "file": "https://s3.us-east-1.amazonaws.com/sanitizeemail/email_validation_files/Book_Sheet1_wsLgoJw.csv",
  "file_tag": "validate",
  "total_email": 8,
  "billable_email": 4,
  "duplicate_email": 4,
  "dropped_email": 0,
  "clean_email_count": 4,
  "bounced_email": 0,
  "bounce_rate": 0,
  "created_date": "2025-07-11T16:58:10.078456+05:45",
  "is_file_organised": false,
  "progress_percentage": 100,
  "updated_date": "2025-07-11T16:59:00.456247+05:45",
  "valid_emails_count": 4,
  "invalid_emails_count": 0,
  "clean_email_id": null,
  "validate_email_id": 23990312
}
```

## Use Cases

<CardGroup cols={2}>
  <Card title="Check Processing Status" icon="clock">
    Monitor the progress of file processing and validation jobs
  </Card>

  <Card title="Get Email Statistics" icon="chart-bar">
    Retrieve detailed statistics about email quality and counts
  </Card>

  <Card title="Access File URL" icon="link">
    Get the direct URL to download or access the processed file
  </Card>

  <Card title="Track Job References" icon="list-check">
    Find associated cleaning or validation job IDs for further operations
  </Card>
</CardGroup>

<Note>
  **File ID Source**: The file ID is returned when you upload a file using the
  [File Upload endpoint](/api-reference/endpoint/file_upload). Make sure to save
  this ID for future reference.
</Note>

<Tip>
  **Status Monitoring**: Use this endpoint to poll for status updates when
  processing large files. Check the `progress_percentage` field for real-time
  progress updates.
</Tip>


## OpenAPI

````yaml GET /v1/api/filesupload/{file_id}
openapi: 3.1.0
info:
  title: Sanitize-Email API (v1)
  description: Welcome to the Sanitize-Email API Documentation
  license:
    name: Proprietary License
  version: 1.0.0
servers:
  - url: https://base.sanitizeemail.com
security:
  - apiKeyAuth: []
paths:
  /v1/api/filesupload/{file_id}:
    get:
      tags:
        - File Upload
      summary: Get File Details
      description: >-
        Retrieve details of a previously uploaded file including processing
        status, statistics, and metadata
      parameters:
        - $ref: '#/components/parameters/FileId'
      responses:
        '200':
          description: File details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDetailsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    FileId:
      name: file_id
      in: path
      required: true
      schema:
        type: integer
      description: Unique identifier of the uploaded file
      example: 740
  schemas:
    FileDetailsResponse:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the file
        name:
          type: string
          description: Display name of the file
        file_name:
          type: string
          description: Original filename
        file_size:
          type: string
          description: File size in bytes
        status:
          type: string
          enum:
            - pending
            - processing
            - validated
            - cleaned
            - failed
          description: Current processing status of the file
        user:
          $ref: '#/components/schemas/User'
        file:
          type: string
          format: uri
          description: URL to access the uploaded file
        file_tag:
          type: string
          enum:
            - clean
            - validate
            - analyze
          description: Tag associated with the file processing type
        total_email:
          type: integer
          description: Total number of emails found in the file
        billable_email:
          type: integer
          description: Number of emails that count towards billing
        duplicate_email:
          type: integer
          description: Number of duplicate emails found
        dropped_email:
          type: integer
          description: Number of emails that were dropped during processing
        clean_email_count:
          type: integer
          description: Number of clean/valid emails
        bounced_email:
          type: integer
          description: Number of emails that bounced
        bounce_rate:
          type: number
          format: float
          description: Bounce rate as a decimal (0.0 to 1.0)
        created_date:
          type: string
          format: date-time
          description: Date and time when the file was uploaded
        is_file_organised:
          type: boolean
          description: Whether the file was uploaded as organized (with headers)
        progress_percentage:
          type: integer
          minimum: 0
          maximum: 100
          description: Processing progress percentage
        updated_date:
          type: string
          format: date-time
          description: Date and time when the file was last updated
        valid_emails_count:
          type: integer
          description: Number of valid emails
        invalid_emails_count:
          type: integer
          description: Number of invalid emails
        clean_email_id:
          type: integer
          nullable: true
          description: ID of the clean email list (if cleaning was performed)
        validate_email_id:
          type: integer
          nullable: true
          description: ID of the validation job (if validation was performed)
    User:
      type: object
      properties:
        id:
          type: integer
          description: User ID
        username:
          type: string
          description: Username
        email:
          type: string
          format: email
          description: User email address
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: File not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````