| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Add Attachment
Uploads a file to an existing ticket by submitting Base64-encoded file data along with the ticket and merchant identifiers. Supported attachment types span the full range of underwriting and compliance documents accepted by Netevia HQ. The attachment is associated with the ticket immediately and can be retrieved using the Get Attachments by Ticket ID endpoint.
Endpoint
POST /api/v1/tickets/attachment
Authentication
Basic HTTP Authentication required.
Encode username:password in Base64 and pass in the Authorization header:
Authorization: Basic {base64(username:password)}
When to use
Use this endpoint when supporting documentation needs to be submitted alongside or after a ticket has been created — for example, attaching a voided check or processing statement in support of an Instant Funding request. It is also appropriate when an underwriter requests additional documents for an open ticket.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
ticketId | integer (int32) | Yes | ID of the ticket to attach the file to. |
attachmentType | string (enum) | Yes | Category of the attachment. See enum values below. |
data | string (byte) | Yes | Base64-encoded content of the file. |
fileName | string | Yes | Original filename including extension (e.g., voided_check.pdf). |
id | integer (int32) | Yes | Merchant profile ID associated with the ticket. |
comment | string | No | Optional note describing the attachment. |
riskDocument | boolean | No | Set to true if the file is a risk-sensitive document. |
Accepted attachmentType values: CForm501, ACHInformation, AdditionalDocuments, BusinessBankStatements, CancellationLetter, CorporateTaxReturns, CreditReport, DigitalSignatureChange, FinancialStatements, MarketingMaterials, MerchantApplication, Miscellaneous, PCICertificates, PimsDocuments, ProcessingStatements, RiskDocuments, SiteInspectionValidation, VoidCheck, WebSnapshot, Whois, Other, UnderwritingMerchantInformation, CCAuthorizationForm, Invoice, CloverAddendum, CloverGoAddendum, DriversLicense, PosPurchaseForm, ConfirmMpa, PlacementAgreement, CreditProfile, Checklist, PersonalTaxReturns, AddendumForm, ReserveForm, CMSForm, BusinessLicense, PersonalBankStatements, AutomatedGiact, AutomatedMATCH, AutomatedGoogleSearch, AutomatedClear, AutomatedWhois, AutomatedOfac, BankAccountProof, ApplicationSignCertificate
{
"ticketId": 48291,
"attachmentType": "VoidCheck",
"data": "JVBERi0xLjQKJcfs...",
"fileName": "voided_check.pdf",
"id": 70269,
"comment": "Voided check for ACH verification",
"riskDocument": false
}Response
200 OK
| Field | Type | Description |
|---|---|---|
requestId | integer | Internal request tracking ID. |
success | boolean | true if the attachment was added successfully. |
error | string | Error message if the operation failed. |
validationErrors | array | List of field-level validation issues. |
{
"requestId": 98123,
"success": true,
"error": null,
"validationErrors": []
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (ticketId, attachmentType, data, fileName, or id), or data is not valid Base64. |
| 401 | Invalid or missing Basic Auth credentials. |
| 403 | User does not have permission for this operation. |
| 404 | Ticket or resource not found. |
| 500 | Internal server error. |
Common Mistakes
- Sending file bytes directly instead of Base64-encoding the content first.
- Omitting the
idfield (merchant profile ID) — it is required despite the field name being ambiguous. - Using a file extension that does not match the actual MIME type of the encoded data.
- Exceeding server-side file size limits, which will result in a 400 error.
- Setting
attachmentTypeto a value not in the accepted enum list.
Related Endpoints
POST /api/v1/tickets/create— Create the ticket before attaching files.GET /api/v1/tickets/getAttachmentsByTicketId— List all attachments on a ticket.GET /api/v1/tickets/getAttachmentById— Download a specific attachment.
Example
curl -X POST https://hq.staging.netevia.dev/api/v1/tickets/attachment \
-H "Authorization: Basic $(echo -n 'username:password' | base64)" \
-H "Content-Type: application/json" \
-d '{
"ticketId": 48291,
"attachmentType": "VoidCheck",
"data": "JVBERi0xLjQKJcfs...",
"fileName": "voided_check.pdf",
"id": 70269,
"comment": "Voided check for ACH verification",
"riskDocument": false
}'