---
title: Create a managed repo from the platform template
description: Creates a private GitHub repo from the Wiblo template under the managed org, registers it in the workspace registry with the given display name, applies...
api_method: POST
api_path: "/v1/workspaces/{workspaceId}/repos"
canonical_url: https://wiblo.app/docs/developers/api/repos/create-workspace-repo
last_updated: 2026-07-28T17:31:44+02:00
md_url: https://wiblo.app/docs/developers/api/repos/create-workspace-repo.md
---

# Create a managed repo from the platform template

`POST /v1/workspaces/{workspaceId}/repos`

Creates a private GitHub repo from the Wiblo template under the managed org, registers it in the workspace registry with the given display name, applies default-branch protection (best-effort), and returns the row with its clone URL — immediately natively cloneable via the WIBLO-154 credential helper. The provider repo name stays an internal Wiblo handle; the display name is the only user input. Agents may call this with their run token (the self-service create lane). Per-user rate-limited at 10/60s in its own bucket (repo creation is expensive host-side).

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `display_name` | `string` | Yes |  |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/workspaces/{workspaceId}/repos \
  -X POST \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "display_name": "..."
}'
```

**TypeScript**

```ts
import { createSdk, createWorkspaceRepo } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await createWorkspaceRepo({
  client: sdk,
  path: { workspaceId: "..." },
  body: {
    "display_name": "..."
  },
})
```

## Responses

**`201`** — The repo was created and registered. Returns `WorkspaceRepoSummary`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes |  |
| `display_name` | `string` | Yes |  |
| `purpose` | `"site" \| "agent-base" \| "app" \| "other"` | Yes |  |
| `status` | `"provisioning" \| "ready" \| "failed" \| "archived"` | Yes |  |
| `default_branch` | `string` | Yes |  |
| `clone_url` | `string \| null` | Yes |  |
| `created_at` | `string` | Yes |  |
| `updated_at` | `string` | Yes |  |

**`401`** — No valid session, `wbl_*` bearer, or run token was present. Returns `ApiErrorEnvelope`.

**`404`** — Workspace not visible to the caller (`WORKSPACE_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`409`** — A live repo already uses this display name (`REPO_NAME_TAKEN`). Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.

**`502`** — The git control plane is not configured or the host refused the create (`UPSTREAM_UNAVAILABLE`). Returns `ApiErrorEnvelope`.
