# Create file format

WARNING: The generated curl command is incorrect, so please refer to the Masking API guide for instructions on how to upload files through the API

Endpoint: POST /file-formats
Version: 5.1.51
Security: api_key

## Security:

  - `api_key` (unknown)
    apiKey in header Authorization

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

  - `fileFormatName` (string)
    The name of the fileformat to be uploaded, if not provided, the name of the uploaded file will be used.

  - `fileFormat` (string, required)
    The file format to be uploaded. The logical name of the file format will be exactly the name of this uploaded file

  - `fileFormatType` (string, required)
    The type of the file format being uploaded
    Enum: "DELIMITED", "FIXED_WIDTH", "XML", "JSON", "PARQUET"

## Response 201:

  - `201` (unknown)
    Success

## Response 201 fields (application/json):

  - `fileFormatId` (integer)
    The ID number of the file format. This field is auto-generated by the Masking Engine.

  - `fileFormatName` (string)
    The name of the file format, as inferred from the uploaded file.

  - `fileFormatType` (string)
    The type of file that this file format describes.
    Enum: "DELIMITED", "FIXED_WIDTH", "XML", "JSON", "PARQUET"

  - `header` (integer)
    The number of lines at the beginning of the file to skip.

  - `footer` (integer)
    The number of lines at the end of the file to skip.

  - `wholeFileMasking` (boolean)
    This flag indicates if the file format is associated with a file to be read as whole or line-by-line (Only for FIXED_WIDTH file type). For example, if the whole file masking is true, then the whole file will be read as a single record, rather than reading it line by line.

  - `fieldsCount` (integer)
    This returns the number of fields present in a file format.

  - `fileFormatDownloadId` (string)
    The ID of the file format download. This is used to download the file format.

## Response 403:

  - `403` (unknown)
    Forbidden access

## Response 409:

  - `409` (unknown)
    Conflict

