POST
/v1/api/actionsAPI keyIngest a document by reference
Point the relay at a URL or file reference; it pulls the document into the project's corpus.
Dispatch only starts the ingestion: the source ingests on a detached task the response names, so poll that task — or watch the file stream — rather than treating the dispatch as a completed ingest.
Dispatched as `{"action": "document_ingest", "input": {"source": "..."}}`.
Body
| Field | Type | Required | Description |
|---|---|---|---|
| action | string | required | Must be `"document_ingest"`. |
| input.source | string | required | Document url or file reference to ingest. |
Request · curl
curl -X POST "https://runlog-7613480744.us-central1.run.app/v1/api/actions" \
-H "Authorization: Bearer $RUNLOG_API_KEY" \
-H "X-Project-Id: p7Kd2mQx" \
-H "Content-Type: application/json" \
-d '{
"action": "document_ingest",
"input": {
"source": "https://example.com/spec/envelope.pdf"
}
}'Response · 200
{
"action": "document_ingest",
"result": {
"status": "running",
"taskId": "tk_2Xm9Qd"
}
}Errors
| Status | error | When |
|---|---|---|
| 400 | source is required | The input named nothing to ingest. |
| 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 relay failed to serve the request. Retry with backoff; the cause is logged server-side against your request. |