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

# Create worker

`POST /v1/workers`

Creates a local worker or cloud worker for the active organization and returns the initial tokens needed to connect to it.

## Request body

- object
  - `name` string, required
  - `description` string
  - `destination` 'local' | 'cloud', required
  - `workspacePath` string
  - `sandboxBackend` string
  - `imageVersion` string

## Response `201`

Local worker created successfully.

- WorkerCreateResponse
  - `worker` Worker, required
    - `id` string, typeid, required — Den TypeID with 'wrk_' prefix and a 26-character base32 suffix.
    - `orgId` string, typeid, required — Den TypeID with 'org_' prefix and a 26-character base32 suffix.
    - `createdByUserId` string, typeid, nullable, required — Den TypeID with 'usr_' prefix and a 26-character base32 suffix.
    - `isMine` boolean, required
    - `name` string, required
    - `description` string, nullable, required
    - `destination` string, required
    - `status` string, required
    - `imageVersion` string, nullable, required
    - `workspacePath` string, nullable, required
    - `sandboxBackend` string, nullable, required
    - `lastHeartbeatAt` string, date-time, nullable, required
    - `lastActiveAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `tokens` object, required
    - `owner` string, required
    - `host` string, required
    - `client` string, required
  - `instance` WorkerInstance, nullable, required
    - `provider` string, required
    - `region` string, nullable, required
    - `url` string, nullable, required
    - `status` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `launch` object, required
    - `mode` string, required
    - `pollAfterMs` integer, required

## Other responses

- `202` — Cloud worker creation started successfully.
- `400` — The worker creation payload was invalid.
- `401` — The caller must be signed in to create workers.
- `402` — The caller needs an active cloud plan before launching a cloud worker.
- `409` — The organization has reached its worker limit.

---

[API](https://skmtc.net/openworklabs/apis/den-api.md) · [All operations](https://skmtc.net/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openworklabs/den-api/versions/073bc652adfb/schema)
