> For the complete documentation index, see [llms.txt](https://docs.reviactyl.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reviactyl.app/client-api/subuser-preview.md).

# Subuser Preview

## GET /subuser-preview

> Retrieves the authenticated owner's active subuser preview session status

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/subuser-preview":{"get":{"operationId":"subuserPreview.status","summary":"Retrieves the authenticated owner's active subuser preview session status","tags":["SubuserPreview"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"active":{"type":"boolean"},"owned_by_tab":{"type":"string"},"session":{"type":"object","properties":{"uuid":{"type":"string"},"server_uuid":{"type":"string"},"server_identifier":{"type":"string"},"server_name":{"type":"string"},"subuser_email":{"type":"string"},"subuser_uuid":{"type":"string"},"permission_count":{"type":"integer"},"max_file_size":{"type":"integer"},"power_status":{"anyOf":[{"type":"string"},{"type":"string","enum":["running"]}]},"expires_at":{"type":"string"}},"required":["uuid","server_uuid","server_identifier","server_name","subuser_email","subuser_uuid","permission_count","max_file_size","power_status","expires_at"]}},"required":["active","owned_by_tab","session"]},{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]}]}}}}}}}}}
```

## DELETE /subuser-preview

> Ends the active subuser preview session

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/subuser-preview":{"delete":{"operationId":"subuserPreview.destroy","summary":"Ends the active subuser preview session","tags":["SubuserPreview"],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}}}
```

## POST /subuser-preview/heartbeat

> Refreshes the active subuser preview session

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/subuser-preview/heartbeat":{"post":{"operationId":"subuserPreview.heartbeat","summary":"Refreshes the active subuser preview session","tags":["SubuserPreview"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"session":{"type":"object","properties":{"uuid":{"type":"string"},"server_uuid":{"type":"string"},"server_identifier":{"type":"string"},"server_name":{"type":"string"},"subuser_email":{"type":"string"},"subuser_uuid":{"type":"string"},"permission_count":{"type":"integer"},"max_file_size":{"type":"integer"},"power_status":{"anyOf":[{"type":"string"},{"type":"string","enum":["running"]}]},"expires_at":{"type":"string"}},"required":["uuid","server_uuid","server_identifier","server_name","subuser_email","subuser_uuid","permission_count","max_file_size","power_status","expires_at"]}},"required":["active","session"]}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}}}
```

## POST /servers/{server}/users/{user}/preview

> Starts a preview session for a server subuser

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/users/{user}/preview":{"post":{"operationId":"subuserPreview.store","summary":"Starts a preview session for a server subuser","tags":["SubuserPreview"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server whose subuser is being previewed.","schema":{"type":"integer"}},{"name":"user","in":"path","required":true,"description":"The subuser to preview.","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"replace":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"owned_by_tab":{"type":"boolean"},"token":{"type":"string"},"session":{"type":"object","properties":{"uuid":{"type":"string"},"server_uuid":{"type":"string"},"server_identifier":{"type":"string"},"server_name":{"type":"string"},"subuser_email":{"type":"string"},"subuser_uuid":{"type":"string"},"permission_count":{"type":"integer"},"max_file_size":{"type":"integer"},"power_status":{"anyOf":[{"type":"string"},{"type":"string","enum":["running"]}]},"expires_at":{"type":"string"}},"required":["uuid","server_uuid","server_identifier","server_name","subuser_email","subuser_uuid","permission_count","max_file_size","power_status","expires_at"]}},"required":["active","owned_by_tab","token","session"]}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"active":{"type":"boolean"},"owned_by_tab":{"type":"boolean"},"session":{"type":"object","properties":{"uuid":{"type":"string"},"server_uuid":{"type":"string"},"server_identifier":{"type":"string"},"server_name":{"type":"string"},"subuser_email":{"type":"string"},"subuser_uuid":{"type":"string"},"permission_count":{"type":"integer"},"max_file_size":{"type":"integer"},"power_status":{"anyOf":[{"type":"string"},{"type":"string","enum":["running"]}]},"expires_at":{"type":"string"}},"required":["uuid","server_uuid","server_identifier","server_name","subuser_email","subuser_uuid","permission_count","max_file_size","power_status","expires_at"]}},"required":["active","owned_by_tab","session"]},{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}]}}}}}}}},"components":{"responses":{"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.reviactyl.app/client-api/subuser-preview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
