---
title: "Create or verify workspace repo"
method: POST
path: "/v1/cloud/repos/init"
tags: ["v1", "Cloud Infrastructure"]
---

# Create or verify workspace repo

`POST /v1/cloud/repos/init`

## Request

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

## Request body

- RepoInitRequest
  - `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.
  - `scope` 'user' | 'namespace' | 'org' | 'all': Three-level ACL scope matching the memory ACL model.
  - `namespace_id` string, nullable: Override namespace (org-scoped keys only)
  - `template` string: Repo template to apply on first creation

## Response `200`

Successful Response

- RepoInitResponse
  - `repoUrl` string, required
  - `created` boolean, required
  - `defaultBranch` string

## 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/repos/init/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)
