# place.hud.createAppEntry

> Write a place.hud.app.entry in the person's own repository for a frame app, its data checked against the app's def of its kind first, once they have allowed HUD's apps to save entries (place.hud.allowAppEntries). With instance, in their own repo in a private instance of the app instead (com.atproto.space.createRecord), as one of its writable members. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin) or a HUD access token as Bearer.

- Kind: procedure
- 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.createAppEntry)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.createAppEntry/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.createAppEntry/analytics)

## Procedure (`place.hud.createAppEntry`)

Type: procedure · POST

### Input (application/json)

- `app` (string · at-uri, required): The app's place.hud.app record.
- `data` (unknown, required): The entry, an object as the app's def of its kind describes it.
- `instance` (string · at-uri): A private instance of the app (at:space/<authority DID>/place.hud.app.instance/<key>), to write the entry in.
- `kind` (string, required): Which of its kinds of entry.
  - Constraints: maxLength: 64

### Output (application/json)

- `cid` (string · cid, required)
- `uri` (string · at-uri, required)

### Errors

- `NotFound`: HUD has no frame app of this id, or it has no kind of entry so named.
- `NotAMember`: With instance: the person is not one of its members, or there is no such instance.
- `CannotRead`: With instance: the person's PDS gives no delegation token to read it with.
- `InvalidRequest`: The data is not as the app's def of its kind says, or the input is not what the method takes.
- `ConsentRequired`: The person has not allowed HUD's apps to save entries: ask them, then place.hud.allowAppEntries.
- `NotAWriter`: The app names its writers, and the person is none of them.
- `AuthRequired`: No live web session or HUD access token, or the person's sign-in at their PDS ended: sign in.
- `UpstreamFailure`: Their PDS refused the write; or they signed in before HUD asked to write entries, which the message says: sign in again.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Write a place.hud.app.entry in the person's own repository for a frame app, its data checked against the app's def of its kind first, once they have allowed HUD's apps to save entries (place.hud.allowAppEntries). With instance, in their own repo in a private instance of the app instead (com.atproto.space.createRecord), as one of its writable members. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "HUD has no frame app of this id, or it has no kind of entry so named.",
          "name": "NotFound"
        },
        {
          "description": "With instance: the person is not one of its members, or there is no such instance.",
          "name": "NotAMember"
        },
        {
          "description": "With instance: the person's PDS gives no delegation token to read it with.",
          "name": "CannotRead"
        },
        {
          "description": "The data is not as the app's def of its kind says, or the input is not what the method takes.",
          "name": "InvalidRequest"
        },
        {
          "description": "The person has not allowed HUD's apps to save entries: ask them, then place.hud.allowAppEntries.",
          "name": "ConsentRequired"
        },
        {
          "description": "The app names its writers, and the person is none of them.",
          "name": "NotAWriter"
        },
        {
          "description": "No live web session or HUD access token, or the person's sign-in at their PDS ended: sign in.",
          "name": "AuthRequired"
        },
        {
          "description": "Their PDS refused the write; or they signed in before HUD asked to write entries, which the message says: sign in again.",
          "name": "UpstreamFailure"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "app": {
              "description": "The app's place.hud.app record.",
              "format": "at-uri",
              "type": "string"
            },
            "data": {
              "description": "The entry, an object as the app's def of its kind describes it.",
              "type": "unknown"
            },
            "instance": {
              "description": "A private instance of the app (at:space/<authority DID>/place.hud.app.instance/<key>), to write the entry in.",
              "format": "at-uri",
              "type": "string"
            },
            "kind": {
              "description": "Which of its kinds of entry.",
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "app",
            "kind",
            "data"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri",
            "cid"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Save an entry for a frame app.",
  "id": "place.hud.createAppEntry",
  "lexicon": 1
}
```
