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

# Restore a Deleted Module

`POST /modules/{moduleId}/restore`

## Request

- Base URL: `https://env.unqork.io/api/1.0`
- URL: `https://env.unqork.io/api/1.0/modules/{moduleId}/restore`
- Auth: OAuth 2
  - Client credentials
  - Password
  - Token URL: `https://xyzfinancial.unqork.io/api/1.0/oauth2/access_token`
- TypeScript: <https://skmtc.dev/unqork/apis/unqork-customer-api/docs/modules/:moduleId/restore/post.ts> (a function with typed inputs; its response is checked against the schema)

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.dev/unqork/apis/unqork-customer-api.md) - [All operations](https://skmtc.dev/unqork/apis/unqork-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unqork/apis/unqork-customer-api/revisions/13dad4096373?raw)
