/v1/api/actionsAPI keyPay-as-you-goRegister one uploaded file
Register a single content-addressed file you already pushed to storage, in one dispatch.
The one-call sibling of the register route below: same content addressing, same queue, one dispatch. Reach for the REST register when you are driving the chunk-diff flow yourself.
Dispatched as `{"action": "file_upload", "input": {...}}`.
Body
| Field | Type | Required | Description |
|---|---|---|---|
| action | string | required | Must be `"file_upload"`. |
| input.fileId | string | required | Content-derived id of the whole file (43 base62 chars). |
| input.name | string | required | The file's display name. |
| input.ext | string | optional | Lowercased extension or mime subtype (e.g. txt, md, pdf). |
| input.fileType | string | optional | Mime content type stamped on the chunk blob. |
| input.fileSize | number | optional | Total byte size of the file. |
| input.filepath | string | optional | Folder the file lands in within the project — a client value; the server resolves the session project and overrides the destination, so a forged path lands in the session root. |
| input.chunkIds | string[] | required | Ordered chunk ids whose bytes reassemble the file. |
| input.chunking | string | optional | Chunking mode: 'sections' | 'bytes' | '' for a single chunk. |
curl -X POST "https://runlogai.com/runlogapi/api/actions" \
-H "Authorization: Bearer $RUNLOG_API_KEY" \
-H "X-Project-Id: p7Kd2mQx" \
-H "Content-Type: application/json" \
-d '{
"action": "file_upload",
"input": {
"chunkIds": [
"4mHqZ1nR8vTbC0sWyLpAeGkJ3dXfU6iO2rN"
],
"ext": "swift",
"fileId": "4mHqZ1nR8vTbC0sWyLpAeGkJ3dXfU6iO2rN",
"name": "Router.swift"
}
}'{
"action": "file_upload",
"result": {
"fileId": "4mHqZ1nR8vTbC0sWyLpAeGkJ3dXfU6iO2rN",
"status": "queued"
}
}Errors
| Status | error | When |
|---|---|---|
| 400 | fileId, name and chunkIds are required | A required field was absent. |
| 403 | action not available to an API key | The key's tier does not reach this action. |
| 400 | invalid request body | The body is not JSON, or exceeds the 1 MB request-body cap. |
| 401 | invalid API key | The `Authorization` header is missing, malformed, or names a revoked key. |
| 400 | name the target project via the X-Project-Id header or projectId query | No project was named and the key is not bound to one. |
| 429 | rate limit exceeded | You passed 60 requests/minute on this key. `Retry-After` carries the seconds to wait. |
| 500 | internal error | The service failed to serve the request. Retry with backoff; the cause is logged server-side against your request. |