# `GSLayer.layerId`

*Instance Property*

The identifier under which the layer is stored in its glyph.

## Declaration

```swift
var layerId: String? { get set }
```

```objc
@property (nonatomic, strong) NSString * layerId;
```

[See also `layerId` in the Python API](https://docu.glyphsapp.com/#GSLayer.layerId)

```python
pyobjc_instanceMethods.layerId() -> str
pyobjc_instanceMethods.setLayerId_(layerId: str)
```

## Discussion

A master layer uses the identifier of its font master. can be nil if not part of a glyph

## See Also

### Identity

- [`GSLayer.layerKey`](/Core/GlyphsCore/GSLayer/layerKey) — A derived key that distinguishes the layer by its role and attributes.
- [`GSLayer resetLayerKey`](/Core/GlyphsCore/GSLayer/resetLayerKey) — Invalidates the derived layer key after information used to form it changes.
- [`GSLayer.layerGroupKey`](/Core/GlyphsCore/GSLayer/layerGroupKey) — A derived key used to group corresponding special and color layers.

