v1

latestOpenAPI 3.0.3OGL-UK-3.0raw.githubusercontent.com2025-09-3012629.2 KB
Upload
Forms

Upload file via forms engine

File upload endpoint specifically for @defra/forms-engine-plugin integration. CSRF protection is disabled for this endpoint to allow forms engine integration.

This endpoint handles both:

  • File uploads (multipart/form-data)
  • CDP callbacks (application/json)
post/file

Response

File uploaded successfully

successboolean required
uploadIdstring uuid required

Unique identifier for this upload

filenamestring required

Timestamped filename stored in system

originalFilenamestring

Original filename from user

timestampstring date-time

Upload timestamp (ISO 8601)

messagestring required

Example response

{
  "success": true,
  "uploadId": "550e8400-e29b-41d4-a716-446655440000",
  "filename": "data_2025-09-30T12-00-00-000Z.xlsx",
  "originalFilename": "data.xlsx",
  "timestamp": "2025-09-30T12:00:00.000Z",
  "message": "File uploaded successfully and sent for virus scanning"
}