# Upload a file

Uploads and stores a file in Zuora Mediation for use in meter processing. Supported formats include CSV, Excel, and JSON. You can specify metadata like headers,
 delimiters, sheets, and data ranges.

Endpoint: POST /meters/files
Version: 2026-06-05
Security: bearerAuth

## Request fields (multipart/form-data):

  - `file` (string, required)
    The file to store

  - `hasHeader` (boolean)
    Indicates if the file has a header (for CSV/Excel)

  - `firstRow` (integer)
    Indicates where the first row starts (for CSV format)

  - `delimiter` (string)
    Delimiter to separate values (for CSV format)

  - `sheet` (string)
    The sheet where data lives (for Excel)

  - `dataRange` (string)
    The data range in the sheet (for Excel)

  - `resolveFileNameConflict` (boolean)
    Whether to generate a UUID file name

  - `targetFolder` (string)
    The target folder to store the file

  - `overwriteExistingFile` (boolean)
    Whether to overwrite an existing file

## Response 200 fields (application/json):

  - `id` (string)
    Internal file ID

  - `name` (string)
    File name

  - `resourceId` (string)
    Resource ID of the file

  - `format` (string)
    File format (CSV, Excel, JSON)

  - `hasHeader` (boolean)
    Indicates if the file has a header

  - `firstRow` (integer)
    The first row number in the CSV file

  - `delimiter` (string)
    Delimiter used in the CSV file

  - `sheet` (string)
    The sheet name in the Excel file

  - `dataRange` (string)
    Data range in the Excel file

  - `lines` (integer)
    Number of lines in the file

  - `createdAt` (string)
    Creation timestamp

  - `updatedAt` (string)
    Last update timestamp

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.code` (string)
    Machine-readable error code identifying the failure type.

  - `errors.message` (string)
    Human-readable description of the error that provides more context about what went wrong.

  - `success` (boolean)

## Response 401 fields (application/json):

  - `message` (string)
    Error message.

If the error message is "Authentication error", ensure that the Authorization request header contains valid authentication credentials, then retry the request. See [Authentication](https://developer.zuora.com/docs/guides/authentication/) for more information.

If the error message is "Failed to get user info", retry the request.

## Response 500 fields (application/json):

  - `reasons` (array)
    Example: [{"code":"ObjectNotFound","message":"Notification definition with id 6e569e1e05f040eda51a927b140c0ac1 does not exist"}]

  - `reasons.code` (string)
    The error code of response.

  - `reasons.message` (string)
    The detail information of the error response


