> Call POST /v1/check before a tool that writes. DENY means do not invoke the tool. For clean Markdown of any page, append .md to the page URL. For the complete index, fetch https://docs.withwrit.com/llms.txt.

# 90-second demo grant

POST https://api.withwrit.com/v1/sandbox
Content-Type: application/json

No auth — this is the keyless trial. Mints a 90-second grant, but
only for `verb: "demo_write"` on a target starting with `demo-`.
Anything else is a 400. Use it to prove the intercept loop
(check → grant → check → ALLOW) without signing up; switch to
`POST /v1/keys` for real verbs. Sandbox grants are not tenant-scoped.


Reference: https://docs.withwrit.com/api-reference/checks/90-second-demo-grant

## Servers

- `https://api.withwrit.com` (Writ gate, default)
- `https://j72ckh66ukck2kcbq3oiwxaalm0olxwb.lambda-url.us-east-1.on.aws` (Direct Lambda Function URL (fallback))

## Request

### Body (application/json)

This endpoint expects an any.

- `any`

## Response

### 201

Sandbox grant created. Use it with POST /v1/check within 90 seconds.

## Errors

### 400 Bad Request Error

Missing required fields, or the verb/target is not a sandbox write.

## Examples

**Response**

```json
{
  "expiresAt": 1759000090,
  "grantId": "grnt_2b3c...",
  "target": "demo-ledger-1",
  "ttlSeconds": 90,
  "verb": "demo_write"
}
```

**SDK Code**

```python Checks_90SecondDemoGrant_example
import requests

url = "https://api.withwrit.com/v1/sandbox"

response = requests.post(url)

print(response.json())
```

```javascript Checks_90SecondDemoGrant_example
const url = 'https://api.withwrit.com/v1/sandbox';
const options = {method: 'POST'};

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

```go Checks_90SecondDemoGrant_example
package main

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

func main() {

	url := "https://api.withwrit.com/v1/sandbox"

	req, _ := http.NewRequest("POST", url, nil)

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

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

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

}
```

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

url = URI("https://api.withwrit.com/v1/sandbox")

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

request = Net::HTTP::Post.new(url)

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

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

HttpResponse<String> response = Unirest.post("https://api.withwrit.com/v1/sandbox")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.withwrit.com/v1/sandbox');

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

```csharp Checks_90SecondDemoGrant_example
using RestSharp;

var client = new RestClient("https://api.withwrit.com/v1/sandbox");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Checks_90SecondDemoGrant_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withwrit.com/v1/sandbox")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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()
```