---
title: "POST /v1/projects/{projectOrProductUID}/jobs"
method: POST
path: "/v1/projects/{projectOrProductUID}/jobs"
tags: ["jobs"]
---

# POST /v1/projects/{projectOrProductUID}/jobs

`POST /v1/projects/{projectOrProductUID}/jobs`

Create a new batch job with an optional name

## Path parameters

- `projectOrProductUID` string, required

## Query parameters

- `name` string, required

## Request body

- JobDefinition — Batch job definition
  - `comment` string — Human-readable description of the job
  - `default_requests` BatchJobRequests — Operations to apply to a device
    - `comment` string
    - `connectivity_assurance_disable` boolean — Disable connectivity assurance for the device
    - `connectivity_assurance_enable` boolean — Enable connectivity assurance for the device
    - `disable` boolean — Disable the device
    - `enable` boolean — Enable the device
    - `fleets_to_default` string[] — Fleet UIDs to assign to the device if it has no fleets
    - `fleets_to_join` string[] — Fleet UIDs to add the device to
    - `fleets_to_leave` string[] — Fleet UIDs to remove the device from
    - `provision_product` string — Product UID to provision the device with if not already provisioned
    - `sn_to_default` string — Set the device serial number only if not already set
    - `sn_to_set` string — Set the device serial number ("-" to clear)
    - `vars_to_default` object — Environment variables to set only if not already set
    - `vars_to_set` object — Environment variables to set (use "-" as value to clear)
  - `device_requests` object — Device-specific request overrides, keyed by device UID
  - `report_options` object — Controls what data is included in the job report
    - `app_fleets` boolean — Include project fleets in the report
    - `app_info` boolean — Include project info in the report
    - `app_vars` boolean — Include project environment variables in the report
    - `comment` string
    - `device_activity` boolean — Include device activity data in the report
    - `device_health` boolean — Include device health data in the report
    - `device_info` boolean — Include device info in the report
    - `device_vars` boolean — Include device environment variables in the report
  - `select` object — Device selection criteria
    - `all_devices` boolean — Select all devices in the project
    - `comment` string
    - `devices` string[] — Specific device UIDs to include
    - `devices_by_sn` string[] — Serial number patterns to match (supports glob wildcards *, ?, [...])
    - `devices_in_fleets` string[] — Fleet UIDs whose devices should be included

## Response `201`

Job created successfully

- object
  - `job_uid` string, required — The unique identifier for the created job

## Other responses

- `400` — Missing required name parameter or invalid job definition
- `default` — The response body in case of an API error.

---

[API](https://skmtc.net/notefile/apis/notehub-api.md) · [All operations](https://skmtc.net/notefile/apis/notehub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/notefile/notehub-api/versions/9c5b2b63a991/schema)
