> For the list of every page, fetch /llms.txt. The API contract is the OpenAPI file linked from the API reference.

# Update a project

PATCH https%3A%2F%2Fapi.usemeadow.ai/v1/projects/{project_id}
Content-Type: application/json

Changes the name, the webhook address, or the routing defaults, and can rotate
the webhook secret. Fields you leave out stay as they are.

Rules:

- `routing` is replaced as a whole. A patch that sends `routing` with one field
  drops every other routing field. Read the project, change the routing object,
  and send all of it.
- `webhook_url: null` removes the webhook address.
- `rotate_webhook_secret: true` replaces the webhook secret and returns the new
  one once in `webhook_secret`. The previous secret stays valid for 24 hours.
  See the `sandboxEvent` webhook for how deliveries are signed during that time.
  The rotation and the other fields of the same request are applied together
  or not at all.
- Unknown fields return 400, also inside `routing`.
- `restricted: true` hides the project from every `member` and `viewer` who
  was not added to it with `addProjectMember`, from the next request on.
  `false` shows it to everyone in the account again. Owners and admins always
  see it, and so does every API key. When the project becomes restricted, the same
  transaction revokes every live key in it that a `member` or `viewer` outside
  it minted, with the keys minted from them. Each gets an `api_key.deleted`
  audit entry with `reason` `project.updated`. Setting `false` again does not
  bring them back.

Scope: `admin`. People: `owner` or `admin`.


Reference: https://docs.usemeadow.ai/api-endpoints/projects/update-project

## Authentication

- `Authorization` header (bearer token, required) — A Meadow API key, sent as `Authorization: Bearer mdw_...`. The header `x-api-key: mdw_...` is accepted in its place.

## Request

### Path parameters

- `project_id` (string, required) — The project `id`.

### Body (application/json)

This endpoint expects a ProjectUpdate.

- `name` (string, optional) — A name for people. Required on create. Must not be empty. It need not be unique.
- `webhook_url` (string, optional, nullable) — Where to send sandbox events for sandboxes that set no `webhook_url` of their own. Must be `https` and resolve to a public address. `null` removes it.
- `max_sandboxes` (integer, optional, nullable) — The most sandboxes of this project that may be alive at once, whichever key made them. Null or left out means no cap. It counts the same states as `max_sandboxes` on a key, and a create past it returns 403 `project_sandbox_limit_exceeded`. While a project has a cap, its sandbox creates are admitted one at a time, which is a few database statements each. It counts sandboxes, not dollars.
- `routing` (ProjectUpdateRouting, optional) — Defaults for every request made with this project's keys. On update it is replaced as a whole.
- `rotate_webhook_secret` (boolean, optional) — When true, replace the webhook secret. The new secret is returned once in `webhook_secret`. The previous secret stays valid for 24 hours, and so does every earlier secret still inside its own 24 hours. The rotation and the other fields of the same request are applied together or not at all.
- `restricted` (boolean, optional) — When true, only owners, admins and the people added with `addProjectMember` see the project.

## Response

### 200

The updated project. `webhook_secret` is present only when it was rotated.

- `name` (string, required) — A name for people. Required on create. Must not be empty. It need not be unique.
- `id` (string, required) — The project id.
- `restricted` (boolean, required) — When true, a `member` or `viewer` sees the project only after `addProjectMember`. Owners, admins and keys are not affected.
- `created_at` (datetime, required) — When the project was created.
- `webhook_url` (string, optional, nullable) — Where to send sandbox events for sandboxes that set no `webhook_url` of their own. Must be `https` and resolve to a public address. `null` removes it.
- `max_sandboxes` (integer, optional, nullable) — The most sandboxes of this project that may be alive at once, whichever key made them. Null or left out means no cap. It counts the same states as `max_sandboxes` on a key, and a create past it returns 403 `project_sandbox_limit_exceeded`. While a project has a cap, its sandbox creates are admitted one at a time, which is a few database statements each. It counts sandboxes, not dollars.
- `routing` (ProjectRouting, optional) — Defaults for every request made with this project's keys. On update it is replaced as a whole.
- `webhook_secret` (string, optional) — The secret that signs webhook deliveries, starting with `whsec_`. Returned on create and when `rotate_webhook_secret` is true. Absent otherwise.

