# social.colibri.beta.community.leave

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.leave)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.leave/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.leave/examples)

## Definitions

### `social.colibri.beta.community.leave`

**Type**: `procedure`

Removes the requesting user's membership in a community.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (did) | Yes | The community to leave. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **CommunityNotFound**: No community exists with that DID.
- **MemberNotFound**: The requesting user does not hold a member record in this community.
- **SoleOwner**: The requesting user is the last holder of a protected role and cannot leave.
- **CredentialsUnavailable**: The AppView's stored credentials for this community are missing or unusable.

## Raw Schema

```json
{
  "id": "social.colibri.beta.community.leave",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community"
          ],
          "properties": {
            "community": {
              "type": "string",
              "format": "did",
              "description": "The community to leave."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request is missing, malformed, or unverifiable service auth."
        },
        {
          "name": "CommunityNotFound",
          "description": "No community exists with that DID."
        },
        {
          "name": "MemberNotFound",
          "description": "The requesting user does not hold a member record in this community."
        },
        {
          "name": "SoleOwner",
          "description": "The requesting user is the last holder of a protected role and cannot leave."
        },
        {
          "name": "CredentialsUnavailable",
          "description": "The AppView's stored credentials for this community are missing or unusable."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [],
          "properties": {}
        },
        "encoding": "application/json"
      },
      "description": "Removes the requesting user's membership in a community."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
