# pet.trezy.setPreferences

> Published by [trezy.pet](https://lexicon.garden/identity/did:plc:ollch4g7tes2reb5eceiwuol)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.setPreferences)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.setPreferences/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.setPreferences/examples)

## Definitions

### `pet.trezy.setPreferences`

**Type**: `procedure`

Save a text style, either for the whole account or for one device. ⚠ `scope` IS REQUIRED AND HAS NO DEFAULT. Guessing it is the one mistake that cannot be undone by guessing again: silently defaulting to `account` changes the typeface on every device somebody owns when they meant to change one, and silently defaulting to `device` leaves them wondering why their laptop never followed. The client always knows which the player asked for, because the player was asked.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `label` | `string` | No |  |
| `scope` | `string` | Yes | `account` writes the account-wide default AND deletes this device's override, so the device the player is holding actually follows the choice they just made. `device` writes an override for `deviceId` alone and leaves the account default untouched. |
| `deviceId` | `string` | No | Required for `device` scope; optional for `account`, where supplying it clears this device's override. Opaque — the client generates it and it must carry nothing about the device or the person. |
| `typeMode` | `string` | No |  |
| `fingerprint` | `string` | No |  |
| `typeOffered` | `boolean` | No | Account-scope only. Refused with `device`, because being told about pixel type is a fact about a person and storing it per-device would re-arm the notice on every new device. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `string` | No | A stable machine code the client branches on — add codes, never rename them. |
| `message` | `string` | No |  |
| `typeMode` | `string` | No |  |
| `updatedAt` | `string` (datetime) | No |  |
| `typeOffered` | `boolean` | No |  |

## Raw Schema

```json
{
  "id": "pet.trezy.setPreferences",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "scope"
          ],
          "properties": {
            "label": {
              "type": "string",
              "maxLength": 60
            },
            "scope": {
              "type": "string",
              "description": "`account` writes the account-wide default AND deletes this device's override, so the device the player is holding actually follows the choice they just made. `device` writes an override for `deviceId` alone and leaves the account default untouched.",
              "knownValues": [
                "account",
                "device"
              ]
            },
            "deviceId": {
              "type": "string",
              "maxLength": 64,
              "description": "Required for `device` scope; optional for `account`, where supplying it clears this device's override. Opaque — the client generates it and it must carry nothing about the device or the person."
            },
            "typeMode": {
              "type": "string",
              "knownValues": [
                "pixel",
                "softer",
                "system"
              ]
            },
            "fingerprint": {
              "type": "string",
              "maxLength": 64
            },
            "typeOffered": {
              "type": "boolean",
              "description": "Account-scope only. Refused with `device`, because being told about pixel type is a fact about a person and storing it per-device would re-arm the notice on every new device."
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [],
          "properties": {
            "error": {
              "type": "string",
              "description": "A stable machine code the client branches on — add codes, never rename them.",
              "knownValues": [
                "not-authenticated",
                "invalid-scope",
                "invalid-mode",
                "device-required",
                "offered-is-account-scope",
                "nothing-to-do",
                "save-failed"
              ]
            },
            "message": {
              "type": "string"
            },
            "typeMode": {
              "type": "string",
              "knownValues": [
                "pixel",
                "softer",
                "system"
              ]
            },
            "updatedAt": {
              "type": "string",
              "format": "datetime"
            },
            "typeOffered": {
              "type": "boolean"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Save a text style, either for the whole account or for one device. ⚠ `scope` IS REQUIRED AND HAS NO DEFAULT. Guessing it is the one mistake that cannot be undone by guessing again: silently defaulting to `account` changes the typeface on every device somebody owns when they meant to change one, and silently defaulting to `device` leaves them wondering why their laptop never followed. The client always knows which the player asked for, because the player was asked."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
