Rerun Worker Run
Method: POST
Endpoint: /api/v2/worker-runs/{runId}/rerun
Authentication: Supports Authorization: Bearer <YOUR_API_KEY>, api-key: <YOUR_API_KEY>, and ?token=<YOUR_API_KEY>. Prefer Bearer token.
Try it
Section titled “Try it”POST
/api/v2/worker-runs/{runId}/rerunRerun worker runAuthenticationRequired
Stored only in this browser tab. Sent only to https://openapi.coreclaw.com.
Parameters
Required
Run slug returned as `data.run_slug` from start or rerun responses.
Request BodyRequiredapplication/json
FieldTypeRequiredDescription
callback_urlstringOptionalCallback URL. When provided, CoreClaw sends a POST request after the run status changes or finishes.is_asyncbooleanOptional`true` submits asynchronously and does not wait for execution results; `false` waits for the run to finish. Defaults to `true`.limitintegerOptionalResult limit for synchronous rerun. Constraints: default `20`; range 1-100.offsetintegerOptionalResult offset for synchronous rerun. Constraints: default `0`; minimum 0.Request body (JSON)
When to use this endpoint
Section titled “When to use this endpoint”Use this endpoint to create a new run from an existing run. The response returns a new run_slug.
Identifier Notes
Section titled “Identifier Notes”runIdis the run slug. Usedata.run_slugfrom start or rerun responses as therunId.
Path Parameters
Section titled “Path Parameters”| Parameter | Required | Type | Description |
|---|---|---|---|
runId | Yes | string | Run slug returned as data.run_slug from start or rerun responses. |
Request Body
Section titled “Request Body”Send the request body with Content-Type: application/json. Required/Optional describes each field; the Try it Request Body badge shows whether the body itself is required.
| Field | Required | Type | Description |
|---|---|---|---|
callback_url | No | string | Callback URL. When provided, CoreClaw sends a POST request after the run status changes or finishes. |
is_async | No | boolean | true submits asynchronously without waiting for results; false waits for the run to finish. Defaults to true. |
limit | No | integer | Synchronous result window size for runs or reruns. It only controls how many result rows are included in the synchronous response, not the full result set. Constraints: default 20; range 1-100. |
offset | No | integer | Zero-based offset for the synchronous result window returned by runs or reruns. Constraints: default 0; minimum 0. |
JSON Example
Section titled “JSON Example”{ "callback_url": "https://client.example.com/openapi/callback", "is_async": true, "limit": 20, "offset": 0}Run Mode
Section titled “Run Mode”is_async: truesubmits the run asynchronously and returns without waiting for execution results. The response includesdata.run_slug; then poll the run detail, log, and result endpoints.is_async: falsewaits for the run to finish, equivalent to run-and-wait behavior. Useoffset/limitto control the result window returned by the synchronous run.
Request Example
Section titled “Request Example”curl -X POST "https://openapi.coreclaw.com/api/v2/worker-runs/YOUR_RUN_ID/rerun" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data '{"callback_url":"https://client.example.com/openapi/callback","is_async":true,"limit":20,"offset":0}'Response Example
Section titled “Response Example”{ "code": 0, "data": { "run_slug": "01KKDXV2G26BT7NH4ZQR2R4NPZ" }, "message": "success", "request_id": "req-123"}- API v2 supports Bearer token, the legacy
api-keyheader, and query token. Prefer Bearer token for new integrations. - When
callback_urlis provided, CoreClaw sends callback notifications after status changes or completion. See Callback Notifications.
HTTP Responses
Section titled “HTTP Responses”| HTTP Status | Application Code | Meaning |
|---|---|---|
200 | 0 | OK |
400 | 11000 | Bad Request |
401 | 12001 | Unauthorized |
404 | 11004 | Not Found |
422 | 11000 | Unprocessable Entity |
429 | 13000 | Too Many Requests |
500 | 10000 | Internal Server Error |