## Update a worker template **patch** `/api/workers/{workerId}` Update a worker's instructions, title, summary, visibility, or output schema. Only the fields you send are changed; omitted fields keep their current values. Only the worker creator can update a worker. ### Path Parameters - `workerId: string` ### Body Parameters - `instructions: optional string` Replaces the persistent system prompt. Subsequent tasks pick up the new instructions immediately; in-flight tasks keep using the previous version. - `outputSchema: optional map[unknown]` Replace the worker's structured output schema. Pass `null` to clear it and return to free-form text responses. - `summary: optional string` Replaces the worker's short one-line summary. - `title: optional string` New display name for the worker. - `visibility: optional "public" or "private"` Change visibility between `public` (any org member can run tasks) and `private` (only invited members). - `"public"` - `"private"` ### Returns - `WorkerTemplate object { id, createdAt, instructions, 8 more }` - `id: string` - `createdAt: string` - `instructions: string` - `organizationId: string` - `outputSchema: map[unknown]` - `summary: string` - `title: string` - `updatedAt: string` - `url: string` Web URL of the worker in the Handinger dashboard. - `userId: string` - `visibility: "public" or "private"` - `"public"` - `"private"` ### Example ```http curl https://handinger.com/api/workers/$WORKER_ID \ -X PATCH \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $HANDINGER_API_KEY" \ -d "{ \"instructions\": \"You are a brand voice analyzer. Read the input text and report whether it matches Acme's playful, plain-spoken house style. Quote specific phrases.\", \"outputSchema\": { \"type\": \"bar\", \"required\": \"bar\", \"properties\": \"bar\" }, \"summary\": \"Audits copy against the Acme brand voice guide.\", \"title\": \"Claim verdict v2\", \"visibility\": \"private\" }" ``` #### Response ```json { "id": "id", "createdAt": "createdAt", "instructions": "instructions", "organizationId": "organizationId", "outputSchema": { "foo": "bar" }, "summary": "summary", "title": "title", "updatedAt": "updatedAt", "url": "https://v3.handinger.com/worker/wrk_vk81XUHKHG-qr4", "userId": "userId", "visibility": "public" } ```