Skip to main content
POST
/
sandboxes
/
{sandboxName}
/
previews
/
{previewName}
/
tokens
Create token for Sandbox Preview
curl --request POST \
  --url https://api.blaxel.ai/v0/sandboxes/{sandboxName}/previews/{previewName}/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "name": "<string>",
    "previewName": "<string>",
    "resourceName": "<string>",
    "resourceType": "<string>",
    "workspace": "<string>"
  },
  "spec": {
    "expiresAt": "<string>"
  }
}
'
{
  "metadata": {
    "name": "<string>",
    "previewName": "<string>",
    "resourceName": "<string>",
    "resourceType": "<string>",
    "workspace": "<string>"
  },
  "spec": {
    "expired": true,
    "expiresAt": "<string>",
    "token": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.blaxel.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

OAuth2 authentication with JWT tokens

Path Parameters

sandboxName
string
required

Name of the Sandbox

previewName
string
required

Name of the Preview

Body

application/json

Token for a Preview

metadata
object
required

PreviewTokenMetadata

spec
object
required

Spec for a Preview Token

Response

200 - application/json

successful operation

Token for a Preview

metadata
object
required

PreviewTokenMetadata

spec
object
required

Spec for a Preview Token

Last modified on May 21, 2026