---
title: "Creates a repository from a template. Only available since app version 3.4.0."
method: POST
path: "/projects/{projectKey}/repo-template"
tags: ["Create repository"]
---

# Creates a repository from a template. Only available since app version 3.4.0.

`POST /projects/{projectKey}/repo-template`

## Path parameters

- `projectKey` string, required

## Request body

- RepoCreateInfo
  - `repoName` string, required — the name of the to be created repository from the given template
  - `template` RestRepositoryRef, required — the template repository; just pass its repository ID, e.g., { "id" : 1 } OR project key and repository slug, e.g. { "project" : { "key" : "PROJECT_1" }, "slug" : "rep_1" }
    - `id` integer
    - `project` ProjectRef
      - `key` string
    - `slug` string

## Response `202`

Repository from template creation triggered

## Other responses

- `400` — The given repository template or the new repository parameters are invalid
- `401` — The currently authenticated user does not have PROJECT_ADMIN credentials
- `404` — The project does not exist

---

[API](https://skmtc.net/mibexsoftware/apis/repository-templates-for-bitbucket-rest-api.md) · [All operations](https://skmtc.net/mibexsoftware/apis/repository-templates-for-bitbucket-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mibexsoftware/repository-templates-for-bitbucket-rest-api/versions/34d717f7cf3a/schema)
