***

title: update
slug: /reference/typescript/rest/datasphere/update
description: Update a document.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Update an existing document.

<EndpointSchemaSnippet endpoint="PATCH /api/datasphere/documents/{id}" />

## **Response Example**

<EndpointResponseSnippet endpoint="PATCH /api/datasphere/documents/{id}" />

## **Example**

```typescript {9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

const updated = await client.datasphere.documents.update("document-id", {
    tags: ["support", "updated"],
});
console.log(updated.tags);
```