## Errors

### 400 Bad Request Error

The request breaks a rule. The message names the field.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 401 Unauthorized Error

The key is missing, malformed, unknown, revoked, or expired, or a key it was minted from no longer exists. Check the key and the header.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 403 Forbidden Error

The key does not have the `admin` scope. Use an admin key.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 404 Not Found Error

No project with this id in the account.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 413 Content Too Large Error

The request body is larger than this route allows: 1 MiB for JSON bodies, 16 MiB on the model routes, 100 MiB for a file upload, and 100 MB for a build context.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 429 Too Many Requests Error

More than 20 failed authentications came from your address in one minute, and this request also failed to authenticate: fix the key, wait for `retry-after` seconds, then retry. Or the server instance was full and no slot came free for the account within 3 seconds (`error.code` `account_in_flight_limit_exceeded`): wait for `retry-after` seconds, then retry.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 500 Internal Server Error

Meadow failed. Retry with backoff, and tell us if it persists.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

## Types

### ProjectUpdateRouting

Defaults for every request made with this project's keys. On update it is replaced as a whole.

- `models` (ProjectUpdateRoutingModels, optional) — Defaults for model calls.
- `sandboxes` (SandboxRouting, optional) — Which sandbox providers may host a sandbox, and in what order. Send it as `provider` on `POST /v1/sandboxes`, or store it on a project as `routing.sandboxes`. A field set on the request replaces the same field from the project. A provider that cannot meet the request (GPU type, lifetime, network rule, private registry) is skipped and recorded in `attempts` as `unsupported`.
- `lock` (boolean, optional, default: false) — When true, requests cannot override these defaults. A model request that sends `provider` or a prefixed model id, a sandbox create that sends routing fields in `provider`, and an image create that sends `build_on` all return 403.

### ProjectRouting

Defaults for every request made with this project's keys. On update it is replaced as a whole.

- `models` (ProjectRoutingModels, optional) — Defaults for model calls.
- `sandboxes` (SandboxRouting, optional) — Which sandbox providers may host a sandbox, and in what order. Send it as `provider` on `POST /v1/sandboxes`, or store it on a project as `routing.sandboxes`. A field set on the request replaces the same field from the project. A provider that cannot meet the request (GPU type, lifetime, network rule, private registry) is skipped and recorded in `attempts` as `unsupported`.
- `lock` (boolean, optional, default: false) — When true, requests cannot override these defaults. A model request that sends `provider` or a prefixed model id, a sandbox create that sends routing fields in `provider`, and an image create that sends `build_on` all return 403.

### ErrorError

- `type` (enum, required) — The class of the failure. - `invalid_request`: the request is malformed or breaks a rule (400), or is too large (413). - `conflict`: the request is valid and the current state refuses it (409). Before 2026-11-24 a 409 used `invalid_request`. - `unauthorized`: the key is missing, unknown, revoked, or expired (401). - `forbidden`: the key's scope or limit does not allow this, or the project's routing is locked (403). - `not_found`: no such resource or route (404). - `no_provider_key`: no stored credential can serve this request (422). - `all_providers_failed`: every vendor in the route was tried (502). - `provider_error`: a vendor failed and no fallback was possible (502). - `rate_limited`: too many requests (429). - `insufficient_quota`: a dollar `limit` on the key, or on a key above it, is spent (402). The name is OpenAI's. - `unavailable`: a dependency Meadow needs is not set up (503). - `internal`: Meadow failed (500), or the feature is not set up (501).
  - Allowed values: `invalid_request`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `no_provider_key`, `all_providers_failed`, `provider_error`, `rate_limited`, `insufficient_quota`, `unavailable`, `internal`
