# fyi.opensocial.putSite

> 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.putSite)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.putSite/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.putSite/examples)

## Definitions

### `fyi.opensocial.putSite`

**Type**: `procedure`

Replace the group's site. Requires group.configure. Its files are uploaded first, with uploadSiteFile. Fields are inlined rather than referencing fyi.opensocial.site, because a record def cannot be used as an input object.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channels` | `array` | Yes |  |
| `files` | `array` | Yes |  |
| `group` | `string` (did) | Yes | The group DID. Every method is served by the group's host and authorized against that group's roles. |
| `keepAboutTabs` | `boolean` | No | Keep the tabs the site has now about one thing each (those with about), in the channels still there: for a site published from a folder of files, which doesn't have them. |
| `lexicons` | `array` | No | Lexicon documents of the group's own, for the kinds of record its pages make up that nothing on the network defines. Each is named under the group's handle, reversed (kitchen-sink.opensocial.fyi defines fyi.opensocial.kitchen-sink.task). The host keeps them, checks records of those kinds against them, and lets one change only in ways every record already written still fits. Ones left out are kept as they were. |
| `theme` | `ref` → `fyi.opensocial.site#theme` | No |  |

#### Output

**Encoding**: `application/json`

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

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Replace the group's site. Requires group.configure. Its files are uploaded first, with uploadSiteFile. Fields are inlined rather than referencing fyi.opensocial.site, because a record def cannot be used as an input object.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "channels": {
              "items": {
                "ref": "fyi.opensocial.site#channel",
                "type": "ref"
              },
              "maxLength": 50,
              "type": "array"
            },
            "files": {
              "items": {
                "ref": "fyi.opensocial.site#file",
                "type": "ref"
              },
              "maxLength": 500,
              "type": "array"
            },
            "group": {
              "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.",
              "format": "did",
              "type": "string"
            },
            "keepAboutTabs": {
              "description": "Keep the tabs the site has now about one thing each (those with about), in the channels still there: for a site published from a folder of files, which doesn't have them.",
              "type": "boolean"
            },
            "lexicons": {
              "description": "Lexicon documents of the group's own, for the kinds of record its pages make up that nothing on the network defines. Each is named under the group's handle, reversed (kitchen-sink.opensocial.fyi defines fyi.opensocial.kitchen-sink.task). The host keeps them, checks records of those kinds against them, and lets one change only in ways every record already written still fits. Ones left out are kept as they were.",
              "items": {
                "type": "unknown"
              },
              "maxLength": 100,
              "type": "array"
            },
            "theme": {
              "ref": "fyi.opensocial.site#theme",
              "type": "ref"
            }
          },
          "required": [
            "group",
            "channels",
            "files"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri",
            "cid"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.putSite",
  "lexicon": 1
}
```
