# fyi.opensocial.takeBackVersion

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

## Definitions

### `fyi.opensocial.takeBackVersion`

**Type**: `procedure`

Take back a version of a template the group shared: within the group, whoever shared it or whoever may change the site; with everyone, from the group's own repo, whoever may publish for the group. No tab is brought onto it, and every tab on it goes back to the last version before it that wasn't taken back. Its listing's latest becomes the newest version left.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `group` | `string` (did) | Yes |  |
| `template` | `string` (at-uri) | Yes | The template, its fyi.opensocial.template: in the group's members space, or its repo. |
| `version` | `string` (cid) | Yes | The version taken back, by CID. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `latest` | `ref` → `com.atproto.repo.strongRef` | No | The newest version left; none if every one is taken back. |

#### Errors

- **NotFound**
- **Forbidden**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Take back a version of a template the group shared: within the group, whoever shared it or whoever may change the site; with everyone, from the group's own repo, whoever may publish for the group. No tab is brought onto it, and every tab on it goes back to the last version before it that wasn't taken back. Its listing's latest becomes the newest version left.",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "Forbidden"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "group": {
              "format": "did",
              "type": "string"
            },
            "template": {
              "description": "The template, its fyi.opensocial.template: in the group's members space, or its repo.",
              "format": "at-uri",
              "type": "string"
            },
            "version": {
              "description": "The version taken back, by CID.",
              "format": "cid",
              "type": "string"
            }
          },
          "required": [
            "group",
            "template",
            "version"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "latest": {
              "description": "The newest version left; none if every one is taken back.",
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.takeBackVersion",
  "lexicon": 1
}
```
