File received
SSE event emitted when agrirouter has finished reassembling a chunked payload
event: FILE_RECEIVEDEmitted when agrirouter has finished reassembling a chunked payload (TaskData, Shape, PDF, image, video). The gateway hides individual chunks from partners, so only one FILE_RECEIVED event fires per complete payload. The frame arrives on the GET /events SSE stream.
Data fields
| Field | Type | Required | Description |
|---|---|---|---|
event_type | string (FILE_RECEIVED) | yes | Discriminator; matches the event: line. |
receiving_endpoint_id | UUID | yes | agrirouter-internal ID of the receiving endpoint. |
message_type | string | yes | Technical message type of the reassembled payload. |
size | integer (bytes) | yes | Total size of the reassembled payload. |
message_ids | array of UUIDs | yes | agrirouter message IDs of every chunk that carried the payload. All of these must be confirmed via POST /confirmations to acknowledge the file — see Confirming the file. |
payload | string (base64) | no | Inline payload. Mutually exclusive with payload_uri. |
payload_uri | URI | no | Pre-signed URL to download the reassembled payload. Mutually exclusive with payload. Expires after at most 15 minutes. |
filename | string | no | Optional filename metadata supplied by the sender. |
tenant_id | string | no | Tenant that owns the receiving endpoint. |
teamset_context_id | string | no | Teamset context ID the sender attached, if any. |
payload_uri expires after at most 15 minutes. Download the file before the link expires. If it does expire, reconnect to the SSE stream so the event is replayed with a fresh URL.
Confirming the file
A FILE_RECEIVED event represents a single logical file, but on the wire it may be a concatenation of several chunks the sender produced — for example when the original payload exceeded agrirouter's per-message size limit and was split, or when the sender intentionally streamed the file in pieces. Each chunk has its own agrirouter message ID, and all of those IDs are listed in message_ids.
To acknowledge the file, your application must confirm every message ID in message_ids via POST /confirmations, each paired with the same receiving_endpoint_id. The confirmations may be sent in a single request or split across several — agrirouter only considers the file fully confirmed once all chunk IDs have been confirmed for the receiving endpoint.
Sample frame
event: FILE_RECEIVED
data: {"event_type":"FILE_RECEIVED","receiving_endpoint_id":"9f8e7d6c-5b4a-3210-fedc-ba0987654321","message_type":"iso:11783:-10:taskdata:zip","size":12582912,"message_ids":["a1b2c3d4-e5f6-4789-abcd-ef0123456789","b2c3d4e5-f6a7-4890-bcde-f01234567890"],"payload_uri":"https://api.agrirouter.com/payloads/a1b2c3d4-e5f6-4789-abcd-ef0123456789/2026-03-20T10:31:15Z","filename":"field-42-task.zip"}