- `message` (string, required) — A sentence for people. It can change, so do not match on it.
- `code` (string, optional) — A stable name for the specific failure. Every Meadow error carries one. `type` stays the general class, and several codes share a type. Branch on `code` when you need to tell two failures of one type apart, for example `api_key_expired` from `api_key_revoked`. The full list is in the Errors guide. A new code can be added at any time, so treat a code you do not know as its `type`. A spent limit (`key_request_limit_exceeded`, `key_token_limit_exceeded`) stays a 403 and not a 429, so a client that retries a 429 does not resend a call a spent key can never make. A spent dollar `limit` (`key_spend_limit_exceeded`) is a 402 for the same reason.
- `param` (string, optional) — The request field, query parameter or header the error is about, when there is one. A nested field is written with dots, such as `credentials.api_key`. Set on most validation errors (400).
- `attempts` (list of Attempt, optional) — The vendors Meadow tried for this request, in order. Present only when it tried at least one.
- `retry` (enum, optional) — Whether to send the same request again. Set on routes under `/v1/sandboxes` only. The values are BoxRouter's (https://boxrouter.ai/docs/error-codes). - `safe`: send the same request again, after `retry-after` seconds when the response has that header. A 429, a 409 `exec_start_in_progress` or `idempotency_request_in_progress`, a 502 `sandbox_unreachable`, and a 5xx on a `GET`, `PUT` or `DELETE`, on `POST /v1/sandboxes/route`, or on a sandbox create or background command start sent with `Idempotency-Key`. - `after_fix`: change the request, the key or the account first. Any other 4xx. - `check_outcome`: read the sandbox or the command before you send it again, because the work may have happened. A 5xx on any other `POST`, which includes a blocking command. - `never`: do not send it again. A 501. When the response has `x-should-retry`, `retry` is `safe` exactly when the header is `true`.
  - Allowed values: `safe`, `after_fix`, `check_outcome`, `never`
- `outcome` (enum, optional) — What happened to the work. Set on routes under `/v1/sandboxes` only. The values are BoxRouter's (https://boxrouter.ai/docs/error-codes). - `not_started`: nothing was changed. Every 4xx, a 501, and a 502 `sandbox_unreachable`. - `unknown`: the work may have happened. Any other 5xx. - `completed` and `partial`: the work happened, in whole or in part. Meadow does not send them today. Handle them as `unknown`. A sandbox create that fails after Meadow accepted it is not an error response: the create returns 202, and the sandbox later has `status` `failed` and a `failure_reason`.
  - Allowed values: `not_started`, `completed`, `partial`, `unknown`

### ProjectUpdateRoutingModels

Defaults for model calls.

- `order` (list of enum, optional) — Providers to try first, in this order. Providers not named are still tried afterwards, in the default order. When neither the request nor the project sets it, Meadow uses the model's own vendor, then hosts (`azure`, `bedrock`, `vertex`, `fireworks`), then `openrouter`. Providers the account has no key for are skipped.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `only` (list of enum, optional) — Use only these providers. Others are never tried.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `ignore` (list of enum, optional) — Never use these providers.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `allow_fallbacks` (boolean, optional, default: true) — When false, only the first provider is tried, and the ids in `models` are not tried.
- `per_model` (map from string to ModelRouting, optional) — Overrides for one model, keyed by model id. A field set here replaces the same project-wide field for that model.

### SandboxRouting

Which sandbox providers may host a sandbox, and in what order. Send it as `provider` on `POST /v1/sandboxes`, or store it on a project as `routing.sandboxes`. A field set on the request replaces the same field from the project. A provider that cannot meet the request (GPU type, lifetime, network rule, private registry) is skipped and recorded in `attempts` as `unsupported`.

- `order` (list of enum, optional) — Providers to try, in this order. Default is the project's order, else `daytona` then `modal`.
  - Allowed values: `daytona`, `modal`
- `only` (list of enum, optional) — Use only these providers.
  - Allowed values: `daytona`, `modal`
- `allow_fallbacks` (boolean, optional, default: true) — When false, only the first provider is tried.
- `sort` (enum, optional) — Order the providers by a measure instead of by `order`. The values are OpenRouter's (https://openrouter.ai/docs/guides/routing/provider-selection.md). - `price`: lowest hourly list price of the size asked for first, from the price table `GET /v1/pricing` returns. A provider whose price is unknown goes last. - `latency`: shortest median create time first, over this account's last 20 creates each provider served in the past 24 hours, as October does. A provider with none goes last. A tie is broken by price. - `throughput`, OpenRouter's third value, has no meaning for a sandbox and returns 400. An `order` wins over `sort`: on the request, and on the project when the request sends neither. A request `sort` wins over the project's `order`. A sorted route is not a configured order: an open circuit breaker moves a provider to the end as it does on the automatic route.
  - Allowed values: `price`, `latency`
