# pub.chive.discovery.recordInteraction

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.recordInteraction)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.recordInteraction/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.recordInteraction/examples)

## Definitions

### `pub.chive.discovery.recordInteraction`

**Type**: `procedure`

Record a user interaction with a recommendation for the feedback loop. Used to improve personalization over time.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes | Type of interaction: view (viewed detail page), click (clicked recommendation), endorse (endorsed paper), dismiss (dismissed recommendation), claim (claimed authorship) |
| `eprintUri` | `string` (at-uri) | Yes | AT-URI of the eprint |
| `recommendationId` | `string` | No | ID of the recommendation that led to this interaction |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `recorded` | `boolean` | Yes | Whether the interaction was successfully recorded |

#### Errors

- **AuthenticationRequired**

## Raw Schema

```json
{
  "id": "pub.chive.discovery.recordInteraction",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "eprintUri",
            "type"
          ],
          "properties": {
            "type": {
              "type": "string",
              "description": "Type of interaction: view (viewed detail page), click (clicked recommendation), endorse (endorsed paper), dismiss (dismissed recommendation), claim (claimed authorship)",
              "knownValues": [
                "view",
                "click",
                "endorse",
                "dismiss",
                "claim"
              ]
            },
            "eprintUri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the eprint"
            },
            "recommendationId": {
              "type": "string",
              "description": "ID of the recommendation that led to this interaction"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthenticationRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "recorded"
          ],
          "properties": {
            "recorded": {
              "type": "boolean",
              "description": "Whether the interaction was successfully recorded"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Record a user interaction with a recommendation for the feedback loop. Used to improve personalization over time."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
