---
title: "Renew a managed preview only for an already-bound, running workspace. The requested sandbox ID is an object selector, never an authorization grant."
method: POST
path: "/ai/preview/authorize"
tags: ["AI Chat"]
---

# Renew a managed preview only for an already-bound, running workspace. The requested sandbox ID is an object selector, never an authorization grant.

`POST /ai/preview/authorize`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/preview/authorize`
- Auth: HTTP bearer

## Request body

- AuthorizeWorkspacePreviewRequest
  - `path` string, nullable
  - `port` integer, required
  - `sandbox_public_id` string, required

## Response `200`

- ApplicationPreviewLinkResponse
  - `expires_at` string, date-time, required: When the link stops working, ISO 8601 in UTC.
  - `url` string, required: A short-lived authenticated URL. Its fragment carries the grant and never reaches the development server or referrer headers.

## Other responses

- `400`
- `401`
- `403`
- `404`
- `503`

## Changes

- **2026-11-26** `e1864d950604`: 1 breaking
  - the `expires_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `200`
- **2026-09-13** `dbda5c31c626`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/preview/authorize/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
