---
title: "Restore a Deleted Module"
method: POST
path: "/modules/{moduleId}/restore"
tags: ["Modules"]
---

# Restore a Deleted Module

`POST /modules/{moduleId}/restore`

Restores a soft-deleted module.
### Authorization Required:
  - Application Create

## Path parameters

- `moduleId` string, required

## Request body

- object
  - `shareToEnvironment` boolean — Whether to share the module to the environment NOTE: If specified, request cannot include `workspaceId` or `applicationId`.
  - `workspaceId` string — Workspace ID module will be shared with Examples Restore and share to workspace ID: `6053e968afcc293120198785` Request ``` { "workspaceId": "6053e968afcc293120198785", } ``` NOTE: If `applicationId` also specified, will connect the module to the application (the application must be part of the workspace) Restore and connect to application `6078e938d87660707f31c624` in workspace `6053e968afcc293120198785` Request ``` { "workspaceId": "6053e968afcc293120198785", "applicationId": "6078e938d87660707f31c624" } ```
  - `applicationId` string — Application ID to which the module will be restored (will not share the module) Example Request ``` { "applicationId": "6078e938d87660707f31c624" } ```

## Response `204`

Successfully Restored

## Other responses

- `422` — App/workspace relationship does not exist/or options specified are invalid
- `default` — Error

---

[API](https://skmtc.net/unqork/apis/unqork-customer-api.md) · [All operations](https://skmtc.net/unqork/apis/unqork-customer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unqork/unqork-customer-api/revisions/112399a67ebb/schema)
