# com.getorbyt.community.updatePublication

> 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.updatePublication)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.updatePublication/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.updatePublication/examples)

## Definitions

### `com.getorbyt.community.updatePublication`

**Type**: `procedure`

Publishes or unpublishes a Community. Requires authenticated service authorization and a manager action advertised by the Community view.

#### Input

**Encoding**: `application/json`

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

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `changed` | `boolean` | Yes |  |
| `community` | `ref` → `com.getorbyt.community.defs#view` | Yes |  |

#### Errors

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

## Raw Schema

```json
{
  "id": "com.getorbyt.community.updatePublication",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "action"
          ],
          "properties": {
            "action": {
              "type": "string",
              "knownValues": [
                "publish",
                "unpublish"
              ]
            },
            "community": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidState"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "changed"
          ],
          "properties": {
            "changed": {
              "type": "boolean"
            },
            "community": {
              "ref": "com.getorbyt.community.defs#view",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Publishes or unpublishes a Community. Requires authenticated service authorization and a manager action advertised by the Community view."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
