# ai.newnal.illi.mydata.setItemState

> Root or main admin marks a question skipped or 'not sure', or clears that mark. Refused with ItemHasValue when a value exists for the question.

- Kind: procedure
- Authority: mydata.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.mydata.setItemState)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.mydata.setItemState/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.mydata.setItemState/analytics)

## Procedure (`ai.newnal.illi.mydata.setItemState`)

Type: procedure · POST

### Input (application/json)

- `homeId` (string · tid, required)
- `itemKey` (string, required)
  - Constraints: maxLength: 100
- `slot` (integer, required): The parent slot, 1 or 2.
  - Constraints: minimum: 1, maximum: 2
- `state` (string, required)
  - Constraints: knownValues: skipped | notSure | none | clear

### Output (application/json)

- `items` (array, required)
  - `items` (ref)
    - Reference: `ai.newnal.illi.mydata.defs#itemState`

### Errors

- `NotMember`: No description in schema.
- `NotAdmin`: No description in schema.
- `HomeNotFound`: No description in schema.
- `ItemHasValue`: No description in schema.
- `PdsUnavailable`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Root or main admin marks a question skipped or 'not sure', or clears that mark. Refused with ItemHasValue when a value exists for the question.",
      "errors": [
        {
          "name": "NotMember"
        },
        {
          "name": "NotAdmin"
        },
        {
          "name": "HomeNotFound"
        },
        {
          "name": "ItemHasValue"
        },
        {
          "name": "PdsUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "homeId": {
              "format": "tid",
              "type": "string"
            },
            "itemKey": {
              "maxLength": 100,
              "type": "string"
            },
            "slot": {
              "description": "The parent slot, 1 or 2.",
              "maximum": 2,
              "minimum": 1,
              "type": "integer"
            },
            "state": {
              "knownValues": [
                "skipped",
                "notSure",
                "none",
                "clear"
              ],
              "type": "string"
            }
          },
          "required": [
            "homeId",
            "slot",
            "itemKey",
            "state"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "items": {
              "items": {
                "ref": "ai.newnal.illi.mydata.defs#itemState",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "items"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.mydata.setItemState",
  "lexicon": 1
}
```