- `create_timeout_seconds` (integer, optional, default: 300) — How long to wait on one provider before trying the next, in seconds. The vendor sandbox is created with a lifetime that covers this wait, so a value above 3600 returns 400. A build of `image_id` that has to run first counts toward it. When neither the request nor the project sets it, the last provider in the route gets 300 seconds and each earlier one gets 120 seconds from the moment Meadow asks the vendor, so a slow provider is left sooner. That shorter wait is used only when a later provider can take over: it accepts this request and is not marked `open` in `sandbox_health`. It is not used for a GPU sandbox. Set this field to wait the same time on every provider.
- `options` (map from string to map from string to any, optional) — Vendor-specific settings, keyed by provider, for example `{"daytona": {"spot": true}}`. This is the only place vendor-specific settings appear. A provider's entry is ignored when another provider serves the request. On a request, the options for a provider replace the project's options for that provider. Meadow accepts a fixed set of keys for each provider and checks their types: * `daytona`: `spot`, `public`, `ephemeral`, `kvm` (booleans), `target`, `user` (strings), `language` (`python`, `javascript`, or `typescript`). * `modal`: `cloud` (string), `regions` (array of strings), `runtime` (`gvisor` or `vm`), `burst` (boolean). With `burst` true, `resources.cpu` and `resources.memory_mb` are only reserved and the sandbox may use more, as Modal's own default does. Left out or false, they are hard limits. Any other key returns 400, whichever provider would have served the request. The same check runs when a project is created or patched with `routing.sandboxes.options`, and that 400 names the project field. A setting that Meadow controls itself, such as the name, image, timeouts, or network rules, cannot be set here.

### ProjectRoutingModels

Defaults for model calls.

- `order` (list of enum, optional) — Providers to try first, in this order. Providers not named are still tried afterwards, in the default order. When neither the request nor the project sets it, Meadow uses the model's own vendor, then hosts (`azure`, `bedrock`, `vertex`, `fireworks`), then `openrouter`. Providers the account has no key for are skipped.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `only` (list of enum, optional) — Use only these providers. Others are never tried.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `ignore` (list of enum, optional) — Never use these providers.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `allow_fallbacks` (boolean, optional, default: true) — When false, only the first provider is tried, and the ids in `models` are not tried.
- `per_model` (map from string to ModelRouting, optional) — Overrides for one model, keyed by model id. A field set here replaces the same project-wide field for that model.

### Attempt

One try at one vendor, for a model call or a sandbox create.

