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

Request

  • Base URL
    http://localhost:3000
  • URL
    http://localhost:3000/file
  • Auth
    API key in cookie session

Request body multipart/form-data

filestring binary required

Spreadsheet file to upload

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"
}

Changes

No recorded changes to this operation across all 1 revision of this API.