--- title: "Upload file" slug: "upload-file" updated: 2026-04-01T03:43:19Z published: 2026-04-01T03:43:19Z canonical: "docs.xendit.co/upload-file" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.xendit.co/llms.txt > Use this file to discover all available pages before exploring further. # Upload file Post/files Make a POST request to this endpoint to upload a file. We currently support uploading PNG, JPG/JPEG, PDF files that are less than 10 MB. SecurityHTTPType Basic Body parametersuploadKYCFile ```json { "purpose": "KYC_DOCUMENT", "file": "file=@/Users/johndoe/Documents/proof-of-business.pdf" } ``` object purposestring Purpose of the file Valid values[ "KYC_DOCUMENT", "CHARGEBACK_EVIDENCE" ] filestring Path to the file to be uploaded. Supported types: `application/pdf`, `image/png`, `image/jpg`, `image/jpeg` Responses200 Successful operation postFileUpload ```json { "id": "file-ec700c1c-db17-4496-b1fb-04ebe551b412", "business_id": "ec700c1c-db17-4496-b1fb-04ebe551b412", "purpose": "KYC_DOCUMENT", "created": "2020-10-08T06:38:33.479Z", "updated": "2020-10-08T06:38:33.479Z", "type": "image/png", "size": 10000, "url": "https://files.xendit.co/file-ec700c1c-db17-4496-b1fb-04ebe551b412" } ``` object idstring Unique ID generated by Xendit for the particular file business_idstring Unique ID generated by Xendit for the particular file purposestring Purpose of the file Valid values[ "KYC_DOCUMENT", "CHARGEBACK_EVIDENCE" ] createdstring UTC Timestamp of file upload in ISO format updatedstring UTC Timestamp of last file update in ISO format typestring Type of the file sizeinteger Size of the file in bytes urlstring URL to download the file 400 Inputs are failing validation. The errors field contains details about which fields are violating validation. object error_codestring Valid values[ "API_VALIDATION_ERROR", "FEATURE_NOT_AVAILABLE" ] messagestring errors Array OneOfstringstring objectobject 403 API key in use does not have necessary permissions to perform the request. Please assign proper permissions for the key. object error_codestring Valid values[ "RATE_LIMIT_EXCEEDED" ] messagestring errors Array OneOfstringstring objectobject 413 The file size is greater than 10MB and exceeded size limits. Please compress the payload before retrying object error_codestring Valid values[ "FILE_TOO_LARGE_EXCEEDED_ERROR" ] messagestring errors Array OneOfstringstring objectobject 415 The file format is not supported. Please review the file type before retrying object error_codestring Valid values[ "UNSUPPORTED_CONTENT_TYPE_ERROR" ] messagestring errors Array OneOfstringstring objectobject 429 The file format is not supported. Please review the file type before retrying object error_codestring Valid values[ "RATE_LIMIT_EXCEEDED" ] messagestring errors Array OneOfstringstring objectobject