---
title: "Acquire a lock or semaphore permit (1 operation)"
method: POST
path: "/v1/coord/lock/{name}"
---

# Acquire a lock or semaphore permit (1 operation)

`POST /v1/coord/lock/{name}`

## Request

- Base URL: `https://soren.com`
- URL: `https://soren.com/v1/coord/lock/{name}`
- Auth: none declared. Required headers: `Authorization`

limit=1 is a mutex; limit>1 is a semaphore. Returns a strictly increasing fence. IMPORTANT: a TTL lock alone does NOT give mutual exclusion — a holder stalled past its TTL wakes still believing it holds the lock while another agent has legitimately taken it. Carry the fence into the resource you are protecting and reject lower values, or what you have is an advisory lock. A blocked acquire still costs an operation and returns retry_after; you are never charged when Soren itself fails. Re-acquiring as the same holder extends the permit rather than consuming a second one.

## Path parameters

- `name` string, required

## Query parameters

- `ns` string
- `holder` string, required
- `ttl` integer
- `limit` integer

## Headers

- `Authorization` string, required

## Response `200`

Result.

- object

## Other responses

- `400`: Missing holder or name.
- `401`: No valid session token.
- `402`: Payment required, or the session budget is exhausted.
- `503`: Coordination object unreachable. No operation charged.

---

[API](https://skmtc.dev/soren/apis/soren-free-games-api.md) · [All operations](https://skmtc.dev/soren/apis/soren-free-games-api/llms.txt) · [OpenAPI document](https://skmtc.dev/soren/apis/soren-free-games-api/revisions/00402cfcf30d?raw)
