---
ai:
  exclude: true
search:
  tags:
    - Space
    - PUT
seo:
  description: >-
    Updates a Space. The incoming Space must include a Key and Name,… Reference
    for the PUT /rest/api/space/{spaceKey} endpoint in the Confluence Data
    Center API.
sidebar:
  label: Update Space
  badge: PUT
title: Update Space
type: openapi-operation
---
Updates a Space. The incoming Space must include a Key and Name, and should include a Description

`PUT /rest/api/space/{spaceKey}`

**Request body** (`application/json`, required)

the space being updated

- `id` (integer<int64>)
- `key` (string)
- `name` (string)
- `status` (string)
- `icon` (ReferenceIcon)
- `description` (object)
- `homepage` (ReferenceContent)
- `links` (object)
- `type` (string)
- `metadata` (object)
- `retentionPolicy` (ReferenceSpaceRetentionPolicy)

Request body example:

```json
{
  "id": 123456,
  "key": "TEST",
  "name": "Test Space",
  "status": "current",
  "icon": {
    "expanded": true,
    "idProperties": {}
  },
  "description": {},
  "homepage": {
    "expanded": true,
    "idProperties": {}
  },
  "links": {},
  "type": "global",
  "metadata": {
    "labels": [
      "label1",
      "label2"
    ]
  },
  "retentionPolicy": {
    "expanded": true,
    "idProperties": {}
  }
}
```

**Responses**

- `200` — Returns a full JSON representation of a space.
- `404` — Returned if there is no space with the given key, or if the calling userdoes not have permission to update it.

Response example, 200:

```json
{
  "id": 123456,
  "key": "TEST",
  "name": "Test Space",
  "status": "current",
  "icon": {
    "expanded": true,
    "idProperties": {}
  },
  "description": {},
  "homepage": {
    "expanded": true,
    "idProperties": {}
  },
  "links": {},
  "type": "global",
  "metadata": {
    "labels": [
      "label1",
      "label2"
    ]
  },
  "retentionPolicy": {
    "expanded": true,
    "idProperties": {}
  }
}
```
