---
title: "Create a batch update"
method: POST
path: "/api/v1alpha/batches/{batch_id}/updates/create"
tags: ["Batches API v1Alpha"]
---

# Create a batch update

`POST /api/v1alpha/batches/{batch_id}/updates/create`

Create a batch update.

## Path parameters

- `batch_id` number, required

## Request body

- BatchUpdateRequest
  - `update_token` string, required — Token to identify this update
  - `job_specs` CreateJobRequest[] — List of job specifications to add
    - `job_spec` object, required
      - `command` string[], required — Command to execute
      - `env` object — Environment variables
      - `port` integer — Port to expose
      - `resources` object
        - `cpu` string
        - `memory` string
        - `storage` string
      - `service_account` object
        - `namespace` string
        - `name` string
      - `timeout` integer — Job timeout in seconds
      - `attributes` object — Job attributes
      - `callback` string — Callback URL
  - `job_groups` JobGroupSpec[] — List of job groups to add
    - `attributes` object, required — Key-value pairs of attributes for the job group
    - `cancel_after_n_failures` integer — Optional number of failures after which to cancel the job group
    - `callback` string — Optional callback URL to notify when job group completes

## Response `200`

Successfully created the batch update.

- BatchUpdateResponse
  - `update_id` integer — ID of the created update
  - `token` string — Token associated with the update

---

[API](https://skmtc.net/hail-is/apis/hail-services.md) · [All operations](https://skmtc.net/hail-is/apis/hail-services/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hail-is/hail-services/versions/3bd6e13adfa6/schema)
