Upload a publicly accessible file such as icons, images, or documents associated with a partner user or card product.
Upload Public File
This endpoint uploads a file to the Netevia platform and makes it publicly accessible. It supports a wide range of file types including user icons, card icons, identity documents, financial statements, and insurance records. The file content is submitted as a base64-encoded string along with metadata identifying the file type, name, and optional associations to a partner user or card product set.
Endpoint
POST /Files/UploadFilePublic
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 to upload images or documents that need to be publicly referenced by the platform, such as card face icons for physical or virtual card products, user profile icons, or compliance documents linked to a partner user. This is appropriate when the uploaded file should be accessible without authentication, for example when card artwork must be rendered by third-party display systems. For sensitive identity or compliance documents that should remain private, consider using the appropriate private file upload endpoint instead.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| data | string | No | Base64-encoded binary content of the file to upload |
| fileType | string | No | MIME type or format descriptor for the file (e.g., image/png) |
| fileName | string | No | Name to assign to the uploaded file, including extension |
| text | string | No | Optional text content or annotation associated with the file |
| partnerUserId | integer (int32) | No | ID of the partner user to associate this file with |
| templateNotification | integer (int32) | No | Identifier for a notification template to trigger upon upload |
| cardProductSetId | string | No | ID of the card product set to associate this file with (used for card icons) |
| type | string (enum) | No | Categorizes the file's purpose. See the full list of accepted values below |
Accepted values for type:
UserIcon, TransactionIcon, DriverLicense, SocialSecurityNumber, TaxFiling, OperatingAgreement, ArticlesOfIncorporation, BusinessRegistration, BusinessLicense, TaxId_application, Passport, RewardIntegrationImage, Lease_Agreement, Utility_Bill, Other, CardIconSmall, CardIconLarge, UsMilitaryRecordOfService, StateUsMilitaryArmedForcesId, UsTaxForm, W2, Form1099, PhoneBill, CableBill, InternetBill, BankStatement, Statement401k, BrokerageStatement, LifeInsurance, HealthInsurance, AutoInsurance, MunicipalId, StateIssuedId, CertificateOfCitizenship, CourtOrderForLegalNameChange, StateUsPermanentResidentCard, StateConsularIdentificationCard, StateUsBorderCrossingCard, StateUsEmploymentAuthorizationCard, StateTribalId, BirthCertificate, Form5498, Form1098, PayStub, MedicareCard, CardIconLargeBackSide, BurnerCardIconSmall, BurnerCardIconLarge, BurnerCardIconLargeBackSide, SubscriptionIcon, Statement
{
"data": "iVBORw0KGgoAAAANSUhEUgAAAAUA...",
"fileType": "image/png",
"fileName": "card_icon_front.png",
"text": "Front face icon for Platinum card product",
"partnerUserId": 10042,
"templateNotification": null,
"cardProductSetId": "cps_8a3f92bc1d4e",
"type": "CardIconLarge"
}Response
200 OK
The response body is a plain string containing the public URL or file identifier for the uploaded file.
| Field | Type | Description |
|---|---|---|
| (body) | string | The publicly accessible URL or unique identifier referencing the uploaded file |
"https://cdn.banking.netevia.com/files/public/cps_8a3f92bc1d4e/card_icon_front.png"Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields, invalid base64 encoding, or unsupported file type value |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to upload files for the specified partner user or card product set |
| 404 | Referenced partnerUserId or cardProductSetId does not exist |
| 500 | Internal server error |
Common Mistakes
- Submitting
datawithout base64-encoding the file content — the field expects a base64 string, not raw binary or a file path - Using an unsupported string for
type— the value must exactly match one of the documented enum entries (case-sensitive) - Omitting both
cardProductSetIdandpartnerUserIdwhen the file type requires an association (e.g.,CardIconSmall,CardIconLarge) — the file may upload but not be linked to any resource - Providing a
fileTypethat does not match the actual content encoded indata, which can cause rendering failures downstream - Uploading sensitive identity documents (e.g.,
DriverLicense,Passport,SocialSecurityNumber) to a public endpoint — use the appropriate private upload endpoint for documents that should not be publicly accessible
Related Endpoints
POST /Files/UploadFile— Upload a file with restricted (non-public) accessGET /Files/GetFile— Retrieve a previously uploaded file by its identifierPOST /Cards/SetCardProduct— Associate card artwork with a card product set after uploading icons
Example
curl -X POST https://api.banking.netevia.dev/Files/UploadFilePublic \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"data": "iVBORw0KGgoAAAANSUhEUgAAAAUA...",
"fileType": "image/png",
"fileName": "card_icon_front.png",
"text": "Front face icon for Platinum card product",
"partnerUserId": 10042,
"cardProductSetId": "cps_8a3f92bc1d4e",
"type": "CardIconLarge"
}'