# Layers

> Canonical URL: https://docs.mountaya.com/en/apis/tiles/reference/layers/
> Last updated: 2026-11-26
> Rules for agents: https://docs.mountaya.com/llms.txt#rules-for-agents

The layer catalog: the terrains, the elevation raster, the overlays and the itinerary and zone layers, each by its slug with the tile sources it resolves to.

## The Layers object

The built-in map layer catalog: the terrain base maps, the grouped overlay layers, and the two layers that render itineraries and zones. `itineraries` and `zones` are typed as overlays because that is what they are to a map: one tile source each, registered the same way. But they are singular and always present, so they sit beside the `overlays` groups rather than inside them.

`elevation` is the one entry that draws nothing. It is the height raster the terrains bake their relief from, and it is always present: the terrains and the raster they are shaded from are published together, so a catalog that offers a terrain offers the heights that terrain is drawn against.

- `elevation` (object, required): The height raster a renderer turns into three-dimensional relief. Every catalog carries one, so a client registers the terrain source unconditionally rather than branching on whether heights are available.
  - `id` (string (uuid), required): Identifier of the elevation raster. It belongs to no terrain, so it has an identifier of its own, which stays the same across releases.
  - `tile_size` (integer (int32), required, one of: `512`): The tile size to declare when this source is added to a map. Only one value is served, and declaring a different one offsets every zoom level.
  - `url` (string (uri), required): URL of the TileJSON document describing the elevation source, ready to hand to a map renderer unmodified. It is the Tile API's `getElevationTileJson`, whose tile template is the Tile API's `getElevationTile`, so the heights are drawn under the credential a map sends there, and no URL carries a credential of Mountaya's. Uncapped, unlike a URL a caller supplies: Mountaya issues this one, so there is no untrusted input for a ceiling to bound.

