# fyi.opensocial.publishSiteDraft

> Publish the caller's draft: what it changed goes onto the live site as it is now, and anything else changed meanwhile stays. The last publish can be undone.

- Kind: procedure
- Authority: opensocial.fyi
- Lexicon: 1
- Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.publishSiteDraft)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.publishSiteDraft/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.publishSiteDraft/analytics)

## Procedure (`fyi.opensocial.publishSiteDraft`)

Type: procedure · POST

### Input (application/json)

- `group` (string · did, required)

### Output (application/json)

- `changed` (integer, required)
- `replaced` (array, required): What someone else had changed too since the draft began, now the draft's.
  - `items` (string)

### Errors

- `NotFound`: No description in schema.
- `Forbidden`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Publish the caller's draft: what it changed goes onto the live site as it is now, and anything else changed meanwhile stays. The last publish can be undone.",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "Forbidden"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "group": {
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "group"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "changed": {
              "type": "integer"
            },
            "replaced": {
              "description": "What someone else had changed too since the draft began, now the draft's.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "changed",
            "replaced"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.publishSiteDraft",
  "lexicon": 1
}
```
