# com.getorbyt.community.beginDeletion

> Published by [getorbyt.com](https://lexicon.garden/identity/did:plc:2xrqztnmzlckb3xfuuukupso)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.beginDeletion)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.beginDeletion/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.beginDeletion/examples)

## Definitions

### `com.getorbyt.community.beginDeletion`

**Type**: `procedure`

Begins permanent deletion for an unpublished Community and returns the current PDS declaration to delete. Requires authenticated service authorization by the current declaration holder.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (at-uri) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `changed` | `boolean` | Yes |  |
| `cid` | `string` (cid) | Yes |  |
| `community` | `string` (at-uri) | Yes |  |
| `declarationUri` | `string` (at-uri) | Yes |  |
| `publicationState` | `string` | Yes |  |

#### Errors

- **AuthenticationRequired**
- **CommunityNotFound**
- **InsufficientRole**
- **InvalidState**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Begins permanent deletion for an unpublished Community and returns the current PDS declaration to delete. Requires authenticated service authorization by the current declaration holder.",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidState"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "community"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "community": {
              "format": "at-uri",
              "type": "string"
            },
            "declarationUri": {
              "format": "at-uri",
              "type": "string"
            },
            "publicationState": {
              "knownValues": [
                "deleting"
              ],
              "type": "string"
            }
          },
          "required": [
            "community",
            "declarationUri",
            "cid",
            "publicationState",
            "changed"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "com.getorbyt.community.beginDeletion",
  "lexicon": 1
}
```
