# tmux_model:session/1

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_model.erl#L200
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_model-session-1/

```
session(Fields)
-spec session(session_input()) ->
                 {ok, session()} |
                 {error, tmux_schema:error_detail()}.
```

Construct a detached session row, validating required fields and scalar bounds without tmux I/O.

## Parameters

- `Fields` (`session_input()`)
