Delete Document
The Delete Document endpoint removes a previously uploaded document from the Netevia system based on its file type. This endpoint targets documents associated with the authenticated user's profile, such as identity documents, business registration files, insurance records, and more. Once deleted, the document is removed from the server and the system is updated accordingly.
Endpoint
POST /Files/deleteDocument
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when a customer needs to remove an outdated, incorrect, or no longer relevant document from their profile. This is useful for compliance workflows where document versions must be managed, or when a customer wants to replace a file by first deleting the existing one. It supports a broad range of document types including personal identity documents, business registration files, tax forms, and financial statements.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
fileType | string (enum) | Yes | The type of document to delete. Must match one of the predefined fileType enum values. |
Accepted fileType values:
| Value | Description |
|---|---|
UserIcon | User profile icon |
TransactionIcon | Transaction icon image |
DriverLicense | Driver's license document |
SocialSecurityNumber | Social Security Number document |
TaxFiling | Tax filing document |
OperatingAgreement | Business operating agreement |
ArticlesOfIncorporation | Articles of incorporation |
BusinessRegistration | Business registration document |
BusinessLicense | Business license |
TaxId_application | Tax ID application |
Passport | Passport document |
RewardIntegrationImage | Reward integration image |
Lease_Agreement | Lease agreement |
Utility_Bill | Utility bill |
Other | Other document type |
CardIconSmall | Card icon (small) |
CardIconLarge | Card icon (large) |
UsMilitaryRecordOfService | US military record of service |
StateUsMilitaryArmedForcesId | State US military / armed forces ID |
UsTaxForm | US tax form |
W2 | W-2 tax form |
Form1099 | 1099 tax form |
PhoneBill | Phone bill |
CableBill | Cable bill |
InternetBill | Internet bill |
BankStatement | Bank statement |
Statement401k | 401(k) statement |
BrokerageStatement | Brokerage statement |
LifeInsurance | Life insurance document |
HealthInsurance | Health insurance document |
AutoInsurance | Auto insurance document |
MunicipalId | Municipal ID |
StateIssuedId | State-issued ID |
CertificateOfCitizenship | Certificate of citizenship |
CourtOrderForLegalNameChange | Court order for legal name change |
StateUsPermanentResidentCard | US permanent resident card |
StateConsularIdentificationCard | Consular identification card |
StateUsBorderCrossingCard | US border crossing card |
StateUsEmploymentAuthorizationCard | US employment authorization card |
StateTribalId | State tribal ID |
BirthCertificate | Birth certificate |
Form5498 | Form 5498 |
Form1098 | Form 1098 |
PayStub | Pay stub |
MedicareCard | Medicare card |
CardIconLargeBackSide | Card icon large (back side) |
BurnerCardIconSmall | Burner card icon (small) |
BurnerCardIconLarge | Burner card icon (large) |
BurnerCardIconLargeBackSide | Burner card icon large (back side) |
SubscriptionIcon | Subscription icon |
Statement | General statement |
{
"fileType": "DriverLicense"
}Response
200 OK
A successful response indicates the document was found and deleted. No response body is returned.
Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fileType field, or the value does not match a valid enum entry |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to delete the specified document |
| 404 | No document of the specified fileType found for the authenticated user |
| 500 | Internal server error |
Common Mistakes
- Providing a
fileTypestring that does not exactly match one of the enum values (values are case-sensitive). - Attempting to delete a document that was never uploaded — the endpoint returns 404 if no matching document exists for the authenticated user.
- Reusing an expired Bearer token; tokens are valid for 10 minutes and must be refreshed before calling this endpoint.
- Omitting the
fileTypefield entirely from the request body, which results in a 400 validation error.
Related Endpoints
POST /Files/uploadDocument— Upload a new document of a specified type for the authenticated userGET /Files/getDocument— Retrieve a previously uploaded document by file typeGET /Files/listDocuments— List all documents currently associated with the authenticated user
Example
curl -X POST https://api.banking.netevia.dev/Files/deleteDocument \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fileType": "DriverLicense"
}' 200Success
500Server Error
