# com.getorbyt.community.getPostCommunities

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

## Definitions

### `com.getorbyt.community.getPostCommunities#association`

**Type**: `object`

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

### `com.getorbyt.community.getPostCommunities`

**Type**: `query`

The Community each post was published to, for a batch of posts. A post in no visible Community is omitted. A Community post record outranks a legacy channel tag on the post itself.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `posts` | `array` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `associations` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "association": {
      "properties": {
        "community": {
          "format": "at-uri",
          "type": "string"
        },
        "post": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "post",
        "community"
      ],
      "type": "object"
    },
    "main": {
      "description": "The Community each post was published to, for a batch of posts. A post in no visible Community is omitted. A Community post record outranks a legacy channel tag on the post itself.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "associations": {
              "items": {
                "ref": "#association",
                "type": "ref"
              },
              "maxLength": 100,
              "type": "array"
            }
          },
          "required": [
            "associations"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "posts": {
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "maxLength": 100,
            "minLength": 1,
            "type": "array"
          }
        },
        "required": [
          "posts"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "com.getorbyt.community.getPostCommunities",
  "lexicon": 1
}
```
