---
title: "Create worker"
method: POST
path: "/hosting/workers"
tags: ["Hosting - Workers"]
---

# Create worker

`POST /hosting/workers`

Create a new hosted worker

## Request body

- object — Request body schema.
  - `name` string, required — Worker name.
  - `slug` string, required — Worker URL slug.
  - `folderUuid` string, uuid — Folder identifier for the worker.
  - `description` string — Worker description.
  - `triggers` object[] — Cron triggers for the worker. Each trigger calls the worker's URL at the given path on the schedule.
    - `type` 'cron', required
    - `name` string, required
    - `description` string
    - `cron` string, required
    - `path` string, required
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', required
    - `data` object
    - `headers` object

## Response `200`

Successful response

- object
  - `worker` object, required — Created worker details.
    - `uuid` string, uuid, required
    - `workspaceUuid` string, uuid, required
    - `name` string, required
    - `description` string, nullable, required
    - `slug` string, required
    - `url` string, required
    - `userUuid` string, uuid, required
    - `folderUuid` string, uuid, nullable, required
    - `promotedDeployment` object, nullable, required
      - `uuid` string, uuid, required
      - `workspaceUuid` string, uuid, required
      - `sourceS3Path` string, required
      - `bundleS3Path` string, nullable, required
      - `status` 'pending' | 'building' | 'success' | 'error' | 'cancelled', required
      - `buildLogS3Filename` string, nullable, required
      - `errorMessage` string, nullable, required
      - `url` string, required
      - `userUuid` string, uuid, required
      - `promotedAt` string, nullable, required
      - `promotedByUserUuid` string, uuid, nullable, required
      - `finishedAt` string, nullable, required
      - `temporalWorkflowId` string, uuid, required
      - `createdAt` string, required
      - `updatedAt` string, required
      - `kind` 'worker', required
      - `workerUuid` string, uuid, required
      - `meta` object, required
        - `bundleSha256` string, required
        - `outboundAllowlist` string[], required
        - `kind` 'custom-integration'
    - `triggers` object[], required
      - `type` 'cron', required
      - `name` string, required
      - `description` string
      - `cron` string, required
      - `path` string, required
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', required
      - `data` object
      - `headers` object
      - `temporalScheduleWorkflowId` string, required
    - `chargedUntil` string, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `deletedAt` string, nullable, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/getcargo/apis/cargo-api.md) · [All operations](https://skmtc.net/getcargo/apis/cargo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getcargo/cargo-api/versions/1d5a19e01d83/schema)
