Skip to main content

Agent files confirm upload

Confirm a previously requested upload and receive file metadata. Use this endpoint after the upload succeeds so the file becomes available and you can receive a temporary download URL.

Endpoint

POST /external/agent-files/confirm-upload

Authentication

See Authentication

Success status code

201 Created

Request body

NameRequiredTypeNotes
fileIdYesstringFile identifier returned by Agent files upload presign.
fileSizeNointegerOptional uploaded file size in bytes.

Response body

FieldTypeNotes
idstringFile record identifier.
fileNamestringOriginal file name.
fileSizeinteger or nullUploaded file size in bytes when supplied.
mimeTypestringMIME type for the file.
statusstringCurrent file status; this route returns uploaded after confirmation succeeds.
createdAtstringMillisecond timestamp serialized as a string.
signUrlstring, optionalTemporary download URL returned on the first successful confirmation.

Response example

{
  "id": "1024",
  "fileName": "report.csv",
  "fileSize": 10240,
  "mimeType": "text/csv",
  "status": "uploaded",
  "createdAt": "1776743105123",
  "signUrl": "https://storage.example.com/agent-files/1024-report.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600"
}

Error responses

  • 401 Unauthorized
  • 404 Not Found

Notes

  • Call this after uploading the file bytes to the putUrl returned by Agent files upload presign.
  • Download URLs expire after 1 hour.