# fyi.opensocial.getSiteDraft

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getSiteDraft)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getSiteDraft/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getSiteDraft/examples)

## Definitions

### `fyi.opensocial.getSiteDraft#draft`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `avatar` | `string` (uri) | No | The group's picture, as the draft changes it. |
| `banner` | `string` (uri) | No | Its banner, as the draft changes it. |
| `by` | `string` | Yes | Who made the last change to it: an AI app's name. |
| `createdAt` | `string` (datetime) | No |  |
| `description` | `string` | No | What the group says about itself, as the draft changes it. |
| `joinPolicy` | `string` | No | How people join, as the draft changes it. |
| `name` | `string` | No | The group's name, as the draft changes it. |
| `rules` | `array` | No | The group's rules, as the draft has them. |
| `updatedAt` | `string` (datetime) | Yes |  |
| `uri` | `string` (at-uri) | Yes | The draft's site record, in the members space. |

### `fyi.opensocial.getSiteDraft`

**Type**: `query`

The caller's draft of the group's site, if they have one, and whether the site's last publish can be undone. Only for whoever may change the site.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `group` | `string` (did) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `draft` | `ref` → `#draft` | No |  |
| `undo` | `ref` → `#undo` | No |  |

#### Errors

- **Forbidden**

### `fyi.opensocial.getSiteDraft#rule`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `text` | `string` | No |  |
| `title` | `string` | Yes |  |

### `fyi.opensocial.getSiteDraft#undo`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `mine` | `boolean` | Yes |  |
| `publishedAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "draft": {
      "properties": {
        "avatar": {
          "description": "The group's picture, as the draft changes it.",
          "format": "uri",
          "type": "string"
        },
        "banner": {
          "description": "Its banner, as the draft changes it.",
          "format": "uri",
          "type": "string"
        },
        "by": {
          "description": "Who made the last change to it: an AI app's name.",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "description": {
          "description": "What the group says about itself, as the draft changes it.",
          "type": "string"
        },
        "joinPolicy": {
          "description": "How people join, as the draft changes it.",
          "type": "string"
        },
        "name": {
          "description": "The group's name, as the draft changes it.",
          "type": "string"
        },
        "rules": {
          "description": "The group's rules, as the draft has them.",
          "items": {
            "ref": "#rule",
            "type": "ref"
          },
          "type": "array"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        },
        "uri": {
          "description": "The draft's site record, in the members space.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "by",
        "updatedAt",
        "uri"
      ],
      "type": "object"
    },
    "main": {
      "description": "The caller's draft of the group's site, if they have one, and whether the site's last publish can be undone. Only for whoever may change the site.",
      "errors": [
        {
          "name": "Forbidden"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "draft": {
              "ref": "#draft",
              "type": "ref"
            },
            "undo": {
              "ref": "#undo",
              "type": "ref"
            }
          },
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "group": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "group"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "rule": {
      "properties": {
        "text": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "title"
      ],
      "type": "object"
    },
    "undo": {
      "properties": {
        "mine": {
          "type": "boolean"
        },
        "publishedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "publishedAt",
        "mine"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.getSiteDraft",
  "lexicon": 1
}
```
