# pub.openletter.petition

> Published by [openletter.pub](https://lexicon.garden/identity/did:plc:vrxdl7yd3vz2hzdosqaywvb3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:vrxdl7yd3vz2hzdosqaywvb3/pub.openletter.petition)
- [Documentation](https://lexicon.garden/lexicon/did:plc:vrxdl7yd3vz2hzdosqaywvb3/pub.openletter.petition/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:vrxdl7yd3vz2hzdosqaywvb3/pub.openletter.petition/examples)

## Definitions

### `pub.openletter.petition`

**Type**: `record`

An open letter that others can endorse or object to.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `body` | `string` | Yes | The full text of the letter, as CommonMark markdown. |
| `tags` | `array` | No | Free-form tags for browsing. |
| `langs` | `array` | No | The language(s) the letter is written in. |
| `title` | `string` | Yes | The headline of the open letter. |
| `banner` | `blob` | No | A banner image for the letter. |
| `summary` | `string` | No | A short tagline shown in previews and listings. |
| `createdAt` | `string` (datetime) | Yes |  |
| `recipients` | `array` | No | The parties the letter is addressed to. |
| `contributors` | `array` | No | DIDs the author claims as co-authors; each is confirmed by a matching pub.openletter.contribution. |

### `pub.openletter.petition#recipient`

**Type**: `object`

A party an open letter is addressed to.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No | The recipient's ATProto identity, if they have one. |
| `url` | `string` (uri) | No | A web page for the recipient. |
| `name` | `string` | Yes | The recipient's name, e.g. "The City Council of Springfield". |

## Raw Schema

```json
{
  "id": "pub.openletter.petition",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "title",
          "body",
          "createdAt"
        ],
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 1,
            "description": "The full text of the letter, as CommonMark markdown.",
            "maxGraphemes": 50000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 640,
              "maxGraphemes": 64
            },
            "maxLength": 10,
            "description": "Free-form tags for browsing."
          },
          "langs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "language"
            },
            "maxLength": 3,
            "description": "The language(s) the letter is written in."
          },
          "title": {
            "type": "string",
            "maxLength": 3000,
            "minLength": 1,
            "description": "The headline of the open letter.",
            "maxGraphemes": 300
          },
          "banner": {
            "type": "blob",
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp"
            ],
            "maxSize": 1000000,
            "description": "A banner image for the letter."
          },
          "summary": {
            "type": "string",
            "maxLength": 3000,
            "description": "A short tagline shown in previews and listings.",
            "maxGraphemes": 300
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "recipients": {
            "type": "array",
            "items": {
              "ref": "#recipient",
              "type": "ref"
            },
            "maxLength": 50,
            "description": "The parties the letter is addressed to."
          },
          "contributors": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "did"
            },
            "maxLength": 100,
            "description": "DIDs the author claims as co-authors; each is confirmed by a matching pub.openletter.contribution."
          }
        }
      },
      "description": "An open letter that others can endorse or object to."
    },
    "recipient": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "The recipient's ATProto identity, if they have one."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "A web page for the recipient."
        },
        "name": {
          "type": "string",
          "maxLength": 2560,
          "minLength": 1,
          "description": "The recipient's name, e.g. \"The City Council of Springfield\".",
          "maxGraphemes": 256
        }
      },
      "description": "A party an open letter is addressed to."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
