# Save defaults

Source: <https://everruns.com/docs/api/operations/save_defaults/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Operations & billing](https://everruns.com/docs/api/groups/operations-billing/)/Save defaults

# Save defaults

Preview

Operate durable execution, schedules, sandbox infrastructure, budgets, payments and audit logs.

Public APIEverruns Cloud and self-hosted Platform

PUT`/v1/tracing/defaults`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Request Bodyrequired

Media typeapplication/json

Save routing only when the supplied revision still matches the current policy.

object

**policy**

required

Routing mode and the organization-owned destination selections to save.

object

**destination_ids**

Distinct destination identifiers from this organization; at most eight selections.

Array\<string>

**mode**

Use organization defaults, add selections, replace defaults, or disable customer exports.

string

Allowed values: inherit add replace off

**revision**

required

Current revision used to reject stale saves and deletes.

integer format: int64

### Example

```json
1
```

## Responses

200

### 200

Media typeapplication/json

Current routing policy and the revision required for a guarded save.

object

**policy**

required

Routing mode and the organization-owned destination selections to save.

object

**destination_ids**

Distinct destination identifiers from this organization; at most eight selections.

Array\<string>

**mode**

Use organization defaults, add selections, replace defaults, or disable customer exports.

string

Allowed values: inherit add replace off

**revision**

required

Current revision used to reject stale saves and deletes.

integer format: int64

### Example

```json
{
  "policy": {
    "mode": "inherit"
  },
  "revision": 1
}
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/tracing/defaults';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: '{"policy":{"destination_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"mode":"inherit"},"revision":1}'
};


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

Request

```sh
curl --request PUT \
  --url https://app.everruns.com/api/v1/tracing/defaults \
  --header 'Content-Type: application/json' \
  --data '{ "policy": { "destination_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "mode": "inherit" }, "revision": 1 }'
```

Additional language examples require JavaScript. The default request example is available above.

200

200 ·

```json
{
  "policy": {
    "destination_ids": [
      "string"
    ],
    "mode": "inherit"
  },
  "revision": 1
}
```

## Matching endpoints