# place.hud.setTabOrder

> Put the open tabs in this order: those named first, as named, then any open but not named, as they were. 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.setTabOrder)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.setTabOrder/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.setTabOrder/analytics)

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

Type: procedure · POST

### Input (application/json)

- `tabs` (array, required): Open canvases, each once.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `place.hud.defs#tabRef`

### Output (application/json)

- `current` (string, required): The canvas current now, one of open.
  - Constraints: minLength: 12, maxLength: 12
- `open` (array, required): The canvases open as tabs, in their order.
  - `items` (ref)
    - Reference: `place.hud.defs#tab`

### Errors

- `InvalidRequest`: A canvas named is not open, or is named twice.
- `AuthRequired`: No live web session or HUD access token: sign in.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Put the open tabs in this order: those named first, as named, then any open but not named, as they were. 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": "A canvas named is not open, or is named twice.",
          "name": "InvalidRequest"
        },
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "tabs": {
              "description": "Open canvases, each once.",
              "items": {
                "ref": "place.hud.defs#tabRef",
                "type": "ref"
              },
              "maxLength": 100,
              "type": "array"
            }
          },
          "required": [
            "tabs"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "current": {
              "description": "The canvas current now, one of open.",
              "maxLength": 12,
              "minLength": 12,
              "type": "string"
            },
            "open": {
              "description": "The canvases open as tabs, in their order.",
              "items": {
                "ref": "place.hud.defs#tab",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "open",
            "current"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Reorder the tabs.",
  "id": "place.hud.setTabOrder",
  "lexicon": 1
}
```
