---
title: "Compile a style manifest"
method: POST
path: "/styles/compile"
tags: ["cartography"]
---

# Compile a style manifest

`POST /styles/compile`

## Request

- Base URL: `https://api.mapsource.io`
- URL: `https://api.mapsource.io/styles/compile`
- Auth: HTTP bearer

Compiles a semantic manifest into a validated MapLibre style, returning a bundle hash and an optional diff against a base preset.

When to use: Validate and preview style changes before saving a profile.

When not to use: Submit a semantic manifest or preset patch; raw MapLibre JSON is not accepted.

## Request body

- object
  - `manifest` object: A complete style manifest.
  - `base` 'light' | 'dark' | 'operations' | 'solarized-light' | 'solarized-dark' | 'mapsource': Preset to patch instead, which adds a diff to the response.
  - `patch` object: Semantic overrides merged onto the base.
  - `include` 'style' | 'summary': summary omits the compiled style.

## Response `200`

Compile a style manifest

- object
  - `schema` string
  - `hash` string
  - `provenance` object
  - `contract` object
  - `issues` unknown[]
    - unknown
  - `semanticMap` object
  - `diff` unknown[]: Compiled layers that differ from the base preset.
    - unknown
  - `semanticDiff` unknown[]: Changed semantic properties with previous and updated values.
    - unknown
  - `style` object
  - `manifest` object

## Other responses

- `400`: Error with a stable machine code.
- `401`: Error with a stable machine code.
- `429`: Error with a stable machine code.
- `500`: Error with a stable machine code.

---

[API](https://skmtc.dev/mapsource/apis/mapsource-overpass-api.md) · [All operations](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/revisions/8af8c2769e7b?raw)
