# pet.trezy.createInteraction

> 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.createInteraction)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.createInteraction/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.createInteraction/examples)

## Definitions

### `pet.trezy.createInteraction`

**Type**: `procedure`

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `pet` | `string` (at-uri) | Yes |  |
| `drop` | `string` | No | The rkey of a pet.trezy.foodDrop being consumed by this feed. OPTIONAL: petting carries none, and neither does a feed from the legacy button. ⚠ THE MORSEL IS DELETED ONLY AFTER THE ACTIVITY RECORD HAS SAVED, never before. Deleting first would let a refused feed take the food with it — which the player would experience as theft, with no error anywhere to explain where their morsel went. |
| `type` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | No |  |
| `error` | `string` | No | Present instead of uri/createdAt when the interaction was refused for an expected reason. A stable machine code the client branches on — add codes, never rename them. |
| `message` | `string` | No | A sentence to show the player, accompanying `error`. Free to reword; do not branch on it. |
| `createdAt` | `string` (datetime) | No |  |

## Raw Schema

```json
{
  "id": "pet.trezy.createInteraction",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "type",
            "pet"
          ],
          "properties": {
            "pet": {
              "type": "string",
              "format": "at-uri"
            },
            "drop": {
              "type": "string",
              "description": "The rkey of a pet.trezy.foodDrop being consumed by this feed. OPTIONAL: petting carries none, and neither does a feed from the legacy button. ⚠ THE MORSEL IS DELETED ONLY AFTER THE ACTIVITY RECORD HAS SAVED, never before. Deleting first would let a refused feed take the food with it — which the player would experience as theft, with no error anywhere to explain where their morsel went."
            },
            "type": {
              "type": "string",
              "knownValues": [
                "feed",
                "pet"
              ]
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri"
            },
            "error": {
              "type": "string",
              "description": "Present instead of uri/createdAt when the interaction was refused for an expected reason. A stable machine code the client branches on — add codes, never rename them.",
              "knownValues": [
                "invalid-type",
                "not-your-pet",
                "cooldown"
              ]
            },
            "message": {
              "type": "string",
              "description": "A sentence to show the player, accompanying `error`. Free to reword; do not branch on it."
            },
            "createdAt": {
              "type": "string",
              "format": "datetime"
            }
          }
        },
        "encoding": "application/json"
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