- `itineraries` (object, required): The single layer that draws the itineraries this credential reaches, in the studio scope `organization_id` names when the catalog was asked for one, which its URL template then carries. It is typed as an overlay because that is what it is to a map, one tile source registered the same way, and it sits here rather than inside `overlays` because it is singular and always present: there is one of it, for every caller, and no group to file it under.
  - `capabilities` (object, required): Which of this overlay's options each side of the wire resolves, so read this before building the control. Where `server.timestamp` is true, a tile's `timestamp` selects the instant it depicts. Where it is false, the instant sent is ignored, and any change over time is the client's to draw from what it already holds. Two settings are refused. A `timestamp` that is not an RFC 3339 instant, or that lies more than three days before or six days after the request, is a `400` on every overlay tile, whether or not the overlay has a time dimension. Where `server.timestamp` is true, an instant more than 15 minutes from the current one is a `403` unless the organization's `with_overlays_control` safety rule allows it, a share-token request included.
    - `client` (object, required): Which of the optional behaviours the CLIENT is expected to provide for this overlay, such as restyling data it already holds when the moment changes.
      - `timestamp` (boolean, required): Whether this side of the wire resolves the moment the overlay depicts.
    - `server` (object, required): Which of the optional behaviours the SERVER provides for this overlay, such as serving the tile for a requested instant.
      - `timestamp` (boolean, required): Whether this side of the wire resolves the moment the overlay depicts.
  - `content_type` (string, required, one of: `image/png`, `application/x-protobuf`, `image/webp`): What the overlay's tiles carry, which decides how they are drawn: a raster overlay is an image layer, a vector one is styled by the layers its specification declares. For a raster overlay it names the format of the tiles within its source's zoom range; a tile asked for deeper than that is cut from its ancestor and is always PNG, so read each tile's `Content-Type` header rather than this.
  - `id` (string (uuid), required): Identifier of the overlay. `slug` is the value the Tile API takes; this is the one the catalog keys on.
  - `locales` (object, required): The overlay's display name and blurb per language. A language absent here is null rather than missing, which is the case to fall back from.
    - `de` (LocaleMap | null, required): The German strings for this legend. Null when the legend carries no German translation, which is the case a client falls back from rather than renders.
    - `en` (LocaleMap | null, required): The English strings for this legend. Null when the legend carries no English translation, which is the case a client falls back from rather than renders.
    - `es` (LocaleMap | null, required): The Spanish strings for this legend. Null when the legend carries no Spanish translation, which is the case a client falls back from rather than renders.
    - `fr` (LocaleMap | null, required): The French strings for this legend. Null when the legend carries no French translation, which is the case a client falls back from rather than renders.
    - `it` (LocaleMap | null, required): The Italian strings for this legend. Null when the legend carries no Italian translation, which is the case a client falls back from rather than renders.
    - `ja` (LocaleMap | null, required): The Japanese strings for this legend. Null when the legend carries no Japanese translation, which is the case a client falls back from rather than renders.
    - `zh` (LocaleMap | null, required): The Chinese strings for this legend. Null when the legend carries no Chinese translation, which is the case a client falls back from rather than renders.
  - `slug` (string, required): Stable, URL-safe identifier of the overlay, and the value the Tile API takes in `/v1/overlays/{overlay}/...`. Lowercase letters, digits and single hyphens, so it is safe in a path segment without escaping. The shape is declared here and on that path parameter identically, because a value this read hands a client is a value that client sends straight back.
  - `sources` (array of TileSource, required): Tile sources to register with the map renderer before this overlay can be drawn.
    - `attribution` (string): Attribution HTML to display on the map for this source: the credit of whoever supplies its data, Mountaya for a resource source and the data provider for an overlay. Pass through to the `attribution` option of `map.addSource()`.
    - `id` (string, required): Unique source identifier. Use it as the first argument to `map.addSource()` and as the `source` of every layer that draws from it.

      Declared as a string rather than a UUID so that it stays opaque: a resource source is named by the resource's id, and an overlay or aggregate source by a fixed identifier of its own. Every one of them is spelled as a UUID, but that shape is not part of this contract, so treat it as an opaque string and match it against a layer's `source` rather than parsing it.
    - `layers` (array of TileLayer, required): Render-layers to draw from this source, in paint order. Each becomes one `map.addLayer()` call.
      - `filter` (array of any): Optional MapLibre/Mapbox filter expression restricting which features the layer renders. Pass through to the `filter` option of `map.addLayer()`. Omitted when no filter applies; never null and never an empty array.
      - `id` (string, required): Unique layer identifier. Use it as the first argument to `map.addLayer()`.

        A composite path rather than a UUID, for example `itineraries/<itinerary_id>/lines`. Treat it as an opaque string: the shape is a rendering detail and is free to change, and it is the only kind of `id` on this surface that a UUID parser would reject.
      - `key` (string, required): Stable, human-readable concept slug grouping render-layers that depict the same map concept (e.g. "parking", "hillshade"). Unlike `id`, which is the per-layer unique identifier, `key` MAY repeat across several layers of the same overlay when one concept is rendered with multiple layers (a fill plus a symbol, for instance). Clients group and toggle layers by `key`; `id` remains the uniqueness guarantee.

        The empty string is a real value, and means this layer belongs to no named concept: an itinerary's own line layers carry it. Group by `key` only after discarding the empty ones, or every unnamed layer collapses into one group.
      - `layout` (object | null, required): MapLibre/Mapbox layout properties for this layer (e.g. `visibility`, symbol placement). Pass through to the `layout` option of `map.addLayer()`. Null when the layer needs no layout overrides.
      - `legend` (object): Optional legend describing how to read the layer's colors or scale. Drives the map UI legend; not consumed by `map.addLayer()`. Omitted when the layer has no legend; never null.
        - `kind` (string, one of: `row`, `compass`): How the legend is laid out: `row` draws the steps below as an ordered row of color swatches, and `compass` as a compass dial, for a directional overlay such as aspect/slope.
        - `locales` (object, required): The legend's title and step labels per language. A language absent here is null rather than missing, which is the case to fall back from.
          - `de` (LocaleMap | null, required): The German strings for this legend. Null when the legend carries no German translation, which is the case a client falls back from rather than renders.
          - `en` (LocaleMap | null, required): The English strings for this legend. Null when the legend carries no English translation, which is the case a client falls back from rather than renders.
          - `es` (LocaleMap | null, required): The Spanish strings for this legend. Null when the legend carries no Spanish translation, which is the case a client falls back from rather than renders.
          - `fr` (LocaleMap | null, required): The French strings for this legend. Null when the legend carries no French translation, which is the case a client falls back from rather than renders.
          - `it` (LocaleMap | null, required): The Italian strings for this legend. Null when the legend carries no Italian translation, which is the case a client falls back from rather than renders.
          - `ja` (LocaleMap | null, required): The Japanese strings for this legend. Null when the legend carries no Japanese translation, which is the case a client falls back from rather than renders.
          - `zh` (LocaleMap | null, required): The Chinese strings for this legend. Null when the legend carries no Chinese translation, which is the case a client falls back from rather than renders.
        - `steps` (array of TileLegendStep): Ordered color stops mapping a value (or bucket) to the color the layer paints for it, from low to high. Drives a graduated or categorical legend.
          - `color` (string, required): CSS color the layer paints for this step (e.g. "#1c7ed6"). Matches the color used in the layer's paint expression.

            Case-insensitive, unlike the colors on an itinerary's segments, waypoints and segment groups. Those are values a caller wrote, normalized to the six-digit lowercase form on the way in; this one is read from the layer's own palette and served in whatever case that palette is written in. Compare these case-insensitively rather than by string equality.
          - `step` (string, required): Label for the value or bucket this color represents, such as a threshold like "20" or a range like "25 - 30". It is the same in every language: the legend's translated text is in its `locales`.
        - `unit` (string, one of: `km/h`, `degrees`, `m`, `cm`, `celsius`, `percent`): The unit the step values are measured in, for the suffix a legend prints beside each one. Absent when the steps are categories rather than quantities.
      - `paint` (object | null, required): MapLibre/Mapbox paint properties for this layer (colors, opacity, widths, data-driven expressions). Pass through to the `paint` option of `map.addLayer()`. Null when the layer relies on style defaults.
      - `source` (string): Identifier of the source this layer draws from. Matches the `id` of the enclosing tile source.
      - `source_layer` (string, required): Name of the layer within a vector tile to render (e.g. "fills", "points", "lines"). Pass through to the `source-layer` option of `map.addLayer()`. Only meaningful for vector sources.
      - `type` (string, required, one of: `raster`, `hillshade`, `fill`, `line`, `circle`, `symbol`): How this layer draws, and what `paint` may carry: a map library maps it onto its own layer type, so pass it through rather than inferring one from the source.
      - `zoom_max` (integer (int32), required): Highest zoom level at which the layer is drawn. Pass to the `maxzoom` option of `map.addLayer()`.
      - `zoom_min` (integer (int32), required): Lowest zoom level at which the layer is drawn. Pass to the `minzoom` option of `map.addLayer()`.
    - `size` (integer (int32), one of: `256`, `512`): Edge length in pixels of one raster tile, for `map.addSource()`'s `tileSize`. Omitted for vector sources, which have no pixel size of their own.
    - `tiles` (array of string, required): Tile URL templates with `{z}`, `{x}`, and `{y}` placeholders that the map library expands per tile. Usually a single entry pointing at the matching `{z}/{x}/{y}` endpoint. Hand the template to the map library with its placeholders intact: the library substitutes them as it pans and zooms, so a template expanded before it is handed over produces one tile rather than a map. An overlay's template, and in a layer catalog the itinerary and zone layers' templates, carry the `organization_id` the specification or the catalog was asked for with, when one was sent, as a query string of its own, so a credential added to such a template joins it with `&` rather than starting a second `?`.
    - `type` (string, required, one of: `vector`, `raster`, `raster-dem`): What kind of data the source serves, which decides how a map library reads its tiles. A `raster-dem` source carries elevation rather than pixels, so it feeds terrain and hillshade rather than being drawn directly.
    - `zoom_max` (integer (int32), required): Deepest zoom a map library requests this source's tiles at. A layer drawn from the source can reach deeper, and a map overzooms the source's tiles for it. It says where to ask rather than what is refused: a tile asked for deeper is still served, and on a specification served to a publishable key the value is brought within the organization's zoom bounds.
    - `zoom_min` (integer (int32), required): Shallowest zoom a map library requests this source's tiles at. Like `zoom_max`, it says where to ask rather than what is refused, and on a specification served to a publishable key it is brought within the organization's zoom bounds.

