# fyi.opensocial.shareTab

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

## Definitions

### `fyi.opensocial.shareTab`

**Type**: `procedure`

Share a tab you can see as a template, for whoever it's shared with to add: its page, its methods and the kinds of record it makes up, never anything written in it. Shared with the group, it's kept in the group's members space, for members to add to their channels. Shared with everyone as the group, it's published in the group's own repo, by whoever may publish for the group, for anyone with its link to add to their own group. Sharing the same tab again to the same place puts out a new version of the same template. To share it with everyone as yourself, see getTabBundle.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `audience` | `string` | Yes | Who it's shared with: group, the group's members alone; everyone-as-group, anyone, from the group. |
| `changes` | `string` | No | What's new since it was last shared. |
| `description` | `string` | Yes | One line saying what it is. |
| `group` | `string` (did) | Yes |  |
| `name` | `string` | Yes | What it's called, where it's offered. |
| `tab` | `string` | Yes | The tab's namespace. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `number` | `integer` | Yes | Which version it is. |
| `uri` | `string` (at-uri) | Yes | The template, its fyi.opensocial.template: in the members space, or the group's repo. |
| `version` | `ref` → `com.atproto.repo.strongRef` | Yes | The version just put out, its fyi.opensocial.templateVersion. |

#### Errors

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

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Share a tab you can see as a template, for whoever it's shared with to add: its page, its methods and the kinds of record it makes up, never anything written in it. Shared with the group, it's kept in the group's members space, for members to add to their channels. Shared with everyone as the group, it's published in the group's own repo, by whoever may publish for the group, for anyone with its link to add to their own group. Sharing the same tab again to the same place puts out a new version of the same template. To share it with everyone as yourself, see getTabBundle.",
      "errors": [
        {
          "name": "InvalidTab"
        },
        {
          "name": "NotFound"
        },
        {
          "name": "Forbidden"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "audience": {
              "description": "Who it's shared with: group, the group's members alone; everyone-as-group, anyone, from the group.",
              "knownValues": [
                "group",
                "everyone-as-group"
              ],
              "maxLength": 32,
              "type": "string"
            },
            "changes": {
              "description": "What's new since it was last shared.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "description": {
              "description": "One line saying what it is.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "group": {
              "format": "did",
              "type": "string"
            },
            "name": {
              "description": "What it's called, where it's offered.",
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "tab": {
              "description": "The tab's namespace.",
              "maxLength": 13,
              "type": "string"
            }
          },
          "required": [
            "group",
            "tab",
            "name",
            "description",
            "audience"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "number": {
              "description": "Which version it is.",
              "minimum": 1,
              "type": "integer"
            },
            "uri": {
              "description": "The template, its fyi.opensocial.template: in the members space, or the group's repo.",
              "format": "at-uri",
              "type": "string"
            },
            "version": {
              "description": "The version just put out, its fyi.opensocial.templateVersion.",
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            }
          },
          "required": [
            "uri",
            "version",
            "number"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.shareTab",
  "lexicon": 1
}
```
