# tools.ozone.setting.upsertOption

> Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.setting.upsertOption)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.setting.upsertOption/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.setting.upsertOption/examples)

## Definitions

### `tools.ozone.setting.upsertOption`

**Type**: `procedure`

Create or update setting option

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `key` | `string` (nsid) | Yes |  |
| `scope` | `string` | Yes |  |
| `value` | `unknown` | Yes |  |
| `description` | `string` | No |  |
| `managerRole` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `option` | `ref` → `tools.ozone.setting.defs#option` | Yes |  |

## Raw Schema

```json
{
  "id": "tools.ozone.setting.upsertOption",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "key",
            "scope",
            "value"
          ],
          "properties": {
            "key": {
              "type": "string",
              "format": "nsid"
            },
            "scope": {
              "type": "string",
              "knownValues": [
                "instance",
                "personal"
              ]
            },
            "value": {
              "type": "unknown"
            },
            "description": {
              "type": "string",
              "maxLength": 2000
            },
            "managerRole": {
              "type": "string",
              "knownValues": [
                "tools.ozone.team.defs#roleModerator",
                "tools.ozone.team.defs#roleTriage",
                "tools.ozone.team.defs#roleVerifier",
                "tools.ozone.team.defs#roleAdmin"
              ]
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "option"
          ],
          "properties": {
            "option": {
              "ref": "tools.ozone.setting.defs#option",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Create or update setting option"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
