---
title: "Integrate DWS Viewer API with your own backend"
canonical_url: "https://www.nutrient.io/guides/dws-viewer/developer-guides/use-with-your-backend/"
md_url: "https://www.nutrient.io/guides/dws-viewer/developer-guides/use-with-your-backend.md"
last_updated: "2026-05-27T13:10:05.652Z"
description: "Learn how to integrate DWS Viewer API with your backend for seamless document management, including uploading and referencing documents."
---

# Integrate DWS Viewer API with your own backend

DWS Viewer API provides a programmatic [API](https://www.nutrient.io/api/reference/viewer/public/) that enables you to easily integrate it with your backend. This backend can be a regular server-side application running in your infrastructure or in a cloud, or it could even be a serverless function. The API is language agnostic, with the only requirement being the ability to communicate via HTTP.

## Uploading a document to DWS Viewer API

When you create a document by upload, your backend service sends the file to DWS Viewer API, which will manage the entire document lifecycle.![Your service uploads the document to DWS Viewer API and receives a document ID back.](@/assets/guides/dws-viewer/upload-a-document-via-api.png)

1. Your service uploads the document to DWS Viewer API, which stores the document.

2. Your service receives the document ID back, which it can use to reference the document later.

3. To be able to do this, it needs to persist the document ID in persistent storage — for example, a database.

## Viewing a document in your web app

After you create a document via upload, you can open it via Nutrient Web SDK. Any changes made to the document are automatically persisted by DWS Viewer API.

1. A user requests a document to display in your web app running in a web browser.

2. Your app requests access to the document from your backend.

3. Your backend creates an [session token](https://www.nutrient.io/guides/dws-viewer/developer-guides/generate-a-session-token.md) for the requested document.

4. The session token is then passed to your web app.

5. The web app [loads Nutrient Web SDK](https://www.nutrient.io/guides/dws-viewer/developer-guides/open-a-document-in-web.md) using the session token for authentication.

6. After successful authentication, it displays the document streamed from DWS Viewer API.
---

## Related pages

- [DWS Viewer API backend authentication](/guides/dws-viewer/developer-guides/backend-authentication.md)
- [Architecture of DWS Viewer API integration](/guides/dws-viewer/developer-guides/architecture.md)
- [Generate a session token](/guides/dws-viewer/developer-guides/generate-a-session-token.md)
- [DWS Viewer API client authentication flow](/guides/dws-viewer/developer-guides/client-authentication-flow.md)
- [DWS Viewer API developer guides](/guides/dws-viewer/developer-guides.md)
- [Upload documents](/guides/dws-viewer/developer-guides/upload-documents.md)
- [Dashboard](/guides/dws-viewer/developer-guides/dashboard.md)
- [Open a document in Web SDK](/guides/dws-viewer/developer-guides/open-a-document-in-web.md)
- [Deployment options](/guides/dws-viewer/developer-guides/deployment-options.md)