- `provider` (enum, required) — The name of a vendor. Model providers and sandbox providers share one list. Model providers: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`. Sandbox providers: `daytona`, `modal`.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `outcome` (enum, required) — How the try ended. - `served`: this vendor served the request. - `unsupported`: the vendor cannot do what was asked, such as a resource size, a network rule, or a model it does not offer. - `refused`: the vendor rejected the request or the stored credential. - `no_capacity`: the vendor had no capacity. - `timeout`: the vendor did not answer in time. - `rate_limited`: the vendor answered 429. - `error`: any other failure.
  - Allowed values: `served`, `unsupported`, `refused`, `no_capacity`, `timeout`, `rate_limited`, `error`
- `reason` (enum, optional) — A stable code for why the try ended as it did. It is narrower than `outcome`, and it is the code to branch on or to count. More values can be added: treat one you do not know like `vendor_error`. - `served`: this vendor served the request. - `no_capacity`: the vendor had no capacity. - `quota_exceeded`: the vendor account is out of quota or credit. - `rate_limited`: the vendor answered 429. - `timeout`: the vendor did not answer in time. - `auth_failed`: the vendor rejected the stored vendor key. - `invalid_request`: the vendor rejected the request itself. - `refused`: the vendor refused for another reason. - `unsupported`: the vendor cannot do what was asked, such as a model, a GPU type, a size or a network rule. - `no_provider_key`: skipped, because no usable vendor key was stored. - `image_pull_failed`, `build_failed`: the vendor could not pull or build the image (sandboxes). - `provider_lost`: the vendor lost the sandbox while it was starting. - `vendor_error`: any other failure.
  - Allowed values: `served`, `no_capacity`, `quota_exceeded`, `rate_limited`, `timeout`, `auth_failed`, `invalid_request`, `refused`, `unsupported`, `no_provider_key`, `image_pull_failed`, `build_failed`, `provider_lost`, `vendor_error`
- `started_at` (datetime, optional) — When Meadow started this try. Absent on attempts recorded before 2026-11-24.
- `finished_at` (datetime, optional) — When this try ended.
- `detail` (string, optional) — A short description of what happened, written by Meadow, such as `provider returned HTTP 404`. On a `served` sandbox attempt it reports resources the vendor granted that differ from the request, such as `provider granted cpu 2 instead of 1.5` or `gpu type H200 instead of H100`. It says `provider built a copy of the image for this size` when this create made a new Daytona snapshot for an `image_id`. On an `unsupported` attempt it carries the vendor's size limit, such as `daytona cannot serve this size: CPU request 8 exceeds maximum allowed per sandbox (4)`. Absent when there is nothing to say.
- `duration_ms` (integer, optional) — How long the try took, in milliseconds.

### ModelRouting

Which model providers may serve a request, and in what order. Send it as `provider` on a model request, or store it on a project as `routing.models`. The field names follow OpenRouter's `provider` object. A field set on the request replaces the same field from the project. Fields the request leaves out keep the project's value. Every entry must be a model provider. An unknown field returns 400.

- `order` (list of enum, optional) — Providers to try first, in this order. Providers not named are still tried afterwards, in the default order. When neither the request nor the project sets it, Meadow uses the model's own vendor, then hosts (`azure`, `bedrock`, `vertex`, `fireworks`), then `openrouter`. Providers the account has no key for are skipped.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `only` (list of enum, optional) — Use only these providers. Others are never tried.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `ignore` (list of enum, optional) — Never use these providers.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `allow_fallbacks` (boolean, optional, default: true) — When false, only the first provider is tried, and the ids in `models` are not tried.

## Examples

### After the routing example

**Response**

```json
{
  "name": "evals",
  "id": "prj_000057e9",
  "restricted": true,
  "created_at": "2026-11-23T22:18:23.920Z",
  "webhook_url": null,
  "routing": {
    "models": {
      "order": [
        "google",
        "openrouter"
      ],
      "per_model": {
        "claude-haiku-4-5-20251001": {
          "only": [
            "anthropic"
          ]
        }
      }
    },
    "sandboxes": {
      "order": [
        "daytona",
        "modal"
      ],
      "create_timeout_seconds": 300
    },
    "lock": false
  }
}
```

**SDK Code**

```python After the routing example
import requests

url = "https://api.example.com/v1/projects/prj_000057e9"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript After the routing example
const url = 'https://api.example.com/v1/projects/prj_000057e9';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

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

```go After the routing example
package main

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

func main() {

	url := "https://api.example.com/v1/projects/prj_000057e9"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby After the routing example
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/projects/prj_000057e9")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java After the routing example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/projects/prj_000057e9")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php After the routing example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.example.com/v1/projects/prj_000057e9', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp After the routing example
using RestSharp;

var client = new RestClient("https://api.example.com/v1/projects/prj_000057e9");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift After the routing example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/projects/prj_000057e9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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

### After the rotate example (the secret is replaced here)

**Response**

```json
{
  "name": "evals",
  "id": "prj_000057e9",
  "restricted": true,
  "created_at": "2026-11-23T22:18:23.920Z",
  "webhook_url": null,
  "routing": {
    "models": {
      "order": [
        "google",
        "openrouter"
      ],
      "per_model": {
        "claude-haiku-4-5-20251001": {
          "only": [
            "anthropic"
          ]
        }
      }
    },
    "sandboxes": {
      "order": [
        "daytona",
        "modal"
      ],
      "create_timeout_seconds": 300
    },
    "lock": false
  },
  "webhook_secret": "whsec_REPLACED"
}
```

**SDK Code**

```python After the rotate example (the secret is replaced here)
import requests

