---
title: "Rename a space"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rename a space

Path: CloudRaker Workspace API › Workspace Spaces

`PATCH /spaces/{spaceId}`

Renames a space. Body: `title` (1–120 chars after trimming whitespace). The space id does not change, so its files, runs, and links stay attached. Authorization: requires `space:contribute` on the space; organization administrators bypass this check. A caller lacking the grant gets 403. Returns 200 `{ space }`; 404 if the space does not exist, is archived, or is a desk (`me:…`).

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `spaceId` (`updateSpace.path.spaceId`; string, required)

## Request body

_Required._

- `title` (`updateSpace.title`; string, required)
  - minLength 1; maxLength 120; example `"Legal"`

## Example request

```json
{
  "title": "Legal"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.cloudraker.com/spaces/<spaceId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Legal"
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/spaces/<spaceId>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({title: 'Legal'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/spaces/<spaceId>"

payload = { "title": "Legal" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The renamed space.

#### Example

```json
{
  "space": {
    "id": "string",
    "title": "Acme MSA",
    "spaceType": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "expiresAt": "2019-08-24T14:15:22Z"
  }
}
```

- `space` (`updateSpace.response.200.space`; object, required)
  - `id` (`updateSpace.response.200.space.id`; string, required)
  - `title` (`updateSpace.response.200.space.title`; string, required)
    - example `"Acme MSA"`
  - `spaceType` (`updateSpace.response.200.space.spaceType`; string, required) — Identifier of the parent space type.
  - `createdAt` (`updateSpace.response.200.space.createdAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `updatedAt` (`updateSpace.response.200.space.updatedAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `expiresAt` (`updateSpace.response.200.space.expiresAt`; any of, required) — Deadline of an API-managed (`/v1`) space, after which it is closed and its files deleted. `null` for a space created in the app, which never expires.
    - any of: `string`, `null`
  - `createdBy` (`updateSpace.response.200.space.createdBy`; string, optional)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`updateSpace.response.400.success`; boolean, required)
  - one of `false`
- `error` (`updateSpace.response.400.error`; array<unknown>, required)
- `data` (`updateSpace.response.400.data`; unknown, required)

### 404

`not_found` — the space does not exist, is archived, or is a desk.


Source: https://docs.cloudraker.com/workspace/api/workspace-spaces/update-space/index.md
