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

# Reopen Session

Return a closed session to normal service. The session becomes writable again and can run new
executions.

## **POST** `/revisions/:id/data/command` (Command: `reopen_session`)

Requires the **write** role on the blob.

### Request Body

| Parameter    | Type   | Required | Description                 |
| :----------- | :----- | :------- | :-------------------------- |
| `engine`     | string | Yes      | Must be `workflow_blobhub`. |
| `command`    | string | Yes      | Must be `reopen_session`.   |
| `session_id` | string | Yes      | The ID of the session.      |

### Response

| Parameter | Type   | Description                               |
| :-------- | :----- | :---------------------------------------- |
| `session` | object | The session, with `status` set to `open`. |

Unlike closing and deleting, reopening is immediate and complete when the command returns — there is
no background work. Nothing was running in a `closed` session, so there is nothing to restart.

### Errors

| Status | Error                | Cause                                                                |
| :----- | :------------------- | :------------------------------------------------------------------- |
| 409    | `session_not_closed` | The session is not `closed` — it is `open`, `closing` or `deleting`. |
| 403    | `forbidden`          | Missing write access, or the session is gone.                        |

<Note>
  A session that is `closing` cannot be reopened. Wait for it to reach `closed` — signalled by the
  `session_closed` event — and reopen it then. A `deleting` session can never be reopened; deletion is
  irreversible.
</Note>

### Example

<CodeGroup>
  ```json Request theme={null}
  {
    "engine": "workflow_blobhub",
    "command": "reopen_session",
    "session_id": "sess_001"
  }
  ```

  ```json Response theme={null}
  {
    "session": {
      "id": "sess_001",
      "status": "open"
    }
  }
  ```
</CodeGroup>

## No event is emitted

Reopening emits no session event. The other three transitions are asynchronous, so they announce
their outcome; reopening is synchronous, so the caller already has it in the response. Clients that
track session status from the event stream should also refresh on their own reopen calls.

See [Session Lifecycle](/blob-types/workflow/workflows/session-lifecycle) for the complete model.