url = "https://api.example.com/v1/projects/prj_000057e9"

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript After the rotate example (the secret is replaced here)
const url = 'https://api.example.com/v1/projects/prj_000057e9';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

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

```go After the rotate example (the secret is replaced here)
package main

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

func main() {

	url := "https://api.example.com/v1/projects/prj_000057e9"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby After the rotate example (the secret is replaced here)
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/projects/prj_000057e9")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java After the rotate example (the secret is replaced here)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/projects/prj_000057e9")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php After the rotate example (the secret is replaced here)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.example.com/v1/projects/prj_000057e9', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp After the rotate example (the secret is replaced here)
using RestSharp;

var client = new RestClient("https://api.example.com/v1/projects/prj_000057e9");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift After the rotate example (the secret is replaced here)
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/projects/prj_000057e9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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

### Rename and replace the routing object

**Request**

```json
{
  "name": "evals",
  "routing": {
    "models": {
      "order": [
        "google",
        "openrouter"
      ],
      "per_model": {
        "claude-haiku-4-5-20251001": {
          "only": [
            "anthropic"
          ]
        }
      }
    },
    "sandboxes": {
      "order": [
        "daytona",
        "modal"
      ],
      "create_timeout_seconds": 300
    },
    "lock": false
  }
}
```

**Response**

```json
{
  "name": "evals",
  "id": "prj_000057e9",
  "restricted": true,
  "created_at": "2026-11-23T22:18:23.920Z",
  "webhook_url": null,
  "routing": {
    "models": {
      "order": [
        "google",
        "openrouter"
      ],
      "per_model": {
        "claude-haiku-4-5-20251001": {
          "only": [
            "anthropic"
          ]
        }
      }
    },
    "sandboxes": {
      "order": [
        "daytona",
        "modal"
      ],
      "create_timeout_seconds": 300
    },
    "lock": false
  }
}
```

**SDK Code**

```python Rename and replace the routing object
import requests

url = "https://api.example.com/v1/projects/prj_000057e9"

payload = {
    "name": "evals",
    "routing": {
        "models": {
            "order": ["google", "openrouter"],
            "per_model": { "claude-haiku-4-5-20251001": { "only": ["anthropic"] } }
        },
        "sandboxes": {
            "order": ["daytona", "modal"],
            "create_timeout_seconds": 300
        },
        "lock": False
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Rename and replace the routing object
const url = 'https://api.example.com/v1/projects/prj_000057e9';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"evals","routing":{"models":{"order":["google","openrouter"],"per_model":{"claude-haiku-4-5-20251001":{"only":["anthropic"]}}},"sandboxes":{"order":["daytona","modal"],"create_timeout_seconds":300},"lock":false}}'
};

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

```go Rename and replace the routing object
package main

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

func main() {

	url := "https://api.example.com/v1/projects/prj_000057e9"

	payload := strings.NewReader("{\n  \"name\": \"evals\",\n  \"routing\": {\n    \"models\": {\n      \"order\": [\n        \"google\",\n        \"openrouter\"\n      ],\n      \"per_model\": {\n        \"claude-haiku-4-5-20251001\": {\n          \"only\": [\n            \"anthropic\"\n          ]\n        }\n      }\n    },\n    \"sandboxes\": {\n      \"order\": [\n        \"daytona\",\n        \"modal\"\n      ],\n      \"create_timeout_seconds\": 300\n    },\n    \"lock\": false\n  }\n}")

	req, _ := http.NewRequest("PATCH", 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 Rename and replace the routing object
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/projects/prj_000057e9")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"evals\",\n  \"routing\": {\n    \"models\": {\n      \"order\": [\n        \"google\",\n        \"openrouter\"\n      ],\n      \"per_model\": {\n        \"claude-haiku-4-5-20251001\": {\n          \"only\": [\n            \"anthropic\"\n          ]\n        }\n      }\n    },\n    \"sandboxes\": {\n      \"order\": [\n        \"daytona\",\n        \"modal\"\n      ],\n      \"create_timeout_seconds\": 300\n    },\n    \"lock\": false\n  }\n}"

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

```java Rename and replace the routing object
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/projects/prj_000057e9")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"evals\",\n  \"routing\": {\n    \"models\": {\n      \"order\": [\n        \"google\",\n        \"openrouter\"\n      ],\n      \"per_model\": {\n        \"claude-haiku-4-5-20251001\": {\n          \"only\": [\n            \"anthropic\"\n          ]\n        }\n      }\n    },\n    \"sandboxes\": {\n      \"order\": [\n        \"daytona\",\n        \"modal\"\n      ],\n      \"create_timeout_seconds\": 300\n    },\n    \"lock\": false\n  }\n}")
  .asString();
