Skip to content
Get started

Update a worker template

client.workers.update(stringworkerID, WorkerUpdateParams { instructions, outputSchema, summary, 2 more } body, RequestOptionsoptions?): WorkerTemplate { id, createdAt, instructions, 8 more }
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.

ParametersExpand Collapse
workerID: string
body: WorkerUpdateParams { instructions, outputSchema, summary, 2 more }
instructions?: string

Replaces the persistent system prompt. Subsequent tasks pick up the new instructions immediately; in-flight tasks keep using the previous version.

maxLength20000
outputSchema?: Record<string, unknown> | null

Replace the worker’s structured output schema. Pass null to clear it and return to free-form text responses.

summary?: string

Replaces the worker’s short one-line summary.

maxLength80
title?: string

New display name for the worker.

minLength1
maxLength200
visibility?: "public" | "private"

Change visibility between public (any org member can run tasks) and private (only invited members).

One of the following:
"public"
"private"
ReturnsExpand Collapse
WorkerTemplate { id, createdAt, instructions, 8 more }
id: string
createdAt: string | null
instructions: string
organizationId: string
outputSchema: Record<string, unknown> | null
summary: string
title: string
updatedAt: string | null
url: string

Web URL of the worker in the Handinger dashboard.

userId: string
visibility: "public" | "private"
One of the following:
"public"
"private"

Update a worker template

import Handinger from '@ramensoft/handinger';

const client = new Handinger({
  apiKey: process.env['HANDINGER_API_KEY'], // This is the default and can be omitted
});

const workerTemplate = await client.workers.update('t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM', {
  title: 'Claim verdict v2',
});

console.log(workerTemplate.id);
{
  "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"
}
Returns Examples
{
  "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"
}