Perform deleting user's document (SSN, Driving License etc.) by FileType in request

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

FieldTypeRequiredDescription
fileTypestring (enum)YesThe type of document to delete. Must match one of the predefined fileType enum values.

Accepted fileType values:

ValueDescription
UserIconUser profile icon
TransactionIconTransaction icon image
DriverLicenseDriver's license document
SocialSecurityNumberSocial Security Number document
TaxFilingTax filing document
OperatingAgreementBusiness operating agreement
ArticlesOfIncorporationArticles of incorporation
BusinessRegistrationBusiness registration document
BusinessLicenseBusiness license
TaxId_applicationTax ID application
PassportPassport document
RewardIntegrationImageReward integration image
Lease_AgreementLease agreement
Utility_BillUtility bill
OtherOther document type
CardIconSmallCard icon (small)
CardIconLargeCard icon (large)
UsMilitaryRecordOfServiceUS military record of service
StateUsMilitaryArmedForcesIdState US military / armed forces ID
UsTaxFormUS tax form
W2W-2 tax form
Form10991099 tax form
PhoneBillPhone bill
CableBillCable bill
InternetBillInternet bill
BankStatementBank statement
Statement401k401(k) statement
BrokerageStatementBrokerage statement
LifeInsuranceLife insurance document
HealthInsuranceHealth insurance document
AutoInsuranceAuto insurance document
MunicipalIdMunicipal ID
StateIssuedIdState-issued ID
CertificateOfCitizenshipCertificate of citizenship
CourtOrderForLegalNameChangeCourt order for legal name change
StateUsPermanentResidentCardUS permanent resident card
StateConsularIdentificationCardConsular identification card
StateUsBorderCrossingCardUS border crossing card
StateUsEmploymentAuthorizationCardUS employment authorization card
StateTribalIdState tribal ID
BirthCertificateBirth certificate
Form5498Form 5498
Form1098Form 1098
PayStubPay stub
MedicareCardMedicare card
CardIconLargeBackSideCard icon large (back side)
BurnerCardIconSmallBurner card icon (small)
BurnerCardIconLargeBurner card icon (large)
BurnerCardIconLargeBackSideBurner card icon large (back side)
SubscriptionIconSubscription icon
StatementGeneral statement
{
  "fileType": "DriverLicense"
}

Response

200 OK

A successful response indicates the document was found and deleted. No response body is returned.

Error Codes

CodeWhen it happens
400Missing required fileType field, or the value does not match a valid enum entry
401Token missing, expired, or invalid
403Insufficient permissions to delete the specified document
404No document of the specified fileType found for the authenticated user
500Internal server error

Common Mistakes

  • Providing a fileType string 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 fileType field 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 user
  • GET /Files/getDocument — Retrieve a previously uploaded document by file type
  • GET /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"
  }'
Body Params
string
enum
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses
200

Success

500

Server Error

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json