# Create a File Before uploading a file, you must create a File resource. Once created, you can upload your file to the new File resource. Endpoint: POST /files Version: 2022-02-01 Security: BasicAuth ## Header parameters: - `Finix-Version` (string) Specify the API version of your request. For more details, see Versioning. Example: "2022-02-01" - `Content-Type` (string) The data type being sent in the request body must be application/json. Example: "application/json" ## Request fields (application/json): - `display_name` (string) The human-readable name to use for the File. Example: "Bank Statement (January 2024)" - `linked_to` (string, required) The ID of the resource the File will be linked to. This can be either a Merchant ID or Identity ID. Example: "MU2n7BSovtwYsWYZF6rBnnzk" - `tags` (object,null) Include up to 50 key: value pairs to annotate requests with custom metadata. - Maximum character length for individual keys is 40. - Maximum character length for individual values is 500. (For example, order_number: 25, item_type: produce, department: sales) - `type` (string, required) The type of document. Enum: "BANK_STATEMENT", "BANK_STATEMENT_ONE_MONTH", "BANK_STATEMENT_THREE_MONTHS", "BUSINESS_ADDRESS_DOCUMENT", "BUSINESS_ADDRESS_VERIFICATION", "BUSINESS_INCORPORATION_DOCUMENT", "BUSINESS_OWNERSHIP_STRUCTURE", "BUSINESS_REGISTRATION", "BUSINESS_REGISTRATION_DOCUMENT", "BUSINESS_TAX_EXEMPTION_STATUS_DOCUMENT", "BUSINESS_TAX_ID_DOCUMENT", "DEVICE_IDLE_IMAGE", "DIGITAL_SIGNATURE", "DRIVERS_LICENSE_BACK", "DRIVERS_LICENSE_FRONT", "ENHANCED_DUE_DILIGENCE_DOCUMENT", "IDENTIFICATION_CARD_BACK", "IDENTIFICATION_CARD_FRONT", "OTHER", "OWNER_GOVERNMENT_ISSUED_PHOTO_ID", "OWNER_TAX_ID_DOCUMENT", "PASSPORT", "PCI_DOCUMENT", "PROCESSING_STATEMENT", "SCREEN_RECORDING", "TAX_DOCUMENT", "VIDEO_DOCUMENT" ## Response 201 fields (application/json): - `id` (string) The ID of the resource. - `created_at` (string) Timestamp of when the object was created. - `updated_at` (string) Timestamp of when the object was last updated. - `application` (string) ID of the Application the resource was created under. - `display_name` (string) The human-readable name of the File. The file name format is _ by default. - `extension` (string,null) The extension of the file. Example: "png" - `file_name` (string,null) The name of the uploaded File. It is null when the File resource is first created and is automatically updated to the uploaded file's name. You cannot change this field. Example: "bank_statement_01_2024.png" - `identity_id` (string,null) The ID of the Application that the File was created under. - `linked_to` (string) The ID of the resource the File is linked to. This can be either a Merchant ID or Identity ID. Example: "MU2n7BSovtwYsWYZF6rBnnzk" - `linked_type` (string) The type of the resource that the File is linked to. - `platform_id` (string) The ID of the Platform that the File was created under. - `size_in_bytes` (integer,null) The size of the uploaded File in bytes. It is set to null when the File resource is first created and updates automatically after a File is uploaded. - `status` (string) The file's upload status. Enum: "REQUIRES_UPLOAD", "PENDING", "UPLOADED", "INVALID" - `tags` (object,null) Include up to 50 key: value pairs to annotate requests with custom metadata. - Maximum character length for individual keys is 40. - Maximum character length for individual values is 500. (For example, order_number: 25, item_type: produce, department: sales) - `type` (string) The type of document. Finix may return more enums than those provided. Ensure your code accepts additional enums returned by Finix. Enum: "BANK_STATEMENT", "BANK_STATEMENT_ONE_MONTH", "BANK_STATEMENT_THREE_MONTHS", "BUSINESS_ADDRESS_DOCUMENT", "BUSINESS_ADDRESS_VERIFICATION", "BUSINESS_INCORPORATION_DOCUMENT", "BUSINESS_OWNERSHIP_STRUCTURE", "BUSINESS_REGISTRATION", "BUSINESS_REGISTRATION_DOCUMENT", "BUSINESS_TAX_EXEMPTION_STATUS_DOCUMENT", "BUSINESS_TAX_ID_DOCUMENT", "DEVICE_IDLE_IMAGE", "DIGITAL_SIGNATURE", "DRIVERS_LICENSE_BACK", "DRIVERS_LICENSE_FRONT", "ENHANCED_DUE_DILIGENCE_DOCUMENT", "IDENTIFICATION_CARD_BACK", "IDENTIFICATION_CARD_FRONT", "OTHER", "OWNER_GOVERNMENT_ISSUED_PHOTO_ID", "OWNER_TAX_ID_DOCUMENT", "PASSPORT", "PCI_DOCUMENT", "PROCESSING_STATEMENT", "SCREEN_RECORDING", "TAX_DOCUMENT", "VIDEO_DOCUMENT" ## Response 400 fields (application/json): - `total` (integer, required) Total number of errors returned. - `_embedded` (object, required) Container for embedded error objects. - `_embedded.errors` (array) List of individual error objects. - `_embedded.errors.code` (string) The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request. - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) A human-friendly error message. - `_embedded.errors._links` (object) Links related to this error. - `_embedded.errors._links.self` (object) Link to the resource related to the error. - `_embedded.errors._links.self.href` (string) URL of the related resource. ## Response 401 fields (application/json): - `total` (integer, required) Total number of errors returned. - `_embedded` (object, required) Container for embedded error objects. - `_embedded.errors` (array) List of individual error objects. - `_embedded.errors.code` (string) The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request. - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) A human-friendly error message. - `_embedded.errors._links` (object) Links related to this error. - `_embedded.errors._links.self` (object) Link to the resource related to the error. - `_embedded.errors._links.self.href` (string) URL of the related resource. ## Response 403 fields (application/json): - `total` (integer, required) Total number of errors returned. - `_embedded` (object, required) Container for embedded error objects. - `_embedded.errors` (array) List of individual error objects. - `_embedded.errors.code` (string) The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request. - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) A human-friendly error message. - `_embedded.errors._links` (object) Links related to this error. - `_embedded.errors._links.self` (object) Link to the resource related to the error. - `_embedded.errors._links.self.href` (string) URL of the related resource. ## Response 406 fields (application/json): - `total` (integer, required) Total number of errors returned. - `_embedded` (object, required) Container for embedded error objects. - `_embedded.errors` (array) List of individual error objects. - `_embedded.errors.code` (string) The error code. The UNKNOWN error code is returned for a 401 Unauthorized or 403 Forbidden request. - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) A human-friendly error message. - `_embedded.errors._links` (object) Links related to this error. - `_embedded.errors._links.self` (object) Link to the resource related to the error. - `_embedded.errors._links.self.href` (string) URL of the related resource.