# Create new repo with API from template

**URL:** <https://forum.gitea.com/t/create-new-repo-with-api-from-template/1982>\
**Category:** API/SDK/Tea/HelmChart/Terraform\
**Created:** [March 6, 2020, 5:24pm UTC](https://forum.gitea.com/t/create-new-repo-with-api-from-template/1982 "2020-03-06T17:24:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yee379](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/yee379/32/814_2.png) [@yee379](https://forum.gitea.com/u/yee379)\
**Post date:** [March 6, 2020, 5:24pm UTC](https://forum.gitea.com/t/create-new-repo-with-api-from-template/1982/1 "2020-03-06T17:24:33Z")

</div>

Hi, how do i create a new repo (via curl preferably) using a ‘Template’ and for it to also include ‘Git Content (Default Branch)’?

my first attempt with

```
curl -X POST "https://my-gitea-server/api/v1/user/repos?access_token=$TOKEN" -H "accept: application/json" -H "content-type: application/json" -d "{\"name\":\"test\", \"template\":\"me/my_template\" }"

```

only created a new empty repo called ‘test’.

cheers,

Yee.

---

<div class="post-metadata">

**Author:** ![jolheiser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/jolheiser/32/4807_2.png) [@jolheiser](https://forum.gitea.com/u/jolheiser)\
**Post date:** [March 6, 2020, 6:22pm UTC](https://forum.gitea.com/t/create-new-repo-with-api-from-template/1982/2 "2020-03-06T18:22:15Z")

</div>

Generating from a template is not currently supported by the API unfortunately. 🙁

I have added it to the list at [https://github.com/go-gitea/gitea/issues/9126](https://github.com/go-gitea/gitea/issues/9126)

---

<div class="post-metadata">

**Author:** ![yee379](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/yee379/32/814_2.png) [@yee379](https://forum.gitea.com/u/yee379)\
**Post date:** [March 6, 2020, 7:37pm UTC](https://forum.gitea.com/t/create-new-repo-with-api-from-template/1982/3 "2020-03-06T19:37:37Z")

</div>

ah… that would explain it! thanks… can’t wait for this feature 🙂
