# tools.umbrae.community.leave

> Leave a community, withdraw a request, or decline an invitation. Leaving takes the caller's posts out of the community, as removal does. 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. Any managing app may serve it: a serving app, or a PDS that manages its own communities.

- Kind: procedure
- Authority: community.umbrae.tools
- Lexicon: 1
- Published by [lexicons.umbrae.tools](https://lexicon.garden/identity/did:plc:656sqbhftme2qbyjtcc2q6jk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:656sqbhftme2qbyjtcc2q6jk/tools.umbrae.community.leave)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:656sqbhftme2qbyjtcc2q6jk/tools.umbrae.community.leave/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:656sqbhftme2qbyjtcc2q6jk/tools.umbrae.community.leave/analytics)

## Procedure (`tools.umbrae.community.leave`)

Type: procedure · POST

### Input (application/json)

- `key` (string, required): The community's key within this app.
  - Constraints: minLength: 1, maxLength: 63

### Output (application/json)


### Errors

- `CommunityNotFound`: Not a community this managing app manages.
- `NotAllowed`: The caller lacks the role this needs.
- `NotAdmitted`: The managing app doesn't admit this account.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Leave a community, withdraw a request, or decline an invitation. Leaving takes the caller's posts out of the community, as removal does. 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. 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": {
            "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.leave",
  "lexicon": 1
}
```
