# LibTmux.Ref.new/3

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/ref.ex#L22
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-ref-new-3/

```
new(entity, id, instance)
@spec new(entity(), id(), String.t()) ::
        {:ok, t()} | {:error, LibTmux.Error.t()}
```

Validates a native identity and binds it to a nonempty instance token.

See the [worked example](api-examples.html#encoding-and-protocol).

## Parameters

- `entity` (`entity()`)
- `id` (`id()`)
- `instance` (`String.t()`)
