Skip to main content
POST
/
v1
/
files
/
send-event
Retry File Processing
const options = {
  method: 'POST',
  headers: {
    Authorization: '<authorization>',
    'x-organization-id': '<x-organization-id>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({event_type: '<string>', detail: {}, 'detail.file_id': '<string>'})
};

fetch('https://api.dcycle.io/v1/files/send-event', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Retry File Processing

Use this endpoint when a file is already uploaded, but the downstream processing step has not yet produced a file_reading. Typical cases:
  • retrying a stalled file
  • re-queueing processing after operational issues
  • manually nudging a file that was classified but never parsed into file_reading
This is a retry hook, not the primary upload flow. The normal path is still:
  1. upload file
  2. confirm upload
  3. automatic classification
  4. automatic processing into file_reading

Headers

Authorization
string
required
Bearer token or API token for the authenticated user.
x-organization-id
string
required
Organization UUID that owns the file.

Body

event_type
string
required
Use PROCESS_DOCUMENT.
detail
object
required
Additional event detail payload.
detail.file_id
string
required
File UUID to process.

Example

curl -X POST "https://api.dcycle.io/v1/files/send-event" \
  -H "Authorization: Bearer ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}" \
  -H "x-partner: dcycle" \
  -H "Content-Type: application/json" \
  -d '{
    "event_type": "PROCESS_DOCUMENT",
    "detail": {
      "file_id": "11111111-1111-1111-1111-111111111111"
    }
  }'

Response

true
true means the processing event was accepted and queued.

What Happens Next

After the event is accepted:
  1. the processing pipeline runs asynchronously
  2. a file_reading may be created or updated
  3. clients can poll GET /v1/files/readings?file_id=<file-id>

Notes

  • This endpoint does not return the file_reading directly.
  • It only queues the processing event.
  • If the file has not been classified yet, you may need classification first before processing succeeds.
  • This endpoint can be safely treated as a retry operation for operational recovery.