Skip to content

Create a project in a workspace

POST
/workspaces/{workspace}/projects

Creates a new project.

Note that the avatar has to be embedded as either a data-url or a URL to an external image as shown in the examples below:

$ body=$(cat << EOF
{
    "name": "Mars Project",
    "key": "MARS",
    "description": "Software for colonizing mars.",
    "links": {
        "avatar": {
            "href": "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/..."
        }
    },
    "is_private": false
}
EOF
)
$ curl -H "Content-Type: application/json" \
       -X POST \
       -d "$body" \
       https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq .
{
  // Serialized project document
}

or even:

$ body=$(cat << EOF
{
    "name": "Mars Project",
    "key": "MARS",
    "description": "Software for colonizing mars.",
    "links": {
        "avatar": {
            "href": "http://i.imgur.com/72tRx4w.gif"
        }
    },
    "is_private": false
}
EOF
)
$ curl -H "Content-Type: application/json" \
       -X POST \
       -d "$body" \
       https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq .
{
  // Serialized project document
}
workspace
required
string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Media type application/json
object
type
required
string
links
object
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
uuid

The project’s immutable id.

string
key

The project’s key.

string
owner
object
type
required
string
links
Account Links

Links related to an Account.

object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
key
additional properties
any
created_on
string format: date-time
display_name
string
uuid
string
links
object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
members
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
projects
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
repositories
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
name

The name of the project.

string
description
string
is_private

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.

boolean
created_on
string format: date-time
updated_on
string format: date-time
has_publicly_visible_repos

Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.

boolean
Example generated
{
"type": "example",
"links": {
"html": {
"href": "https://example.com",
"name": "example"
},
"avatar": {
"href": "https://example.com",
"name": "example"
}
},
"uuid": "example",
"key": "example",
"owner": {
"type": "example",
"links": {
"avatar": {
"href": "https://example.com",
"name": "example"
},
"self": {
"href": "https://example.com",
"name": "example"
},
"html": {
"href": "https://example.com",
"name": "example"
},
"members": {
"href": "https://example.com",
"name": "example"
},
"projects": {
"href": "https://example.com",
"name": "example"
},
"repositories": {
"href": "https://example.com",
"name": "example"
}
},
"created_on": "2026-04-15T12:00:00Z",
"display_name": "example",
"uuid": "example"
},
"name": "example",
"description": "example",
"is_private": true,
"created_on": "2026-04-15T12:00:00Z",
"updated_on": "2026-04-15T12:00:00Z",
"has_publicly_visible_repos": true
}

A new project has been created.

Media type application/json
object
type
required
string
links
object
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
uuid

The project’s immutable id.

string
key

The project’s key.

string
owner
object
type
required
string
links
Account Links

Links related to an Account.

object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
key
additional properties
any
created_on
string format: date-time
display_name
string
uuid
string
links
object
avatar
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
self
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
html
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
members
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
projects
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
repositories
Link

A link to a resource related to this object.

object
href
string format: uri
name
string
name

The name of the project.

string
description
string
is_private

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.

boolean
created_on
string format: date-time
updated_on
string format: date-time
has_publicly_visible_repos

Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.

boolean
Example generated
{
"type": "example",
"links": {
"html": {
"href": "https://example.com",
"name": "example"
},
"avatar": {
"href": "https://example.com",
"name": "example"
}
},
"uuid": "example",
"key": "example",
"owner": {
"type": "example",
"links": {
"avatar": {
"href": "https://example.com",
"name": "example"
},
"self": {
"href": "https://example.com",
"name": "example"
},
"html": {
"href": "https://example.com",
"name": "example"
},
"members": {
"href": "https://example.com",
"name": "example"
},
"projects": {
"href": "https://example.com",
"name": "example"
},
"repositories": {
"href": "https://example.com",
"name": "example"
}
},
"created_on": "2026-04-15T12:00:00Z",
"display_name": "example",
"uuid": "example"
},
"name": "example",
"description": "example",
"is_private": true,
"created_on": "2026-04-15T12:00:00Z",
"updated_on": "2026-04-15T12:00:00Z",
"has_publicly_visible_repos": true
}
Location
string

The location of the newly created project

The user requesting to create a project does not have the necessary permissions.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}

A workspace doesn’t exist at this location.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}