{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Tell the app that the caller's own community space exists. A writer's client creates the space (a tools.umbrae.space at the community's key, with a published managed policy naming this app) before its first write there, then calls this. The app syncs it at once and registers for update notifications. Writers only, and rate-limited per caller. Served by the community's managing app, at the service its ref's app names, with atproto service auth (iss the caller, aud the app, lxm this method); clients call through their PDS with atproto-proxy set to the ref's app.",
      "errors": [
        {
          "description": "Not a community this managing app manages.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The caller lacks the role this needs.",
          "name": "NotAllowed"
        },
        {
          "description": "The managing app doesn't admit this account.",
          "name": "NotAdmitted"
        },
        {
          "description": "The caller's community space doesn't exist, or fails the policy check: a published managed policy naming this app.",
          "name": "SpaceNotFound"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "key": {
              "description": "The community's key within this app.",
              "maxLength": 63,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "key"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "required": [],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.umbrae.community.registerSpace",
  "lexicon": 1
}
