---
ai:
  exclude: true
search:
  tags:
    - Space Property
    - PUT
seo:
  description: >-
    Updates a space property.The body contains the… Reference for the PUT
    /rest/api/space/{spaceKey}/property/{key} endpoint in the Confluence Data
    Center API.
sidebar:
  label: Update space property
  badge: PUT
title: Update space property
type: openapi-operation
---
Updates a space property.The body contains the representation of the space property. Must include new version number.If the given version number is 1, attempts to create a new space property.

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

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

space property to be updated

- `key` (string)
- `value` (JsonString)
- `version` (Version)
- `space` (Space)
- `spaceRef` (ReferenceSpace)

Request body example:

```json
{
  "key": "string",
  "value": {
    "value": "string"
  },
  "version": {
    "by": {
      "profilePicture": {
        "path": "http://www.example.com/path/to/image.png",
        "width": 16,
        "height": 16,
        "isDefault": true
      },
      "displayName": "Joe Smith",
      "type": "string"
    },
    "when": "2020-01-01T00:00:00Z",
    "message": "A message",
    "number": 1,
    "minorEdit": true,
    "hidden": true,
    "syncRev": "123456",
    "content": {
      "expanded": true,
      "idProperties": {}
    },
    "contentRef": {
      "expanded": true,
      "idProperties": {}
    }
  },
  "space": {
    "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": {}
    }
  },
  "spaceRef": {
    "expanded": true,
    "idProperties": {}
  }
}
```

**Responses**

- `200` — Returns a full JSON representation of the property.
- `400` — Returned if the given property has a different spaceKey to the one in the path, or if the property has a different key to the one in the path, or no property value was provided, or the value is too long.
- `403` — returned if the user does not have permission to edit the space with the given spaceKey.
- `404` — Returned if there is no space with the given key, or no property with the given key, or if the calling user does not have permission to view the space.
- `409` — Returned if the given version is does not match the expected target version of the updated property.
- `413` — Returned if the value is too long.

Response example, 200:

```json
{
  "key": "string",
  "value": {
    "value": "string"
  },
  "version": {
    "by": {
      "profilePicture": {
        "path": "http://www.example.com/path/to/image.png",
        "width": 16,
        "height": 16,
        "isDefault": true
      },
      "displayName": "Joe Smith",
      "type": "string"
    },
    "when": "2020-01-01T00:00:00Z",
    "message": "A message",
    "number": 1,
    "minorEdit": true,
    "hidden": true,
    "syncRev": "123456",
    "content": {
      "expanded": true,
      "idProperties": {}
    },
    "contentRef": {
      "expanded": true,
      "idProperties": {}
    }
  },
  "space": {
    "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": {}
    }
  },
  "spaceRef": {
    "expanded": true,
    "idProperties": {}
  }
}
```
