Update Worker Task Input
Method: PUT
Endpoint: /api/v2/worker-tasks/{workerTaskId}/input
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”PUT
/api/v2/worker-tasks/{workerTaskId}/inputUpdate worker task inputAuthenticationRequired
Stored only in this browser tab. Sent only to https://openapi.coreclaw.com.
Parameters
Required
Saved Worker task template slug. Get it from the `data.list[].slug` field of `GET /api/v2/worker-tasks`. The playground prefills a sample slug; replace it with your own.
Request BodyRequiredapplication/json
FieldTypeRequiredDescription
inputanyRequiredWorker input payload. Put Worker form fields under `input.parameters.custom`. If left empty in the playground, it will try to load schema defaults before sending.versionstringOptionalOptional Worker version. Omit it unless you have confirmed a concrete available version for this Worker; not every Worker accepts `latest`.Request body (JSON)
When to use this endpoint
Section titled “When to use this endpoint”Use this endpoint to update the input parameters of a task template, optionally switching the Worker version.
Identifier Notes
Section titled “Identifier Notes”workerTaskIdis the saved task template slug.
Path Parameters
Section titled “Path Parameters”| Parameter | Required | Type | Description |
|---|---|---|---|
workerTaskId | Yes | string | Saved Worker task template slug. Get it from the data.list[].slug field of GET /api/v2/worker-tasks. |
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 |
|---|---|---|---|
input | Yes | any | Worker input payload. Worker form fields usually belong under input.parameters.custom; read the Worker input schema first and build this object from that schema. |
version | No | string | Optional Worker version. Omit it unless you have confirmed a concrete available version for this Worker; not every Worker accepts latest as an explicit version value. |
JSON Example
Section titled “JSON Example”{ "input": { "parameters": { "custom": { "keywords": [ "coffee" ], "base_location": "New York,USA", "max_results": 1 } } }}Request Example
Section titled “Request Example”curl -X PUT "https://openapi.coreclaw.com/api/v2/worker-tasks/YOUR_WORKER_TASK_ID/input" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data '{"input":{"parameters":{"custom":{"keywords":["coffee"],"base_location":"New York,USA","max_results":1}}}}'Response Example
Section titled “Response Example”{ "code": 0, "message": "success", "request_id": "req-123"}- API v2 supports Bearer token, the legacy
api-keyheader, and query token. Prefer Bearer token for new integrations. - Build
inputfrom the target Worker input schema; form fields belong underinput.parameters.custom. versionis optional and keeps the current version when omitted; pass a concrete available version to switch.
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 |