---
title: "Update a project for a workspace"
method: PUT
path: "/workspaces/{workspace}/projects/{project_key}"
tags: ["Projects"]
---

# Update a project for a workspace

`PUT /workspaces/{workspace}/projects/{project_key}`

Since this endpoint can be used to both update and to create a
project, the request body depends on the intent.

#### Creation

See the POST documentation for the project collection for an
example of the request body.

Note: The `key` should not be specified in the body of request
(since it is already present in the URL). The `name` is required,
everything else is optional.

#### Update

See the POST documentation for the project collection for an
example of the request body.

Note: The key is not required in the body (since it is already in
the URL). The key may be specified in the body, if the intent is
to change the key itself. In such a scenario, the location of the
project is changed and is returned in the `Location` header of the
response.

## Request body

- Project — A Bitbucket project. Projects are used by teams to organize repositories.
  - `type` string, required
  - `links` object
    - `html` object — A link to a resource related to this object.
      - `href` string, uri
      - `name` string
    - `avatar` object — A link to a resource related to this object.
      - `href` string, uri
      - `name` string
  - `uuid` string — The project's immutable id.
  - `key` string — The project's key.
  - `owner` Team — A team object.
    - `type` string, required
    - `links` object — Links related to a Team.
      - `avatar` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `self` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `html` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `members` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `projects` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `repositories` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
    - `created_on` string, date-time
    - `display_name` string
    - `uuid` string
  - `name` string — The name of the project.
  - `description` string
  - `is_private` boolean — Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
  - `created_on` string, date-time
  - `updated_on` string, date-time
  - `has_publicly_visible_repos` boolean — Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.

## Response `200`

The existing project is has been updated.

- Project — A Bitbucket project. Projects are used by teams to organize repositories.
  - `type` string, required
  - `links` object
    - `html` object — A link to a resource related to this object.
      - `href` string, uri
      - `name` string
    - `avatar` object — A link to a resource related to this object.
      - `href` string, uri
      - `name` string
  - `uuid` string — The project's immutable id.
  - `key` string — The project's key.
  - `owner` Team — A team object.
    - `type` string, required
    - `links` object — Links related to a Team.
      - `avatar` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `self` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `html` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `members` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `projects` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
      - `repositories` Link — A link to a resource related to this object.
        - `href` string, uri
        - `name` string
    - `created_on` string, date-time
    - `display_name` string
    - `uuid` string
  - `name` string — The name of the project.
  - `description` string
  - `is_private` boolean — Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
  - `created_on` string, date-time
  - `updated_on` string, date-time
  - `has_publicly_visible_repos` boolean — Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.

## Other responses

- `201` — A new project has been created.
- `403` — The requesting user isn't authorized to update or create the project.
- `404` — A workspace doesn't exist at the location. Note that the project's absence from this location doesn't raise a 404, since a PUT at a non-existent location can be used to create a new project.

---

[API](https://skmtc.net/bitbucket/apis/bitbucket-api.md) · [All operations](https://skmtc.net/bitbucket/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitbucket/bitbucket-api/versions/7e9be973015d/schema)
