# work.lexical.rating

> Published by [lexical.work](https://lexicon.garden/identity/did:plc:6acm263n23glqje6xrd2mgbt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:6acm263n23glqje6xrd2mgbt/work.lexical.rating)
- [Documentation](https://lexicon.garden/lexicon/did:plc:6acm263n23glqje6xrd2mgbt/work.lexical.rating/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:6acm263n23glqje6xrd2mgbt/work.lexical.rating/examples)

## Definitions

### `work.lexical.rating`

**Type**: `record`

A record representing a rating of a work.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `work` | `string` (at-uri) | Yes | AT URI of the work being rated. |
| `value` | `integer` | Yes | The rating value, from 0 to 10. |
| `action` | `string` (at-uri) | No | AT URI of the action this rating is tied to. |
| `ratedAt` | `string` (datetime) | No | When the rating was made. Optional; clients may inherit from the linked action if absent. |

## Raw Schema

```json
{
  "id": "work.lexical.rating",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "work",
          "value"
        ],
        "properties": {
          "work": {
            "type": "string",
            "format": "at-uri",
            "required": true,
            "maxLength": 2048,
            "description": "AT URI of the work being rated."
          },
          "value": {
            "type": "integer",
            "maximum": 10,
            "minimum": 0,
            "required": true,
            "description": "The rating value, from 0 to 10."
          },
          "action": {
            "type": "string",
            "format": "at-uri",
            "maxLength": 2048,
            "description": "AT URI of the action this rating is tied to."
          },
          "ratedAt": {
            "type": "string",
            "format": "datetime",
            "maxLength": 64,
            "description": "When the rating was made. Optional; clients may inherit from the linked action if absent."
          }
        }
      },
      "description": "A record representing a rating of a work."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
