> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# Read the accepted deployment definition

GET https://api.runtype.com/v1/sandbox-deployments/{id}/definition

Reference: https://docs.runtype.com/api-reference/runtype-api/sandbox-deployments/read-the-accepted-deployment-definition

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

Canonical configuration or explicit advanced-spec readback

- `config` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfig, required, nullable)
- `deploymentId` (string, required)
- `desiredRevision` (integer, required)
- `resourceVersion` (integer, required)
- `spec` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpec, required)
- `specHash` (string, required)
- `configUnavailableReason` (string, optional)

## Errors

### 400 Bad Request Error

Validation error

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 402 Payment Required Error

Blocked by the organization managed deployment spend budget or credits

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 403 Forbidden Error

Insufficient permissions

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 404 Not Found Error

Not found

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 409 Conflict Error

Conflict

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 412 Precondition Failed Error

Resource version precondition failed

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 422 Unprocessable Entity Error

Blocked by credential, source, or profile admission

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 429 Too Many Requests Error

Organization quota exhausted

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `details` (list of ErrorDetailsItems, optional)

## Types

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfig

- `credentialAuthority` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigCredentialAuthority, required)
- `language` (enum, required)
  - Allowed values: `javascript`, `typescript`, `python`
- `port` (integer, required)
- `retention` (enum, required)
  - Allowed values: `10m`, `1h`, `24h`, `unlimited`
- `runtimeProfileId` (string, required)
- `sourceAssetId` (string, required)
- `startCommand` (string, required)
- `health` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigHealth, optional)
- `ingress` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigIngress, optional)
- `networkAccess` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigNetworkAccess, optional)
- `restartPolicy` (enum, optional)
  - Allowed values: `never`, `replace-sandbox`
- `secretBindings` (map from string to string, optional)
- `sleepPolicy` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigSleepPolicy, optional)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpec

- `availability` (enum, required)
  - Allowed values: `on-demand`, `warm`
- `capabilities` (list of enum, required)
  - Allowed values: `inspect-without-start`, `network-policy`, `private-ingress`, `process-adoption`, `rebuild`, `terminate:process-tree`, `terminate:sandbox-destroy`, `terminate:sandbox-stop`, `wake`
- `credentialAuthority` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecCredentialAuthority, required)
- `health` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecHealth, required)
- `ingress` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecIngress, required)
- `language` (enum, required)
  - Allowed values: `javascript`, `typescript`, `python`
- `networkPolicyRef` (string, required)
- `port` (integer, required)
- `profile` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecProfile, required)
- `restartPolicy` (enum, required)
  - Allowed values: `never`, `process`, `replace-sandbox`
- `retention` (enum, required)
  - Allowed values: `10m`, `1h`, `24h`, `unlimited`
- `runtimeProfile` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecRuntimeProfile, required)
- `sleepPolicy` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecSleepPolicy, required)
- `source` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecSource, required)
- `startCommand` (string, required)
- `networkAccess` (V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecNetworkAccess, optional)
- `secretBindings` (map from string to string, optional, default: {})

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigCredentialAuthority

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigHealth

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigIngress

- `access` (enum, required)
  - Allowed values: `bearer`, `public`
- `allowedOrigins` (list of string, optional)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigNetworkAccess

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigSleepPolicy

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecCredentialAuthority

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecHealth

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecIngress

- `access` (enum, required)
  - Allowed values: `bearer`, `public`
- `allowedOrigins` (list of string, optional, default: [])

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecProfile

- `accountTier` (string, required)
- `environment` (enum, required)
  - Allowed values: `development`, `staging`, `production`
- `profileId` (string, required)
- `providerId` (string, required)
- `runtimeClass` (string, required)
- `sdkVersion` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecRuntimeProfile

- `runtimeProfileDigest` (string, required)
- `runtimeProfileId` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecSleepPolicy

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecSource

- `sourceAssetId` (string, required)
- `sourceHash` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecNetworkAccess

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigCredentialAuthority0

- `connectionId` (string, required)
- `kind` (enum, required)
  - Allowed values: `organization-connection`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigCredentialAuthority1

- `kind` (enum, required)
  - Allowed values: `platform-managed`
- `providerPolicyId` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigHealth0

- `kind` (enum, required)
  - Allowed values: `tcp`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigHealth1

- `expectedStatus` (integer, required)
- `kind` (enum, required)
  - Allowed values: `http`
