---
title: "Acquire a named job lock"
method: POST
path: "/jobLocks/{lock_name}"
tags: ["JobLock"]
---

# Acquire a named job lock

`POST /jobLocks/{lock_name}`

Acquire a named lock for a background job. A lock left without a heartbeat past its namespace's steal timeout may be taken over. The previous holder's progress is returned so the job can resume. Restricted to API keys with global write permission on the lock namespace's scope target.

## Path parameters

- `lock_name` string, required

## Response `200`

Lock acquired

- HeldJobLock — A named job lock held by the caller
  - `lock_name` string, required — Name of the lock
  - `lock_key` string, required — Key that renews or releases the lock while it is held
  - `acquired_time` integer, required — Epoch milliseconds when the lock was acquired
  - `last_updated` integer, required — Epoch milliseconds of the lock's last write, set by the server
  - `progress` string — Opaque progress last recorded on the lock, kept across holders

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Entity not found
- `409` — Conflicts with the current state of the resource
- `default` — Unknown error

## Changes

- **2026-10-07** `488eade0b398` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mabl/apis/mabl-api/changes/jobLocks/:lock_name/post.md)

---

[API](https://skmtc.dev/mabl/apis/mabl-api.md) · [All operations](https://skmtc.dev/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mabl/apis/mabl-api/revisions/488eade0b398?raw)
