# link.latr.saved.setState

> Published by [samclemente.me](https://lexicon.garden/identity/did:plc:qy5pluw2bsuq2x6albsgkvx3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/link.latr.saved.setState)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/link.latr.saved.setState/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/link.latr.saved.setState/examples)

## Definitions

### `link.latr.saved.setState`

**Type**: `procedure`

L@tr XRPC method link.latr.saved.setState.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `state` | `string` | Yes |  |
| `itemRkey` | `string` (record-key) | Yes |  |

#### Output

**Encoding**: `application/json`

#### Errors

- **InvalidRequest**
- **InvalidUrl**
- **AuthRequired**
- **InvalidToken**
- **InvalidDpop**
- **ClientAuthRequired**
- **SavedItemNotFound**
- **Conflict**
- **RateLimitExceeded**
- **UpstreamFailure**

## Raw Schema

```json
{
  "id": "link.latr.saved.setState",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "itemRkey",
            "state"
          ],
          "properties": {
            "state": {
              "enum": [
                "unread",
                "archived"
              ],
              "type": "string",
              "maxLength": 16,
              "maxGraphemes": 16
            },
            "itemRkey": {
              "type": "string",
              "format": "record-key",
              "maxLength": 512
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "InvalidUrl"
        },
        {
          "name": "AuthRequired"
        },
        {
          "name": "InvalidToken"
        },
        {
          "name": "InvalidDpop"
        },
        {
          "name": "ClientAuthRequired"
        },
        {
          "name": "SavedItemNotFound"
        },
        {
          "name": "Conflict"
        },
        {
          "name": "RateLimitExceeded"
        },
        {
          "name": "UpstreamFailure"
        }
      ],
      "output": {
        "schema": {
          "ref": "link.latr.saved.defs#simpleOk",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "description": "L@tr XRPC method link.latr.saved.setState."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
