Skip to main content
POST
/
sandboxes
/
{sandboxName}
/
previews
Create Sandbox Preview
curl --request POST \
  --url https://api.blaxel.ai/v0/sandboxes/{sandboxName}/previews \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "name": "<string>",
    "displayName": "<string>",
    "resourceName": "<string>",
    "resourceType": "<string>",
    "workspace": "<string>"
  },
  "spec": {
    "customDomain": "<string>",
    "expires": "<string>",
    "port": 123,
    "prefixUrl": "<string>",
    "public": true,
    "requestHeaders": {},
    "responseHeaders": {},
    "ttl": "<string>"
  }
}
'
{
  "metadata": {
    "name": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "createdBy": "<string>",
    "updatedBy": "<string>",
    "displayName": "<string>",
    "resourceName": "<string>",
    "resourceType": "<string>",
    "workspace": "<string>"
  },
  "spec": {
    "customDomain": "<string>",
    "expires": "<string>",
    "port": 123,
    "prefixUrl": "<string>",
    "public": true,
    "region": "<string>",
    "requestHeaders": {},
    "responseHeaders": {},
    "ttl": "<string>",
    "url": "<string>"
  },
  "events": [
    {
      "canaryRevision": "<string>",
      "message": "Deployment successful",
      "revision": "rev-abc123",
      "status": "DEPLOYED",
      "time": "2025-01-15T10:30:00Z",
      "type": "deployment"
    }
  ]
}

Authorizations

Authorization
string
header
required

OAuth2 authentication with JWT tokens

Path Parameters

sandboxName
string
required

Name of the Sandbox

Query Parameters

force
boolean

Force creation by deleting conflicting previews that use the same custom domain prefix URL

Body

application/json

Preview of a Resource

metadata
object
required

PreviewMetadata

spec
object
required

Preview of a Resource

Response

200 - application/json

successful operation

Preview of a Resource

metadata
object
required

PreviewMetadata

spec
object
required

Preview of a Resource

events
object[]
read-only

Events happening on a resource deployed on Blaxel

status
enum<string>
read-only

Deployment status of a resource deployed on Blaxel

Available options:
DELETING,
TERMINATED,
FAILED,
DEACTIVATED,
DEACTIVATING,
UPLOADING,
BUILDING,
DEPLOYING,
DEPLOYED,
BUILT
Last modified on June 11, 2026