## Regenerate a worker webhook token `workers.webhooks.regenerate_token(worker_id) -> Webhook` **post** `/api/workers/{workerId}/webhook/regenerate-token` Issue a new shared token for the webhook, invalidating the previous one. The webhook URL is preserved. Only the worker creator can regenerate the token. ### Parameters - `worker_id: String` ### Returns - `class Webhook` - `token: String` Shared secret sent in the `X-Handinger-Token` header on each delivery. `null` when no webhook is configured. - `url: String` HTTPS endpoint that receives webhook deliveries when a task completes. `null` when no webhook is configured. ### Example ```ruby require "handinger" handinger = Handinger::Client.new(api_key: "My API Key") webhook = handinger.workers.webhooks.regenerate_token("t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM") puts(webhook) ``` #### Response ```json { "token": "whk_01HZY31W2SZJ8MJ2FQTR3M1K9D", "url": "https://example.com/handinger-webhook" } ```