- `path` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigNetworkAccess1

- `allow` (list of string, required)
- `profile` (enum, required)
  - Allowed values: `none`, `essentials`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigSleepPolicy0

- `mode` (enum, required)
  - Allowed values: `never`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaConfigSleepPolicy1

- `after` (enum, required)
  - Allowed values: `5m`, `15m`, `30m`, `1h`
- `mode` (enum, required)
  - Allowed values: `idle`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecCredentialAuthority0

- `connectionId` (string, required)
- `kind` (enum, required)
  - Allowed values: `organization-connection`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecCredentialAuthority1

- `kind` (enum, required)
  - Allowed values: `platform-managed`
- `providerPolicyId` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecHealth0

- `kind` (enum, required)
  - Allowed values: `tcp`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecHealth1

- `expectedStatus` (integer, required)
- `kind` (enum, required)
  - Allowed values: `http`
- `path` (string, required)

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecSleepPolicy0

- `mode` (enum, required)
  - Allowed values: `never`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecSleepPolicy1

- `after` (enum, required)
  - Allowed values: `5m`, `15m`, `30m`, `1h`
- `mode` (enum, required)
  - Allowed values: `idle`

### V1SandboxDeploymentsIdDefinitionGetResponsesContentApplicationJsonSchemaSpecNetworkAccess1

- `allow` (list of string, optional)
- `profile` (enum, optional)
  - Allowed values: `none`, `essentials`, `open`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "config": {
    "credentialAuthority": {
      "connectionId": "conn_org_a1b2c3d4e5f6",
      "kind": "organization-connection"
    },
    "language": "javascript",
    "port": 3000,
    "retention": "1h",
    "runtimeProfileId": "rtp_node18_standard_v2",
    "sourceAssetId": "asset_7f3c9e2a1b4d8f6e",
    "startCommand": "node dist/index.js",
    "health": {
      "kind": "tcp"
    },
    "ingress": {
      "access": "bearer",
      "allowedOrigins": [
        "https://app.example.com"
      ]
    },
    "networkAccess": "none",
    "restartPolicy": "never",
    "secretBindings": {},
    "sleepPolicy": {
      "mode": "never"
    }
  },
  "deploymentId": "dep_4c8f2e1a9b3d7e5f",
  "desiredRevision": 3,
  "resourceVersion": 7,
  "spec": {
    "availability": "on-demand",
    "capabilities": [
      "inspect-without-start"
    ],
    "credentialAuthority": {
      "connectionId": "conn_org_a1b2c3d4e5f6",
      "kind": "organization-connection"
    },
    "health": {
      "kind": "tcp"
    },
    "ingress": {
      "access": "bearer",
      "allowedOrigins": [
        "https://app.example.com"
      ]
    },
    "language": "javascript",
    "networkPolicyRef": "netpol_default_egress_v1",
    "port": 3000,
    "profile": {
      "accountTier": "pro",
      "environment": "development",
      "profileId": "prof_node18_2cpu_4gb",
      "providerId": "provider_aws_us_east_1",
      "runtimeClass": "node18-slim",
      "sdkVersion": "2.4.1"
    },
    "restartPolicy": "never",
    "retention": "1h",
    "runtimeProfile": {
      "runtimeProfileDigest": "a3f1c2e4b5d6789012345678901234567890abcdef1234567890abcdef123456",
      "runtimeProfileId": "rtp_node18_standard_v2"
    },
    "sleepPolicy": {
      "mode": "never"
    },
    "source": {
      "sourceAssetId": "asset_7f3c9e2a1b4d8f6e",
      "sourceHash": "b4e8f2a1c3d5e7f9012345678901234567890abcdef1234567890abcdef1234"
    },
    "startCommand": "node dist/index.js",
    "networkAccess": "none",
    "secretBindings": {}
  },
  "specHash": "c9d1e3f5a7b2c4d6e8f0123456789012345678901234567890abcdef123456ab",
  "configUnavailableReason": "source asset is still being processed"
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/sandbox-deployments/id/definition"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/sandbox-deployments/id/definition';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.runtype.com/v1/sandbox-deployments/id/definition"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.runtype.com/v1/sandbox-deployments/id/definition")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.runtype.com/v1/sandbox-deployments/id/definition")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.runtype.com/v1/sandbox-deployments/id/definition', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/sandbox-deployments/id/definition");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/sandbox-deployments/id/definition")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```