# social.coves.community.update

> Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.update)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.update/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.update/examples)

## Definitions

### `social.coves.community.update`

**Type**: `procedure`

Update community profile. Requires authentication and moderator/admin permissions.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `avatarBlob` | `string` | No | Base64-encoded avatar image data (png, jpeg, or webp) |
| `bannerBlob` | `string` | No | Base64-encoded banner image data (png, jpeg, or webp) |
| `visibility` | `string` | No | Community visibility level |
| `description` | `string` | No | Community description |
| `displayName` | `string` | No | Display name for the community |
| `communityDid` | `string` (did) | Yes | DID of the community to update |
| `avatarMimeType` | `string` | No | MIME type of the avatar image (image/png, image/jpeg, image/webp) |
| `bannerMimeType` | `string` | No | MIME type of the banner image (image/png, image/jpeg, image/webp) |
| `moderationType` | `string` | No | Type of moderation system |
| `contentWarnings` | `array` | No | Required content warnings for this community |
| `allowExternalDiscovery` | `boolean` | No | Whether other Coves instances can index and discover this community |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | CID of the updated community profile |
| `uri` | `string` (at-uri) | Yes | AT-URI of the updated community profile |

#### Errors

- **NotFound**: Community not found
- **NotAuthorized**: User is not authorized to update this community

## Raw Schema

```json
{
  "id": "social.coves.community.update",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "communityDid"
          ],
          "properties": {
            "avatarBlob": {
              "type": "string",
              "maxLength": 1400000,
              "description": "Base64-encoded avatar image data (png, jpeg, or webp)"
            },
            "bannerBlob": {
              "type": "string",
              "maxLength": 2800000,
              "description": "Base64-encoded banner image data (png, jpeg, or webp)"
            },
            "visibility": {
              "type": "string",
              "maxLength": 64,
              "description": "Community visibility level",
              "knownValues": [
                "public",
                "unlisted",
                "private"
              ]
            },
            "description": {
              "type": "string",
              "maxLength": 10000,
              "description": "Community description",
              "maxGraphemes": 1000
            },
            "displayName": {
              "type": "string",
              "maxLength": 1280,
              "description": "Display name for the community",
              "maxGraphemes": 128
            },
            "communityDid": {
              "type": "string",
              "format": "did",
              "description": "DID of the community to update"
            },
            "avatarMimeType": {
              "type": "string",
              "maxLength": 128,
              "description": "MIME type of the avatar image (image/png, image/jpeg, image/webp)"
            },
            "bannerMimeType": {
              "type": "string",
              "maxLength": 128,
              "description": "MIME type of the banner image (image/png, image/jpeg, image/webp)"
            },
            "moderationType": {
              "type": "string",
              "maxLength": 64,
              "description": "Type of moderation system",
              "knownValues": [
                "moderator",
                "sortition"
              ]
            },
            "contentWarnings": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 32,
                "knownValues": [
                  "nsfw",
                  "violence",
                  "spoilers"
                ]
              },
              "maxLength": 10,
              "description": "Required content warnings for this community"
            },
            "allowExternalDiscovery": {
              "type": "boolean",
              "description": "Whether other Coves instances can index and discover this community"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "NotFound",
          "description": "Community not found"
        },
        {
          "name": "NotAuthorized",
          "description": "User is not authorized to update this community"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "CID of the updated community profile"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the updated community profile"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Update community profile. Requires authentication and moderator/admin permissions."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
