WWP Engine Docs
API ReferenceWorker

worker.start

POST
/worker/start

Authorization

ApiKeyAuth
x-api-key<token>

API key from /account/api-keys. Free tier: 100 req/hr. Pro tier: 1000 req/hr.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://gmp.ffstudios.io/api/rpc/api-reference/worker/start" \  -H "Content-Type: application/json" \  -d '{    "clientId": "string"  }'
{
  "message": "string",
  "socketId": "string"
}

Notes

Proxies to apps/server: POST /api/worker/start. apps/server flips clients.worker_desired_state to "running" once PM2 reports success, so the worker is restored idempotently on container reboot.

If a worker is already running and connected, the response includes the live socketId.

After starting, poll server.qr to retrieve the pairing QR code. The worker initially writes a sentinel value to Redis until Baileys produces the real QR string.

oRPC client example

import { orpc } from "@/utils/orpc";
import { useMutation } from "@tanstack/react-query";

const start = useMutation(orpc.worker.start.mutationOptions());
start.mutate({ clientId: "my-client" });