# LibTmux.Ref.new/3

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/ref.ex#L22
- **Page:** https://libtmux.org/en/elixir/latest/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()`)
