# social.coves.community.post.create

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

## Definitions

### `social.coves.community.post.create`

**Type**: `procedure`

Create a new post in a community

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tags` | `array` | No | User-applied topic tags |
| `embed` | `union` | No | Embedded media, external links, or quoted posts |
| `langs` | `array` | No | Languages used in the post content (ISO 639-1) |
| `title` | `string` | No | Post title (optional for media-only posts) |
| `facets` | `array` | No | Annotations for rich text (mentions, links, formatting, block structure) |
| `labels` | `ref` → `com.atproto.label.defs#selfLabels` | No | Self-applied content labels (NSFW, spoilers, etc.) |
| `content` | `string` | No | Post content - supports rich text via facets |
| `community` | `string` (at-identifier) | Yes | DID or handle of the community to post in |

#### Output

**Encoding**: `application/json`

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

#### Errors

- **CommunityNotFound**: Community not found
- **NotAuthorized**: User is not authorized to post in this community
- **Banned**: User is banned from this community
- **InvalidContent**: Post content violates community rules
- **ContentRuleViolation**: Post violates community content rules (e.g., embeds not allowed, text too short)

## Raw Schema

```json
{
  "id": "social.coves.community.post.create",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community"
          ],
          "properties": {
            "tags": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 640,
                "maxGraphemes": 64
              },
              "maxLength": 8,
              "description": "User-applied topic tags"
            },
            "embed": {
              "refs": [
                "social.coves.embed.images",
                "social.coves.embed.video",
                "social.coves.embed.external",
                "social.coves.embed.post"
              ],
              "type": "union",
              "description": "Embedded media, external links, or quoted posts"
            },
            "langs": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "language"
              },
              "maxLength": 3,
              "description": "Languages used in the post content (ISO 639-1)"
            },
            "title": {
              "type": "string",
              "maxLength": 3000,
              "description": "Post title (optional for media-only posts)",
              "maxGraphemes": 300
            },
            "facets": {
              "type": "array",
              "items": {
                "ref": "social.coves.richtext.facet",
                "type": "ref"
              },
              "maxLength": 200,
              "description": "Annotations for rich text (mentions, links, formatting, block structure)"
            },
            "labels": {
              "ref": "com.atproto.label.defs#selfLabels",
              "type": "ref",
              "description": "Self-applied content labels (NSFW, spoilers, etc.)"
            },
            "content": {
              "type": "string",
              "maxLength": 100000,
              "description": "Post content - supports rich text via facets",
              "maxGraphemes": 10000
            },
            "community": {
              "type": "string",
              "format": "at-identifier",
              "description": "DID or handle of the community to post in"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "CommunityNotFound",
          "description": "Community not found"
        },
        {
          "name": "NotAuthorized",
          "description": "User is not authorized to post in this community"
        },
        {
          "name": "Banned",
          "description": "User is banned from this community"
        },
        {
          "name": "InvalidContent",
          "description": "Post content violates community rules"
        },
        {
          "name": "ContentRuleViolation",
          "description": "Post violates community content rules (e.g., embeds not allowed, text too short)"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "CID of the created post"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the created post"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Create a new post in a community"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
