---
title: "Acquire distributed writer lease for app-repo-writer git ops"
method: POST
path: "/v1/cloud/apps/{app_id}/writer-lease/acquire"
tags: ["v1", "Cloud Infrastructure"]
---

# Acquire distributed writer lease for app-repo-writer git ops

`POST /v1/cloud/apps/{app_id}/writer-lease/acquire`

## Request

- Base URL: `https://memory.papr.ai`
- URL: `https://memory.papr.ai/v1/cloud/apps/{app_id}/writer-lease/acquire`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Path parameters

- `app_id` string, required

## Query parameters

- `external_user_id` string, nullable

## Request body

- AppRepoWriterLeaseAcquireRequest
  - `holder` string, required: Writer instance id, e.g. writer:cloud-run-abc or writer:hostname

## Response `200`

Successful Response

- AppRepoWriterLeaseAcquireResponse
  - `acquired` boolean, required
  - `token` string, nullable
  - `holder` string, nullable
  - `expiresAt` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `0e7a5c0d125d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/papr-ai/apis/papr-memory-api/changes/v1/cloud/apps/:app_id/writer-lease/acquire/post.md)

---

[API](https://skmtc.dev/papr-ai/apis/papr-memory-api.md) - [All operations](https://skmtc.dev/papr-ai/apis/papr-memory-api/llms.txt) - [OpenAPI document](https://skmtc.dev/papr-ai/apis/papr-memory-api/revisions/6fc381dc78b3?raw)
