# 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 |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `changed` | `boolean` | Yes |  |
| `community` | `string` (at-uri) | Yes |  |
| `declarationUri` | `string` (at-uri) | Yes |  |
| `publicationState` | `string` | Yes |  |

#### Errors

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

## Raw Schema

```json
{
  "id": "com.getorbyt.community.beginDeletion",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community"
          ],
          "properties": {
            "community": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidState"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "declarationUri",
            "cid",
            "publicationState",
            "changed"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid"
            },
            "changed": {
              "type": "boolean"
            },
            "community": {
              "type": "string",
              "format": "at-uri"
            },
            "declarationUri": {
              "type": "string",
              "format": "at-uri"
            },
            "publicationState": {
              "type": "string",
              "knownValues": [
                "deleting"
              ]
            }
          }
        },
        "encoding": "application/json"
      },
      "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."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
