Skip to content
Get started

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 ParametersExpand Collapse
workerId: string
Body ParametersJSONExpand Collapse
instructions: optional string

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

maxLength20000
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.

maxLength80
title: optional string

New display name for the worker.

minLength1
maxLength200
visibility: optional "public" or "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 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"
One of the following:
"public"
"private"

Update a worker template

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\"
        }"
{
  "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"
}