---
title: "Updates the document space with the specified id."
method: PUT
path: "/documentspaces/{documentSpaceId}"
tags: ["documentSpaces"]
---

# Updates the document space with the specified id.

`PUT /documentspaces/{documentSpaceId}`

<Check title="Required Permissions" icon="key">The user must be an admin.</Check>

## Path parameters

- `documentSpaceId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- DocumentSpaceForm
  - `name` string, nullable — The name of the document space.
  - `emoji` string, nullable — The emoji of the document space.
  - `color` string, nullable — The color of the document space for display purposes in the app. Can be null when no color assigned.
  - `order` number, double, nullable — The order of the document space in the list of document spaces.
  - `workspaceAccessLevel` 'none' | 'read' | 'manage' — Determines the level of access to this document space granted to all workspace users. Can be either `none`, `read`, or `manage`.

## Response `200`

OK

- DocumentSpaceModel
  - `id` string, uuid — The id of the entity.
  - `createdOn` string, date-time — The date this entity was created.
  - `createdBy` string, uuid — The id of the user who created this entity.
  - `updatedOn` string, date-time — The date this entity was last modified.
  - `updatedBy` string, uuid — The id of the user who last modified this entity.
  - `name` string, nullable — The name of the document space.
  - `isExternal` boolean — Whether this document space is coming from an external workspace (awork Connect).
  - `emoji` string, nullable — The emoji of the document space.
  - `color` string, nullable — The color of the document space for display purposes in the app. Can be null when no color assigned.
  - `order` number, double, nullable — The order of the document space in the list of document spaces.
  - `workspaceAccessLevel` string, nullable — Determines the level of access to this document space granted to all workspace users. Can be either not set (no access), `read`, or `manage`.
  - `contributors` ContributorModel[], nullable — The contributors of this document space.
    - `id` string, uuid — The id of the contributor.
    - `userId` string, uuid — The id of the user this contributor references.
    - `accessLevel` string, nullable — Determines the level of access granted to this contributor with respect to the specific entity. Can be either set to `read` or `manage`.
    - `firstName` string, nullable — The first name of the user.
    - `lastName` string, nullable — The last name of the user.
    - `hasImage` boolean, nullable — Whether the user has an image.
    - `isDeactivated` boolean — Whether the user is deactivated.
  - `teams` EntityToTeamModel[], nullable — The teams this document space is connected to.
    - `id` string, uuid — The id of the entity to team.
    - `teamId` string, uuid — The id of the team this entity to team references.
    - `accessLevel` string, nullable — Determines the level of access granted to this entity to team with respect to the specific entity. Can be either set to `read` or `manage`.
    - `name` string, nullable — The name of the team.
    - `icon` string, nullable — The icon which is assigned to the team.
    - `color` string, nullable — The color of the team.

## Other responses

- `401` — Unauthorized
- `404` — Not Found

---

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