# social.coves.community.post.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.post.update)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.update/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.update/examples)

## Definitions

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

**Type**: `procedure`

Update an existing post

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the post to update |
| `tags` | `array` | No | Updated topic tags |
| `embed` | `union` | No | Updated embedded content (note: changing embed type may be restricted) |
| `langs` | `array` | No | Updated languages (ISO 639-1) |
| `title` | `string` | No | Updated title |
| `facets` | `array` | No | Updated annotations for rich text (mentions, links, formatting, block structure) |
| `labels` | `ref` → `com.atproto.label.defs#selfLabels` | No | Updated self-applied content labels |
| `content` | `string` | No | Updated content - main text for text posts, description for media, etc. |
| `editNote` | `string` | No | Optional note explaining the edit |

#### Output

**Encoding**: `application/json`

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

#### Errors

- **PostNotFound**: Post not found
- **NotAuthorized**: User is not authorized to edit this post
- **EditWindowExpired**: Edit window has expired (posts can only be edited within 24 hours)
- **InvalidUpdate**: Invalid update operation (e.g., changing post type)

## Raw Schema

```json
{
  "id": "social.coves.community.post.update",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "uri"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the post to update"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 640,
                "maxGraphemes": 64
              },
              "maxLength": 8,
              "description": "Updated topic tags"
            },
            "embed": {
              "refs": [
                "social.coves.embed.images",
                "social.coves.embed.video",
                "social.coves.embed.external",
                "social.coves.embed.post"
              ],
              "type": "union",
              "description": "Updated embedded content (note: changing embed type may be restricted)"
            },
            "langs": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "language"
              },
              "maxLength": 3,
              "description": "Updated languages (ISO 639-1)"
            },
            "title": {
              "type": "string",
              "maxLength": 3000,
              "description": "Updated title",
              "maxGraphemes": 300
            },
            "facets": {
              "type": "array",
              "items": {
                "ref": "social.coves.richtext.facet",
                "type": "ref"
              },
              "maxLength": 200,
              "description": "Updated annotations for rich text (mentions, links, formatting, block structure)"
            },
            "labels": {
              "ref": "com.atproto.label.defs#selfLabels",
              "type": "ref",
              "description": "Updated self-applied content labels"
            },
            "content": {
              "type": "string",
              "maxLength": 100000,
              "description": "Updated content - main text for text posts, description for media, etc.",
              "maxGraphemes": 10000
            },
            "editNote": {
              "type": "string",
              "maxLength": 3000,
              "description": "Optional note explaining the edit",
              "maxGraphemes": 300
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "PostNotFound",
          "description": "Post not found"
        },
        {
          "name": "NotAuthorized",
          "description": "User is not authorized to edit this post"
        },
        {
          "name": "EditWindowExpired",
          "description": "Edit window has expired (posts can only be edited within 24 hours)"
        },
        {
          "name": "InvalidUpdate",
          "description": "Invalid update operation (e.g., changing post type)"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "New CID of the updated post"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the updated post"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Update an existing post"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
