---
title: "Updates a project-level repository template."
method: PUT
path: "/projects/{projectKey}/project-templates"
tags: ["Project templates"]
---

# Updates a project-level repository template.

`PUT /projects/{projectKey}/project-templates`

## Path parameters

- `projectKey` string, required

## Request body

- ProjectTemplate
  - `defaultTemplate` boolean — is default template
  - `description` string — the description of the project-level template
  - `id` integer — the ID of the project-level template configuration
  - `logoData` string — the base64-encoded image logo
  - `repos` object[] — the list of repositories that should be assigned to this template; just pass a list of repository ID's, e.g., [ { "id" : 1 }, { "id" : 2 } ]. You should leave this empty for DELETE.
  - `template` RestRepositoryRef — 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 `200`

Project-level repository templates updated

- ProjectTemplate
  - `defaultTemplate` boolean — is default template
  - `description` string — the description of the project-level template
  - `id` integer — the ID of the project-level template configuration
  - `logoData` string — the base64-encoded image logo
  - `repos` object[] — the list of repositories that should be assigned to this template; just pass a list of repository ID's, e.g., [ { "id" : 1 }, { "id" : 2 } ]. You should leave this empty for DELETE.
  - `template` RestRepositoryRef — 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

## Other responses

- `400` — Invalid input parameters like a non-existing template
- `401` — The currently authenticated user does not have PROJECT_ADMIN credentials

---

[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)
