Add a worker; it runs as the website's own identity, supervised, within its caps
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
/api/v1/tenants/{tid}/sites/{id}/workersAdd a worker; it runs as the website's own identity, supervised, within its caps
Authentication: session cookie __Host-panel_session (contract default; see Authentication).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
id | path | string | required | |
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Request body
required
Content type: application/json
namestring required- max length 80
kindstring requiredAllowed values:"laravel-queue""command"connectionstring requiredQueue connection, empty for the default
queuesarray<string> required- max items 10
triesinteger required- minimum 0
- maximum 100
timeoutinteger required- minimum 0
- maximum 3600
sleepinteger required- minimum 0
- maximum 60
backoffinteger required- minimum 0
- maximum 3600
max_jobsinteger required- minimum 0
max_timeinteger required- minimum 0
- maximum 86400
memory_mbinteger required- minimum 0
- maximum 4096
scriptstring optionalcommand: the file to run, relative to the release (an application) or the website's files (PHP: a .php file). Empty runs the application's own program with args.
argsarray<string> optional- max items 32
instancesinteger optional- minimum 1
- maximum 8
cpu_percentinteger optional0: the website's own cap
- minimum 0
- maximum 100
memory_mbinteger optionalPer process; 0: 512 MB or the website's cap if lower
- minimum 0
- maximum 65536
enabledboolean optional
Example
{
"name": "string",
"kind": "laravel-queue",
"laravel": {
"connection": "string",
"queues": [
"string"
],
"tries": 0,
"timeout": 0,
"sleep": 0,
"backoff": 0,
"max_jobs": 0,
"max_time": 0,
"memory_mb": 0
},
"script": "string",
"args": [
"string"
],
"instances": 1,
"cpu_percent": 0,
"memory_mb": 0,
"enabled": true
}Responses
201 Worker
Content type: application/json
idstring requiredsite_idstring requirednamestring requiredkindstring requiredAllowed values:"laravel-queue""command"Fields of WorkerLaravel are shown above.
scriptstring requiredargsarray<string> requiredinstancesinteger requiredcpu_percentinteger requiredmemory_mbinteger requiredenabledboolean requiredgenerationinteger requiredcreated_atstring (date-time) requiredupdated_atstring (date-time) required
Example
{
"id": "string",
"site_id": "string",
"name": "string",
"kind": "laravel-queue",
"laravel": {
"connection": "string",
"queues": [
"string"
],
"tries": 0,
"timeout": 0,
"sleep": 0,
"backoff": 0,
"max_jobs": 0,
"max_time": 0,
"memory_mb": 0
},
"script": "string",
"args": [
"string"
],
"instances": 0,
"cpu_percent": 0,
"memory_mb": 0,
"enabled": true,
"generation": 0,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
}default Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required