{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Invite an account; one that already asked becomes a member. Re-invites a removed account. Moderators only: the community account and the accounts its managing app names. Served by the managing app named in the community space's policy, at its #umbrae_app endpoint, with atproto service auth (iss the caller, aud the managing app, lxm this method); clients call through their PDS with atproto-proxy set to the policy's managingApp. Any managing app may serve it: a serving app, or a PDS that manages its own communities.",
      "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"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "description": "The community account's DID.",
              "format": "did",
              "type": "string"
            },
            "did": {
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "community",
            "did"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "state": {
              "knownValues": [
                "invited",
                "member"
              ],
              "type": "string"
            }
          },
          "required": [
            "state"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.umbrae.community.invite",
  "lexicon": 1
}
