# place.hud.createShareLink

> Share by link, given one of: canvas, a canvas of the person's own, turning on view by anyone with the link (its link as it is where it is on already); tile, one tile's call, kept as it is now; chat and turn, one answer of a chat of the person's, its question, words, steps and tiles kept as they are now. A link is viewed by anyone who has it, signed in or not, and never edits. A person has at most 200 links. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.

- Kind: procedure
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.createShareLink)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.createShareLink/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.createShareLink/analytics)

## Procedure (`place.hud.createShareLink`)

Type: procedure · POST

### Input (application/json)

- `canvas` (string): A canvas the person owns, to share live.
  - Constraints: minLength: 12, maxLength: 12
- `chat` (string): A chat of the person's, given with turn: its answer to share.
  - Constraints: minLength: 12, maxLength: 12
- `tile` (ref): A tile's call, to share as it is now: one of HUD's read tools a tile draws.
  - Reference: `place.hud.defs#sharedCall`
- `turn` (integer): The answer's turn in the chat (chatDefs#message's turn).
  - Constraints: minimum: 1

### Output (application/json)

- `link` (ref, required)
  - Reference: `place.hud.defs#shareLink`

### Errors

- `NotFound`: No canvas of this id that the person owns, no chat of this id of theirs, or no answer at that turn of it.
- `Forbidden`: The canvas is not the person's own: only its owner shares it by link.
- `InvalidRequest`: Not one of canvas, tile, or chat with turn; a tool no tile draws; arguments too large; or input not what the method takes.
- `LimitReached`: The person has 200 links: delete one first.
- `AuthRequired`: No live web session or HUD access token: sign in.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Share by link, given one of: canvas, a canvas of the person's own, turning on view by anyone with the link (its link as it is where it is on already); tile, one tile's call, kept as it is now; chat and turn, one answer of a chat of the person's, its question, words, steps and tiles kept as they are now. A link is viewed by anyone who has it, signed in or not, and never edits. A person has at most 200 links. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "No canvas of this id that the person owns, no chat of this id of theirs, or no answer at that turn of it.",
          "name": "NotFound"
        },
        {
          "description": "The canvas is not the person's own: only its owner shares it by link.",
          "name": "Forbidden"
        },
        {
          "description": "Not one of canvas, tile, or chat with turn; a tool no tile draws; arguments too large; or input not what the method takes.",
          "name": "InvalidRequest"
        },
        {
          "description": "The person has 200 links: delete one first.",
          "name": "LimitReached"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "canvas": {
              "description": "A canvas the person owns, to share live.",
              "maxLength": 12,
              "minLength": 12,
              "type": "string"
            },
            "chat": {
              "description": "A chat of the person's, given with turn: its answer to share.",
              "maxLength": 12,
              "minLength": 12,
              "type": "string"
            },
            "tile": {
              "description": "A tile's call, to share as it is now: one of HUD's read tools a tile draws.",
              "ref": "place.hud.defs#sharedCall",
              "type": "ref"
            },
            "turn": {
              "description": "The answer's turn in the chat (chatDefs#message's turn).",
              "minimum": 1,
              "type": "integer"
            }
          },
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "link": {
              "ref": "place.hud.defs#shareLink",
              "type": "ref"
            }
          },
          "required": [
            "link"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Share a canvas, a tile or a chat's answer by link.",
  "id": "place.hud.createShareLink",
  "lexicon": 1
}
```