- `overlays` (array of CategoryOverlays, required): The overlay catalog, grouped. Each group holds the overlays a caller can add to a map. Under a publishable key or a share token the overlays a map draws are the ones the organization's overlay allowlist admits, and the Tile API holds every overlay tile to it. The Tile API's own catalog, `getTileLayers`, lists only those, dropping a group left with none; the Map Studio API's `getLayers` lists every overlay whatever the allowlist says. From Mountaya's web application both list every overlay, in the person's own space and in each organization they are a member of, while the Tile API draws in the studio scope `organization_id` names: the points of interest alone in the person's own space and in an organization that does not hold Map Studio, and every overlay in one that does.
  - `children` (array of Overlay, required): The overlays in this group. These are the renderable entries; the group itself is not.

    See [the Overlay object](https://docs.mountaya.com/en/apis/tiles/reference/overlays.md#overlay-object).
  - `id` (string (uuid), required): Identifier of the overlay group.
  - `locales` (object, required): The category's display name per language. Render from here rather than from `slug`: the slug is a stable identifier and is not translated.
    - `de` (LocaleMap | null, required): The German strings for this legend. Null when the legend carries no German translation, which is the case a client falls back from rather than renders.
    - `en` (LocaleMap | null, required): The English strings for this legend. Null when the legend carries no English translation, which is the case a client falls back from rather than renders.
    - `es` (LocaleMap | null, required): The Spanish strings for this legend. Null when the legend carries no Spanish translation, which is the case a client falls back from rather than renders.
    - `fr` (LocaleMap | null, required): The French strings for this legend. Null when the legend carries no French translation, which is the case a client falls back from rather than renders.
    - `it` (LocaleMap | null, required): The Italian strings for this legend. Null when the legend carries no Italian translation, which is the case a client falls back from rather than renders.
    - `ja` (LocaleMap | null, required): The Japanese strings for this legend. Null when the legend carries no Japanese translation, which is the case a client falls back from rather than renders.
    - `zh` (LocaleMap | null, required): The Chinese strings for this legend. Null when the legend carries no Chinese translation, which is the case a client falls back from rather than renders.
  - `slug` (string, required): Stable, URL-safe identifier of the overlay group. Unlike the display name in `locales`, it does not change between languages or releases. Lowercase letters, digits and single hyphens, the same shape every slug on this surface carries.

- `terrains` (array of Terrain, required): The terrain base maps a caller can draw itineraries and zones on.

  See [the Terrain object](https://docs.mountaya.com/en/apis/tiles/reference/terrains.md#terrain-object).

- `zones` (object, required): The single layer that draws the zones this credential reaches, in the studio scope `organization_id` names when the catalog was asked for one, which its URL template then carries. Typed as an overlay and kept outside the `overlays` groups for the reason `itineraries` gives.
  - `capabilities` (object, required): Which of this overlay's options each side of the wire resolves, so read this before building the control. Where `server.timestamp` is true, a tile's `timestamp` selects the instant it depicts. Where it is false, the instant sent is ignored, and any change over time is the client's to draw from what it already holds. Two settings are refused. A `timestamp` that is not an RFC 3339 instant, or that lies more than three days before or six days after the request, is a `400` on every overlay tile, whether or not the overlay has a time dimension. Where `server.timestamp` is true, an instant more than 15 minutes from the current one is a `403` unless the organization's `with_overlays_control` safety rule allows it, a share-token request included.
    - `client` (object, required): Which of the optional behaviours the CLIENT is expected to provide for this overlay, such as restyling data it already holds when the moment changes.
      - `timestamp` (boolean, required): Whether this side of the wire resolves the moment the overlay depicts.
    - `server` (object, required): Which of the optional behaviours the SERVER provides for this overlay, such as serving the tile for a requested instant.
      - `timestamp` (boolean, required): Whether this side of the wire resolves the moment the overlay depicts.
  - `content_type` (string, required, one of: `image/png`, `application/x-protobuf`, `image/webp`): What the overlay's tiles carry, which decides how they are drawn: a raster overlay is an image layer, a vector one is styled by the layers its specification declares. For a raster overlay it names the format of the tiles within its source's zoom range; a tile asked for deeper than that is cut from its ancestor and is always PNG, so read each tile's `Content-Type` header rather than this.
  - `id` (string (uuid), required): Identifier of the overlay. `slug` is the value the Tile API takes; this is the one the catalog keys on.
  - `locales` (object, required): The overlay's display name and blurb per language. A language absent here is null rather than missing, which is the case to fall back from.
    - `de` (LocaleMap | null, required): The German strings for this legend. Null when the legend carries no German translation, which is the case a client falls back from rather than renders.
    - `en` (LocaleMap | null, required): The English strings for this legend. Null when the legend carries no English translation, which is the case a client falls back from rather than renders.
    - `es` (LocaleMap | null, required): The Spanish strings for this legend. Null when the legend carries no Spanish translation, which is the case a client falls back from rather than renders.
    - `fr` (LocaleMap | null, required): The French strings for this legend. Null when the legend carries no French translation, which is the case a client falls back from rather than renders.
    - `it` (LocaleMap | null, required): The Italian strings for this legend. Null when the legend carries no Italian translation, which is the case a client falls back from rather than renders.
    - `ja` (LocaleMap | null, required): The Japanese strings for this legend. Null when the legend carries no Japanese translation, which is the case a client falls back from rather than renders.
    - `zh` (LocaleMap | null, required): The Chinese strings for this legend. Null when the legend carries no Chinese translation, which is the case a client falls back from rather than renders.
  - `slug` (string, required): Stable, URL-safe identifier of the overlay, and the value the Tile API takes in `/v1/overlays/{overlay}/...`. Lowercase letters, digits and single hyphens, so it is safe in a path segment without escaping. The shape is declared here and on that path parameter identically, because a value this read hands a client is a value that client sends straight back.
  - `sources` (array of TileSource, required): Tile sources to register with the map renderer before this overlay can be drawn.
    - `attribution` (string): Attribution HTML to display on the map for this source: the credit of whoever supplies its data, Mountaya for a resource source and the data provider for an overlay. Pass through to the `attribution` option of `map.addSource()`.
    - `id` (string, required): Unique source identifier. Use it as the first argument to `map.addSource()` and as the `source` of every layer that draws from it.

      Declared as a string rather than a UUID so that it stays opaque: a resource source is named by the resource's id, and an overlay or aggregate source by a fixed identifier of its own. Every one of them is spelled as a UUID, but that shape is not part of this contract, so treat it as an opaque string and match it against a layer's `source` rather than parsing it.
    - `layers` (array of TileLayer, required): Render-layers to draw from this source, in paint order. Each becomes one `map.addLayer()` call.
      - `filter` (array of any): Optional MapLibre/Mapbox filter expression restricting which features the layer renders. Pass through to the `filter` option of `map.addLayer()`. Omitted when no filter applies; never null and never an empty array.
      - `id` (string, required): Unique layer identifier. Use it as the first argument to `map.addLayer()`.

        A composite path rather than a UUID, for example `itineraries/<itinerary_id>/lines`. Treat it as an opaque string: the shape is a rendering detail and is free to change, and it is the only kind of `id` on this surface that a UUID parser would reject.
      - `key` (string, required): Stable, human-readable concept slug grouping render-layers that depict the same map concept (e.g. "parking", "hillshade"). Unlike `id`, which is the per-layer unique identifier, `key` MAY repeat across several layers of the same overlay when one concept is rendered with multiple layers (a fill plus a symbol, for instance). Clients group and toggle layers by `key`; `id` remains the uniqueness guarantee.

        The empty string is a real value, and means this layer belongs to no named concept: an itinerary's own line layers carry it. Group by `key` only after discarding the empty ones, or every unnamed layer collapses into one group.
      - `layout` (object | null, required): MapLibre/Mapbox layout properties for this layer (e.g. `visibility`, symbol placement). Pass through to the `layout` option of `map.addLayer()`. Null when the layer needs no layout overrides.
      - `legend` (object): Optional legend describing how to read the layer's colors or scale. Drives the map UI legend; not consumed by `map.addLayer()`. Omitted when the layer has no legend; never null.
        - `kind` (string, one of: `row`, `compass`): How the legend is laid out: `row` draws the steps below as an ordered row of color swatches, and `compass` as a compass dial, for a directional overlay such as aspect/slope.
        - `locales` (object, required): The legend's title and step labels per language. A language absent here is null rather than missing, which is the case to fall back from.
          - `de` (LocaleMap | null, required): The German strings for this legend. Null when the legend carries no German translation, which is the case a client falls back from rather than renders.
          - `en` (LocaleMap | null, required): The English strings for this legend. Null when the legend carries no English translation, which is the case a client falls back from rather than renders.
          - `es` (LocaleMap | null, required): The Spanish strings for this legend. Null when the legend carries no Spanish translation, which is the case a client falls back from rather than renders.
          - `fr` (LocaleMap | null, required): The French strings for this legend. Null when the legend carries no French translation, which is the case a client falls back from rather than renders.
          - `it` (LocaleMap | null, required): The Italian strings for this legend. Null when the legend carries no Italian translation, which is the case a client falls back from rather than renders.
          - `ja` (LocaleMap | null, required): The Japanese strings for this legend. Null when the legend carries no Japanese translation, which is the case a client falls back from rather than renders.
          - `zh` (LocaleMap | null, required): The Chinese strings for this legend. Null when the legend carries no Chinese translation, which is the case a client falls back from rather than renders.
        - `steps` (array of TileLegendStep): Ordered color stops mapping a value (or bucket) to the color the layer paints for it, from low to high. Drives a graduated or categorical legend.
          - `color` (string, required): CSS color the layer paints for this step (e.g. "#1c7ed6"). Matches the color used in the layer's paint expression.

            Case-insensitive, unlike the colors on an itinerary's segments, waypoints and segment groups. Those are values a caller wrote, normalized to the six-digit lowercase form on the way in; this one is read from the layer's own palette and served in whatever case that palette is written in. Compare these case-insensitively rather than by string equality.
          - `step` (string, required): Label for the value or bucket this color represents, such as a threshold like "20" or a range like "25 - 30". It is the same in every language: the legend's translated text is in its `locales`.
        - `unit` (string, one of: `km/h`, `degrees`, `m`, `cm`, `celsius`, `percent`): The unit the step values are measured in, for the suffix a legend prints beside each one. Absent when the steps are categories rather than quantities.
      - `paint` (object | null, required): MapLibre/Mapbox paint properties for this layer (colors, opacity, widths, data-driven expressions). Pass through to the `paint` option of `map.addLayer()`. Null when the layer relies on style defaults.
      - `source` (string): Identifier of the source this layer draws from. Matches the `id` of the enclosing tile source.
      - `source_layer` (string, required): Name of the layer within a vector tile to render (e.g. "fills", "points", "lines"). Pass through to the `source-layer` option of `map.addLayer()`. Only meaningful for vector sources.
      - `type` (string, required, one of: `raster`, `hillshade`, `fill`, `line`, `circle`, `symbol`): How this layer draws, and what `paint` may carry: a map library maps it onto its own layer type, so pass it through rather than inferring one from the source.
      - `zoom_max` (integer (int32), required): Highest zoom level at which the layer is drawn. Pass to the `maxzoom` option of `map.addLayer()`.
      - `zoom_min` (integer (int32), required): Lowest zoom level at which the layer is drawn. Pass to the `minzoom` option of `map.addLayer()`.
    - `size` (integer (int32), one of: `256`, `512`): Edge length in pixels of one raster tile, for `map.addSource()`'s `tileSize`. Omitted for vector sources, which have no pixel size of their own.
    - `tiles` (array of string, required): Tile URL templates with `{z}`, `{x}`, and `{y}` placeholders that the map library expands per tile. Usually a single entry pointing at the matching `{z}/{x}/{y}` endpoint. Hand the template to the map library with its placeholders intact: the library substitutes them as it pans and zooms, so a template expanded before it is handed over produces one tile rather than a map. An overlay's template, and in a layer catalog the itinerary and zone layers' templates, carry the `organization_id` the specification or the catalog was asked for with, when one was sent, as a query string of its own, so a credential added to such a template joins it with `&` rather than starting a second `?`.
    - `type` (string, required, one of: `vector`, `raster`, `raster-dem`): What kind of data the source serves, which decides how a map library reads its tiles. A `raster-dem` source carries elevation rather than pixels, so it feeds terrain and hillshade rather than being drawn directly.
    - `zoom_max` (integer (int32), required): Deepest zoom a map library requests this source's tiles at. A layer drawn from the source can reach deeper, and a map overzooms the source's tiles for it. It says where to ask rather than what is refused: a tile asked for deeper is still served, and on a specification served to a publishable key the value is brought within the organization's zoom bounds.
    - `zoom_min` (integer (int32), required): Shallowest zoom a map library requests this source's tiles at. Like `zoom_max`, it says where to ask rather than what is refused, and on a specification served to a publishable key it is brought within the organization's zoom bounds.

### An example Layers

```json
{
  "elevation": {
    "id": "55763749-32b4-42d5-9f62-b6c51ef54d99",
    "tile_size": 512,
    "url": "https://tiles.mountaya.com/v1/elevation/tiles.json"
  },
  "terrains": [
    {
      "id": "cad23e29-49da-4009-9f99-63dbcd963dc0",
      "slug": "topo",
      "locales": {
        "de": null,
        "en": {
          "name": "Summer topo"
        },
        "es": null,
        "fr": {
          "name": "Topo été"
        },
        "it": null,
        "ja": null,
        "zh": null
      },
      "variants": {
        "light": {
          "style": {
            "url": "https://tiles.mountaya.com/v1/terrains/topo/light/style"
          },
          "tiles": {
            "url": "https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json",
            "size": 512
          }
        },
        "dark": {
          "style": {
            "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/style"
          },
          "tiles": {
            "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/tiles.json",
            "size": 512
          }
        }
      }
    }
  ],
  "overlays": [
    {
      "id": "1b7e4d92-6c03-4f85-a2d7-9e0b5c8a3f14",
      "slug": "weather",
      "locales": {
        "de": null,
        "en": {
          "name": "Weather"
        },
        "es": null,
        "fr": {
          "name": "Météo"
        },
        "it": null,
        "ja": null,
        "zh": null
      },
      "children": [
        {
          "id": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
          "slug": "wind",
          "content_type": "application/x-protobuf",
          "capabilities": {
            "client": {
              "timestamp": false
            },
            "server": {
              "timestamp": true
            }
          },
          "locales": {
            "de": null,
            "en": {
              "name": "Wind"
            },
            "es": null,
            "fr": {
              "name": "Vent"
            },
            "it": null,
            "ja": null,
            "zh": null
          },
          "sources": [
            {
              "id": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
              "type": "vector",
              "attribution": "<a href=\"https://www.meteoblue.com/\" target=\"_blank\">&copy; meteoblue</a>",
              "tiles": [
                "https://tiles.mountaya.com/v1/overlays/wind/{z}/{x}/{y}"
              ],
              "zoom_min": 7,
              "zoom_max": 18,
              "layers": [
                {
                  "id": "overlay/b2618568-38a1-449b-8318-386b9b42cb4e",
                  "key": "wind",
                  "type": "fill",
                  "source": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
                  "source_layer": "windLayer",
                  "zoom_min": 7,
                  "zoom_max": 18,
                  "layout": null,
                  "paint": {
                    "fill-color": "#5D8DBD",
                    "fill-opacity": 0.6
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "itineraries": {
    "id": "2d8f4e6a-1b3c-4d5e-9f8a-7c6b5a4d3e2f",
    "slug": "itineraries",
    "content_type": "application/x-protobuf",
    "capabilities": {
      "client": {
        "timestamp": false
      },
      "server": {
        "timestamp": false
      }
    },
    "locales": {
      "de": null,
      "en": {
        "name": "Itineraries"
      },
      "es": null,
      "fr": {
        "name": "Itinéraires"
      },
      "it": null,
      "ja": null,
      "zh": null
    },
    "sources": [
      {
        "id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
        "type": "vector",
        "attribution": "<a href=\"https://mountaya.com/\" target=\"_blank\">&copy; Mountaya</a>",
        "tiles": [
          "https://tiles.mountaya.com/v1/itineraries/{z}/{x}/{y}"
        ],
        "zoom_min": 5,
        "zoom_max": 18,
        "layers": [
          {
            "id": "itineraries/9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d/lines",
            "key": "",
            "type": "line",
            "source": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
            "source_layer": "itinerary_lines",
            "zoom_min": 5,
            "zoom_max": 18,
            "layout": {
              "line-cap": "round",
              "line-join": "round"
            },
            "paint": {
              "line-color": "#2f80ed",
              "line-width": 3
            }
          }
        ]
      }
    ]
  },
  "zones": {
    "id": "58e506ec-06dd-44ef-8924-5c90ee360fe2",
    "slug": "zones",
    "content_type": "application/x-protobuf",
    "capabilities": {
      "client": {
        "timestamp": false
      },
      "server": {
        "timestamp": true
      }
    },
    "locales": {
      "de": null,
      "en": {
        "name": "Zones"
      },
      "es": null,
      "fr": {
        "name": "Zones"
      },
      "it": null,
      "ja": null,
      "zh": null
    },
    "sources": [
      {
        "id": "fc79978a-0e9c-4491-a5e4-b0de35a8b508",
        "type": "vector",
        "attribution": "<a href=\"https://mountaya.com/\" target=\"_blank\">&copy; Mountaya</a>",
        "tiles": [
          "https://tiles.mountaya.com/v1/zones/{z}/{x}/{y}"
        ],
        "zoom_min": 5,
        "zoom_max": 18,
        "layers": [
          {
            "id": "zones/fc79978a-0e9c-4491-a5e4-b0de35a8b508/fills",
            "key": "",
            "type": "fill",
            "source": "fc79978a-0e9c-4491-a5e4-b0de35a8b508",
            "source_layer": "fills",
            "zoom_min": 5,
            "zoom_max": 18,
            "layout": null,
            "paint": {
              "fill-color": "#F03E3E",
              "fill-opacity": 0.25
            }
          }
        ]
      }
    ]
  }
}
```

## List the terrains, overlays and layers this API draws

### GET /v1/tile-layers

- Operation: `getTileLayers`
- Requires: scope `tiles`
- Behavior: idempotent, safe to retry · answers within 30000 ms or times out

Returns the map layer catalog this API draws from: the terrain base maps, the elevation raster the terrains are shaded from, the grouped overlay layers, and the two layers that draw itineraries and zones. It is the catalog the Map Studio API's `getLayers` answers at its `/v1/layers`, in the same shape, served here under the `tiles` scope, so a map drawn with the Tile API alone finds every layer by its slug without Map Publishing.

Under a publishable key or a share token, `overlays` lists only the overlays the organization's overlay allowlist admits, the ones this API draws for the credential, and a group left with none is dropped: the allowlist starts empty on a new organization, so the groups are empty until Mountaya sets it as the organization's agreement states. An overlay listed here may still be drawn only at the present instant: the organization's overlay time control decides whether one whose `capabilities.server.timestamp` is true is drawn more than 15 minutes from the current instant, which this catalog does not report. The terrains, the elevation raster and the itinerary and zone layers are listed for every credential.

The optional `organization_id` names the studio scope the catalog is drawn for, as on the overlay routes. Under a publishable key or a share token it may name only the credential's own organization and changes nothing. From Mountaya's web application it chooses between the person's own space and an organization they are a member of, and `overlays` lists every overlay in either, so the studio can show the ones the scope does not draw, locked. This API draws the points of interest alone in the person's own space and in an organization that does not hold Map Studio, and every overlay in one that does, and the itinerary and zone layers draw the scope's own itineraries and zones. When it is sent, the tile URL template of every overlay and of the itinerary and zone layers carries it on, so the tiles a map fetches are drawn in the scope the catalog was served for.

Like a specification, the catalog is never recorded, and it counts toward the per-minute bounds "What is counted" lists for its surface.

A publishable key needs the `tiles` scope, or `publishing` on a request from a page on Mountaya's own domain. A share token carries its own authority and needs none.

**Query parameters**

- `organization_id` (string (uuid), in query, optional): The studio scope the map draws in, named by the organization's identifier. A value that is not a UUID in its canonical form, or the nil UUID, is a `400` naming `organization_id`.

  Under a publishable key or a share token it may name only the credential's own organization: any other identifier is a `403`, whether or not it exists. It changes nothing but being echoed, so a request sending it is answered as one that omits it, and every URL template an answer returns under `sources[].tiles` for a layer that takes it carries the same `organization_id`.

  A request from Mountaya's web application, which carries the person's own session rather than a key or a share token, uses it to choose the scope it draws in. Omitted, the scope is the person's own space, which has no identifier of its own to send. Naming an organization the person is a member of makes that organization the scope. Any other identifier, an organization the person is not a member of or one that does not exist, is a `404`, so the parameter cannot be used to learn which organizations exist.

  What a scope draws depends on the layer. The overlays served under a key or a share token are the ones the organization's overlay allowlist admits. From Mountaya's web application, the person's own space draws the points of interest alone, and an organization draws every overlay when it holds Map Studio and the points of interest alone when it does not, an overlay outside the scope being a `403`. The itinerary and zone tiles draw what the scope holds: in the person's own space, their own itineraries and zones, which belong to no organization, and in an organization, its itineraries and zones, never those of another space the person belongs to.

Also takes `Accept-Language`, as every operation of this API does: the [overview](https://docs.mountaya.com/en/apis/tiles/reference.md) describes it.

**Response** `200`

The layer catalog: the terrains, the elevation raster, the overlay groups, and the itinerary and zone layers, each with the tile sources and styling it resolves to, the overlays narrowed to the ones this API draws for the credential. When the request named an `organization_id`, the tile URL template of every overlay and of the itinerary and zone layers carries the same `organization_id` under `sources[].tiles`.

- `extensions` (object): Top-level extensions map for 2xx responses. Mirrors the GraphQL-spec response extensions: a free-form map for response-scoped metadata.
  - `metadata` (object): Response-scoped metadata. Its shape is per-operation: the operation that emits it names the schema, and an operation that documents none never emits this field.

- `data` (Layers, required): The built-in map layer catalog: the terrain base maps, the grouped overlay layers, and the two layers that render itineraries and zones. `itineraries` and `zones` are typed as overlays because that is what they are to a map: one tile source each, registered the same way. But they are singular and always present, so they sit beside the `overlays` groups rather than inside them.

  `elevation` is the one entry that draws nothing. It is the height raster the terrains bake their relief from, and it is always present: the terrains and the raster they are shaded from are published together, so a catalog that offers a terrain offers the heights that terrain is drawn against.

  See [the Layers object](https://docs.mountaya.com/en/apis/tiles/reference/layers.md#layers-object).

**Errors** `400`, `401`, `402`, `403`, `404`, `405`, `429`, `500`, `504`. See [Errors](https://docs.mountaya.com/en/apis/conventions/errors.md).

- `400`: Bad Request
- `401`: Unauthorized
- `402`: A publishable-key request from an organization whose entitlements do not grant the capability the request needs: `tiles`, or `publishing` on a request from a page on Mountaya's own domain. Both are granted by the organization's agreement with Mountaya, so this clears when the agreement changes rather than when the request does. No catalog is served for it. The capability is checked before the key's scope, so a key that lacks the scope as well is answered this rather than a `403`. It is not a permissions failure and does not clear by changing the request. A share-token request is never answered with this status: a share link is never refused for a capability.
- `403`: The credential is valid and this operation is not open to it: the key does not carry the scope the request needs (`tiles`, or `publishing` on a request from a page on Mountaya's own domain), or the request's page is not an allowed one: under a key, one outside the organization's allowed domains, and under a share token, any page not on Mountaya's own domain. So is an `organization_id` naming an organization other than the credential's own, whether or not it exists. An allowlist that admits no overlay is not refused here: the catalog is served with no overlay group.
- `404`: Answered only from Mountaya's web application: `organization_id` names an organization the person is not a member of, or one that does not exist. The two answer alike, so the parameter cannot be used to learn which organizations exist. Under a publishable key or a share token an identifier other than the credential's own organization is a `403` instead, whether or not it exists.
- `405`: The path takes `GET`, `HEAD`, which answers the headers a `GET` would with no body, and `OPTIONS` as a CORS preflight, and nothing else. Every route on this surface reads, so a write method is refused before the credential is even looked at, which is why this answers ahead of `401`. The `Allow` response header names the methods the path does take.
- `429`: `TooManyRequests`, given in full at the end of this page.
- `500`: Internal Server Error
- `504`: Gateway Timeout

**cURL**

```bash
curl -s https://tiles.mountaya.com/v1/tile-layers \
  -H "X-API-Key: pk_your_publishable_key" | jq '[.data.overlays[].children[].slug]'
```

**TypeScript**

```typescript
import { Mountaya } from "@mountaya/client";

const mountaya = new Mountaya({
  credential: { publishableKey },
});

const { data } = await mountaya.tiles.getTileLayers();

console.log(data);
```

**Python**

```python
import requests

response = requests.get(
    "https://tiles.mountaya.com/v1/tile-layers",
    headers={
        "X-API-Key": "pk_your_publishable_key",
    },
    timeout=30,
)
response.raise_for_status()
print(response.json()["data"])
```

Response 200:

```json
{
  "data": {
    "elevation": {
      "id": "55763749-32b4-42d5-9f62-b6c51ef54d99",
      "tile_size": 512,
      "url": "https://tiles.mountaya.com/v1/elevation/tiles.json"
    },
    "terrains": [
      {
        "id": "cad23e29-49da-4009-9f99-63dbcd963dc0",
        "slug": "topo",
        "locales": {
          "de": null,
          "en": {
            "name": "Summer topo"
          },
          "es": null,
          "fr": {
            "name": "Topo été"
          },
          "it": null,
          "ja": null,
          "zh": null
        },
        "variants": {
          "light": {
            "style": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/light/style"
            },
            "tiles": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json",
              "size": 512
            }
          },
          "dark": {
            "style": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/style"
            },
            "tiles": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/tiles.json",
              "size": 512
            }
          }
        }
      }
    ],
    "overlays": [
      {
        "id": "1b7e4d92-6c03-4f85-a2d7-9e0b5c8a3f14",
        "slug": "weather",
        "locales": {
          "de": null,
          "en": {
            "name": "Weather"
          },
          "es": null,
          "fr": {
            "name": "Météo"
          },
          "it": null,
          "ja": null,
          "zh": null
        },
        "children": [
          {
            "id": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
            "slug": "wind",
            "content_type": "application/x-protobuf",
            "capabilities": {
              "client": {
                "timestamp": false
              },
              "server": {
                "timestamp": true
              }
            },
            "locales": {
              "de": null,
              "en": {
                "name": "Wind"
              },
              "es": null,
              "fr": {
                "name": "Vent"
              },
              "it": null,
              "ja": null,
              "zh": null
            },
            "sources": [
              {
                "id": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
                "type": "vector",
                "attribution": "<a href=\"https://www.meteoblue.com/\" target=\"_blank\">&copy; meteoblue</a>",
                "tiles": [
                  "https://tiles.mountaya.com/v1/overlays/wind/{z}/{x}/{y}"
                ],
                "zoom_min": 7,
                "zoom_max": 18,
                "layers": [
                  {
                    "id": "overlay/b2618568-38a1-449b-8318-386b9b42cb4e",
                    "key": "wind",
                    "type": "fill",
                    "source": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
                    "source_layer": "windLayer",
                    "zoom_min": 7,
                    "zoom_max": 18,
                    "layout": null,
                    "paint": {
                      "fill-color": "#5D8DBD",
                      "fill-opacity": 0.6
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "itineraries": {
      "id": "2d8f4e6a-1b3c-4d5e-9f8a-7c6b5a4d3e2f",
      "slug": "itineraries",
      "content_type": "application/x-protobuf",
      "capabilities": {
        "client": {
          "timestamp": false
        },
        "server": {
          "timestamp": false
        }
      },
      "locales": {
        "de": null,
        "en": {
          "name": "Itineraries"
        },
        "es": null,
        "fr": {
          "name": "Itinéraires"
        },
        "it": null,
        "ja": null,
        "zh": null
      },
      "sources": [
        {
          "id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
          "type": "vector",
          "attribution": "<a href=\"https://mountaya.com/\" target=\"_blank\">&copy; Mountaya</a>",
          "tiles": [
            "https://tiles.mountaya.com/v1/itineraries/{z}/{x}/{y}"
          ],
          "zoom_min": 5,
          "zoom_max": 18,
          "layers": [
            {
              "id": "itineraries/9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d/lines",
              "key": "",
              "type": "line",
              "source": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
              "source_layer": "itinerary_lines",
              "zoom_min": 5,
              "zoom_max": 18,
              "layout": {
                "line-cap": "round",
                "line-join": "round"
              },
              "paint": {
                "line-color": "#2f80ed",
                "line-width": 3
              }
            }
          ]
        }
      ]
    },
    "zones": {
      "id": "58e506ec-06dd-44ef-8924-5c90ee360fe2",
      "slug": "zones",
      "content_type": "application/x-protobuf",
      "capabilities": {
        "client": {
          "timestamp": false
        },
        "server": {
          "timestamp": true
        }
      },
      "locales": {
        "de": null,
        "en": {
          "name": "Zones"
        },
        "es": null,
        "fr": {
          "name": "Zones"
        },
        "it": null,
        "ja": null,
        "zh": null
      },
      "sources": [
        {
          "id": "fc79978a-0e9c-4491-a5e4-b0de35a8b508",
          "type": "vector",
          "attribution": "<a href=\"https://mountaya.com/\" target=\"_blank\">&copy; Mountaya</a>",
          "tiles": [
            "https://tiles.mountaya.com/v1/zones/{z}/{x}/{y}"
          ],
          "zoom_min": 5,
          "zoom_max": 18,
          "layers": [
            {
              "id": "zones/fc79978a-0e9c-4491-a5e4-b0de35a8b508/fills",
              "key": "",
              "type": "fill",
              "source": "fc79978a-0e9c-4491-a5e4-b0de35a8b508",
              "source_layer": "fills",
              "zoom_min": 5,
              "zoom_max": 18,
              "layout": null,
              "paint": {
                "fill-color": "#F03E3E",
                "fill-opacity": 0.25
              }
            }
          ]
        }
      ]
    }
  }
}
```

**Error answers the operations of this page share**

- `TooManyRequests` (`429`): A bound the request's surface is held to is spent: for the organization's own clients and its hosted embed, the organization's per-minute limit or its monthly allowance, or, under a key sent without a session token or with one minted without `user_id`, the bound on the client's IP address, an IPv6 address counted by its `/64` prefix; for an Embedded Studio, the bound of the member its session names, or of its client IP address for a session minted without `user_id`, or its organization's; for a share link, the bound on the client's IP address or the bound of the organization that owns the link; for Mountaya's web application, the 6,000 a minute of the person signed in to it, which carries no rate-limit fields. Or the client's IP address has had 60 unknown share tokens refused within the minute, or 60 unknown publishable keys, a key refused again within seconds counted once, and the token or the key it sends was not resolved moments earlier. Every one carries `Retry-After`: for a per-minute bound, the seconds left in the minute; for a spent monthly allowance, the whole seconds until the organization's next billing period begins, until which every request of the organization's own clients and of its hosted embed, specifications included, is refused; for a share token or a publishable key refused because its address had 60 unknown ones refused, the seconds left in that minute. A share token or a publishable key resolved moments earlier is never refused that last way. `RateLimit-Policy` and `RateLimit` say which bound was spent, except on the refusal of an unknown share token or of an unknown publishable key, which no bound of the organization's counts: that answer carries no `RateLimit-Policy` or `RateLimit` field.
