{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Add members to a private instance of a frame app, or change whether they write, as its authority (com.atproto.memberspace.putMembers on their own PDS): each named by handle or DID, resolved to their DID, to read it, and to write in it where write says so. Requires auth, as the instance's authority: 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": "The input is not what the method takes, or a handle that names no one.",
          "name": "InvalidRequest"
        },
        {
          "description": "It was deleted.",
          "name": "NotFound"
        },
        {
          "description": "The person is not its authority: only who made it adds people.",
          "name": "Forbidden"
        },
        {
          "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 or could not be reached; or their sign-in does not allow HUD's private instances, which the message says: sign in again.",
          "name": "UpstreamFailure"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "instance": {
              "description": "The instance's space, at:space/<authority DID>/place.hud.app.instance/<key>.",
              "format": "at-uri",
              "type": "string"
            },
            "members": {
              "items": {
                "ref": "#member",
                "type": "ref"
              },
              "maxLength": 100,
              "minLength": 1,
              "type": "array"
            }
          },
          "required": [
            "instance",
            "members"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "place.hud.getInstance#instance",
          "type": "ref"
        }
      },
      "type": "procedure"
    },
    "member": {
      "description": "Someone to have in it.",
      "properties": {
        "actor": {
          "description": "Who, by handle or DID.",
          "format": "at-identifier",
          "type": "string"
        },
        "write": {
          "description": "Whether they write in it; else they read it alone.",
          "type": "boolean"
        }
      },
      "required": [
        "actor",
        "write"
      ],
      "type": "object"
    }
  },
  "description": "Add people to a private instance, or change what they may do.",
  "id": "place.hud.putInstanceMembers",
  "lexicon": 1
}
