clay routines runs get to fetch status and results.
--input or --bulk is required.
Arguments
| Argument | Description |
|---|---|
routineId | Routine id, e.g. function:t_abc123. Required. |
Flags
| Flag | Description |
|---|---|
--input <json|file|-> | Run body as a JSON object matching { "items": [{ "id": <string>, "inputs": <object> }] }. Pass inline JSON, a file path, or - for stdin. items accepts 1 to 100 entries; use --bulk for larger batches. |
--bulk <file.jsonl> | JSONL file for a batch run. Each line is { "id": <string>, "inputs": <object> }. The file is uploaded to Clay before the run is started. |
--webhook-id <id> | Registered webhook id to notify when the run finishes. See clay webhooks. |
Output
Inline run:| Field | Type | Description |
|---|---|---|
routineRunId | string | Pass to clay routines runs get. |
mode | "inline" | "bulk" | Which mode was used. |
status | "in_progress" | Always "in_progress" at start. |
fileId | string (bulk only) | Id of the uploaded JSONL file. |
Errors
| Code | Exit | Notes |
|---|---|---|
validation_error | 2 | Missing or conflicting input flags, unreadable file, invalid JSON body, or a JSONL row that fails the { "id": <string>, "inputs": <object> } shape (error names the line). |
not_found | 6 | No routine with that id, or the routine is not enabled for API & CLI. |
auth_forbidden | 3 | The API key lacks access to run this routine through API & CLI. |
server_error | 1 | Bulk input upload to storage failed. Safe to retry the command. |

