{
  "$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
}
