Update a worker webhook
workers.webhooks.update(strworker_id, WebhookUpdateParams**kwargs) -> Webhook
PUT/api/workers/{workerId}/webhook
Set or replace the webhook URL for a worker. A fresh token is generated the first time a URL is set; subsequent updates keep the existing token. Pass url: null to clear the webhook (use the dedicated DELETE for the same effect). Only the worker creator can update the webhook.
Update a worker webhook
import os
from handinger import Handinger
client = Handinger(
api_key=os.environ.get("HANDINGER_API_KEY"), # This is the default and can be omitted
)
webhook = client.workers.webhooks.update(
worker_id="t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM",
url="https://example.com/handinger-webhook",
)
print(webhook.token){
"token": "whk_01HZY31W2SZJ8MJ2FQTR3M1K9D",
"url": "https://example.com/handinger-webhook"
}Returns Examples
{
"token": "whk_01HZY31W2SZJ8MJ2FQTR3M1K9D",
"url": "https://example.com/handinger-webhook"
}