> ## Documentation Index
> Fetch the complete documentation index at: https://developer.opus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Restore a Workflow

> Un-archive a workflow, returning it to listings

Un-archive a workflow, returning it to listings. This is the inverse of [Archive a Workflow](/api-reference/v1-workflow-generation/archive-workflow).

Requires the **Workflow: Full** permission on the workflow.

<Note>
  Restoring is idempotent in the same way archiving is: restoring a workflow that is not archived succeeds and changes nothing.
</Note>

## Path Parameters

<ParamField path="workflowId" type="string" required>
  The ID of the workflow to restore
</ParamField>

## Headers

<ParamField header="x-service-key" type="string" required>
  Your API authentication key
</ParamField>

## Response

<ResponseField name="workflowId" type="string" required>
  The workflow ID that was restored — the same ID you supplied in the path
</ResponseField>

<ResponseField name="isArchived" type="boolean" required>
  Archive status after the call. Always `false` on a 2xx response.
</ResponseField>

<Note>
  This is the mirror of [Archive a Workflow](/api-reference/v1-workflow-generation/archive-workflow), so you can read the result of an archive and a restore the same way.

  `archivedAt` and `archivedBy` are deliberately **not** returned here — on a restore they are cleared by definition, and returning two always-null fields would suggest "unknown" rather than "not applicable".
</Note>

## Errors

<ResponseField name="401" type="Unauthorized">
  Missing, invalid, or expired API key.
</ResponseField>

<ResponseField name="403" type="Forbidden">
  No access to this workflow.
</ResponseField>

<ResponseField name="404" type="Not Found">
  The workflow does not exist.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}/restore \
    --header 'x-service-key: {YOUR_SERVICE_KEY}'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}/restore",
      headers={"x-service-key": "{YOUR_SERVICE_KEY}"},
  )

  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://operator.opus.com/api/v1/workflow/{YOUR_WORKFLOW_ID}/restore",
    {
      method: "POST",
      headers: { "x-service-key": "{YOUR_SERVICE_KEY}" },
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Response theme={null}
  {
    "workflowId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "isArchived": false
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.