Delete a worker template
client.Workers.Delete(ctx, workerID) (*DeleteWorkerResponse, error)
DELETE/api/workers/{workerId}
Soft-delete a worker template so it no longer appears in list or retrieve endpoints. Tasks, turns, files, schedules, and integrations remain in the database for analytics. Only the worker creator can delete a worker.
Delete a worker template
package main
import (
"context"
"fmt"
"github.com/ramensoft/handinger-go"
"github.com/ramensoft/handinger-go/option"
)
func main() {
client := handinger.NewClient(
option.WithAPIKey("My API Key"),
)
deleteWorkerResponse, err := client.Workers.Delete(context.TODO(), "t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", deleteWorkerResponse.Deleted)
}
{
"deleted": true
}Returns Examples
{
"deleted": true
}