---
title: "Prepare contribute-back: mint scoped git token + branch name"
method: POST
path: "/v1/cloud/apps/changes/prepare"
tags: ["v1", "Cloud Infrastructure"]
---

# Prepare contribute-back: mint scoped git token + branch name

`POST /v1/cloud/apps/changes/prepare`

## Request

- Base URL: `https://memory.papr.ai`
- URL: `https://memory.papr.ai/v1/cloud/apps/changes/prepare`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Request body

- AppChangeRequestPrepare
  - `external_user_id` string, nullable: Parse _User.objectId of the acting user (desktop OAuth). Used for ownership-scoped cloud operations instead of the API key user.
  - `lineageId` string, required
  - `sourceNamespaceId` string, required
  - `sourceSlug` string, required
  - `installedAppId` string, required
  - `title` string, required
  - `description` string, required

## Response `200`

Successful Response

- AppChangeRequestPrepareResponse
  - `id` string, required
  - `sourceAppId` string, required
  - `sourceNamespaceId` string, required
  - `sourceSlug` string, required
  - `installedAppId` string, required
  - `contributorUserId` string, required
  - `title` string, required
  - `description` string, required
  - `status` 'preparing' | 'pending' | 'approved' | 'rejected' | 'superseded', required
  - `createdAt` string, required
  - `resolvedAt` string, nullable
  - `lineageId` string, nullable
  - `branch` string, required
  - `headSha` string, nullable
  - `prUrl` string, nullable
  - `prNumber` integer, nullable
  - `stagedPaths` string[], nullable
  - `mergeState` string, nullable
  - `mergeCheckedAt` string, nullable
  - `supersededBy` string, nullable
  - `mergedManually` boolean, nullable
  - `mergedCommitSha` string, nullable
  - `resolvedBy` string, nullable
  - `publishedDirectly` boolean, nullable
  - `databasePublished` boolean, nullable
  - `publishNote` string, nullable
  - `cloneUrl` string, required
  - `token` string, required
  - `expiresAt` string, required
  - `repoPath` string, required
  - `targetAppId` string, required
  - `githubOrg` string, required
  - `repoName` string, required

## 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/changes/prepare/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)