```

```php Rename and replace the routing object
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.example.com/v1/projects/prj_000057e9', [
  'body' => '{
  "name": "evals",
  "routing": {
    "models": {
      "order": [
        "google",
        "openrouter"
      ],
      "per_model": {
        "claude-haiku-4-5-20251001": {
          "only": [
            "anthropic"
          ]
        }
      }
    },
    "sandboxes": {
      "order": [
        "daytona",
        "modal"
      ],
      "create_timeout_seconds": 300
    },
    "lock": false
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Rename and replace the routing object
using RestSharp;

var client = new RestClient("https://api.example.com/v1/projects/prj_000057e9");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"evals\",\n  \"routing\": {\n    \"models\": {\n      \"order\": [\n        \"google\",\n        \"openrouter\"\n      ],\n      \"per_model\": {\n        \"claude-haiku-4-5-20251001\": {\n          \"only\": [\n            \"anthropic\"\n          ]\n        }\n      }\n    },\n    \"sandboxes\": {\n      \"order\": [\n        \"daytona\",\n        \"modal\"\n      ],\n      \"create_timeout_seconds\": 300\n    },\n    \"lock\": false\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Rename and replace the routing object
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "evals",
  "routing": [
    "models": [
      "order": ["google", "openrouter"],
      "per_model": ["claude-haiku-4-5-20251001": ["only": ["anthropic"]]]
    ],
    "sandboxes": [
      "order": ["daytona", "modal"],
      "create_timeout_seconds": 300
    ],
    "lock": false
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/projects/prj_000057e9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```

### Rotate the webhook secret

**Request**

```json
{
  "rotate_webhook_secret": true
}
```

**Response**

```json
{
  "name": "evals",
  "id": "prj_000057e9",
  "restricted": true,
  "created_at": "2026-11-23T22:18:23.920Z",
  "webhook_url": null,
  "routing": {
    "models": {
      "order": [
        "google",
        "openrouter"
      ],
      "per_model": {
        "claude-haiku-4-5-20251001": {
          "only": [
            "anthropic"
          ]
        }
      }
    },
    "sandboxes": {
      "order": [
        "daytona",
        "modal"
      ],
      "create_timeout_seconds": 300
    },
    "lock": false
  }
}
```

**SDK Code**

```python Rotate the webhook secret
import requests

url = "https://api.example.com/v1/projects/prj_000057e9"

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

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

print(response.json())
```

```javascript Rotate the webhook secret
const url = 'https://api.example.com/v1/projects/prj_000057e9';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"rotate_webhook_secret":true}'
};

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

```go Rotate the webhook secret
package main

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

func main() {

	url := "https://api.example.com/v1/projects/prj_000057e9"

	payload := strings.NewReader("{\n  \"rotate_webhook_secret\": true\n}")

	req, _ := http.NewRequest("PATCH", 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 Rotate the webhook secret
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/projects/prj_000057e9")

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

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

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

```java Rotate the webhook secret
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/projects/prj_000057e9")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"rotate_webhook_secret\": true\n}")
  .asString();
```

```php Rotate the webhook secret
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.example.com/v1/projects/prj_000057e9', [
  'body' => '{
  "rotate_webhook_secret": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Rotate the webhook secret
using RestSharp;

var client = new RestClient("https://api.example.com/v1/projects/prj_000057e9");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"rotate_webhook_secret\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Rotate the webhook secret
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/projects/prj_000057e9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```