# place.hud.getChatApp

> A version of an app artifact of one of the person's chats, as getAppPreview answers a preview: by is the person, url its document, /frame/chat/<chat>/<key>/<version>, run as a preview is (its entries read, never written). Requires auth: the workspace's web session (its cookie) or a HUD access token as Bearer.

- Kind: query
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getChatApp)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getChatApp/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.getChatApp/analytics)

## Query (`place.hud.getChatApp`)

Type: query · GET

### Parameters (query string)

- `artifact` (string, required): The artifact's key.
  - Constraints: minLength: 1, maxLength: 40
- `chat` (string, required)
  - Constraints: minLength: 12, maxLength: 12
- `lang` (string): The language its words are wanted in, as en or pt-BR.
  - Constraints: maxLength: 35
- `version` (integer): Its version; its latest by default.
  - Constraints: minimum: 1

### Output (application/json)

- `accept` (array): The files its kinds take, as place.hud.getFrameApp answers them; left out where it takes none.
  - `items` (ref)
    - Reference: `place.hud.getFrameApp#file`
- `app` (string · at-uri): The published app it would replace, whose entries it reads, if any.
- `by` (ref, required): Who made it.
  - Reference: `place.hud.defs#actor`
- `icon` (string · uri): Its icon's address, through HUD's blob proxy.
- `kinds` (array, required): Its kinds of entry, each one place.hud.createAppEntry writes.
  - `items` (ref)
    - Reference: `place.hud.getFrameApp#kind`
- `name` (string, required)
  - Constraints: maxLength: 64
- `origins` (array): The origins it loads pictures and audio from, as place.hud.getFrameApp answers them; left out where it names none.
  - Constraints: maxLength: 8
  - `items` (ref)
    - Reference: `place.hud.app#origin`
- `reads` (array): The public collections it reads beyond its entries, as place.hud.getFrameApp answers them; left out where it names none.
  - Constraints: maxLength: 16
  - `items` (ref)
    - Reference: `place.hud.app#collection`
- `summary` (string)
  - Constraints: maxLength: 300
- `url` (string, required): Its document's path on this server, /frame/preview/<id>.
  - Constraints: maxLength: 128
- `words` (unknown, required): Its words in the language asked for, each it lacks in English: an object of {text, note} by key.
- `writers` (array): Who may write its entries, as place.hud.getFrameApp answers them; left out where anyone may.
  - Constraints: maxLength: 200
  - `items` (ref)
    - Reference: `place.hud.defs#actor`
- `writes` (array): The collections it writes beyond its entries, as place.hud.getFrameApp answers them; left out where it names none.
  - Constraints: maxLength: 8
  - `items` (ref)
    - Reference: `place.hud.app#collection`

### Errors

- `NotFound`: No chat of this id is the person's, or it has no such app or version.
- `AuthRequired`: No live web session or HUD access token: sign in.
- `UpstreamFailure`: The person's PDS, where the chat is kept, could not be read.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A version of an app artifact of one of the person's chats, as getAppPreview answers a preview: by is the person, url its document, /frame/chat/<chat>/<key>/<version>, run as a preview is (its entries read, never written). Requires auth: the workspace's web session (its cookie) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "No chat of this id is the person's, or it has no such app or version.",
          "name": "NotFound"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        },
        {
          "description": "The person's PDS, where the chat is kept, could not be read.",
          "name": "UpstreamFailure"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "accept": {
              "description": "The files its kinds take, as place.hud.getFrameApp answers them; left out where it takes none.",
              "items": {
                "ref": "place.hud.getFrameApp#file",
                "type": "ref"
              },
              "type": "array"
            },
            "app": {
              "description": "The published app it would replace, whose entries it reads, if any.",
              "format": "at-uri",
              "type": "string"
            },
            "by": {
              "description": "Who made it.",
              "ref": "place.hud.defs#actor",
              "type": "ref"
            },
            "icon": {
              "description": "Its icon's address, through HUD's blob proxy.",
              "format": "uri",
              "type": "string"
            },
            "kinds": {
              "description": "Its kinds of entry, each one place.hud.createAppEntry writes.",
              "items": {
                "ref": "place.hud.getFrameApp#kind",
                "type": "ref"
              },
              "type": "array"
            },
            "name": {
              "maxLength": 64,
              "type": "string"
            },
            "origins": {
              "description": "The origins it loads pictures and audio from, as place.hud.getFrameApp answers them; left out where it names none.",
              "items": {
                "ref": "place.hud.app#origin",
                "type": "ref"
              },
              "maxLength": 8,
              "type": "array"
            },
            "reads": {
              "description": "The public collections it reads beyond its entries, as place.hud.getFrameApp answers them; left out where it names none.",
              "items": {
                "ref": "place.hud.app#collection",
                "type": "ref"
              },
              "maxLength": 16,
              "type": "array"
            },
            "summary": {
              "maxLength": 300,
              "type": "string"
            },
            "url": {
              "description": "Its document's path on this server, /frame/preview/<id>.",
              "maxLength": 128,
              "type": "string"
            },
            "words": {
              "description": "Its words in the language asked for, each it lacks in English: an object of {text, note} by key.",
              "type": "unknown"
            },
            "writers": {
              "description": "Who may write its entries, as place.hud.getFrameApp answers them; left out where anyone may.",
              "items": {
                "ref": "place.hud.defs#actor",
                "type": "ref"
              },
              "maxLength": 200,
              "type": "array"
            },
            "writes": {
              "description": "The collections it writes beyond its entries, as place.hud.getFrameApp answers them; left out where it names none.",
              "items": {
                "ref": "place.hud.app#collection",
                "type": "ref"
              },
              "maxLength": 8,
              "type": "array"
            }
          },
          "required": [
            "name",
            "by",
            "kinds",
            "url",
            "words"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "artifact": {
            "description": "The artifact's key.",
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          },
          "chat": {
            "maxLength": 12,
            "minLength": 12,
            "type": "string"
          },
          "lang": {
            "description": "The language its words are wanted in, as en or pt-BR.",
            "maxLength": 35,
            "type": "string"
          },
          "version": {
            "description": "Its version; its latest by default.",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "chat",
          "artifact"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "An app a chat made, as its page shows it.",
  "id": "place.hud.getChatApp",
  "lexicon": 1
}
```
