> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/api/ja/llms.txt)

# Mapbox Tiling Service v2

> **Note (beta): Public Beta for Mapbox Tiling Service v2**
> 
> Mapbox Tiling Service v2 and the Tilesets API v2 are in public beta. The API may change before general availability.

> **Note: Mapbox Tiling Service v1**
> 
> This page documents MTS v2, which uses the Tilesets API v2 (`/tilesets/v2`) to build tilesets from datasources. For tileset sources, changesets, and raster tilesets, see [Mapbox Tiling Service v1](https://docs.mapbox.com/api/ja/maps/mapbox-tiling-service/).

**Mapbox Tiling Service (MTS) v2** uses the Tilesets API v2 to create, edit, and publish tilesets from [datasources](https://docs.mapbox.com/api/ja/maps/interlaken/). A tileset's recipe points at datasource branches, so the tileset can follow its data as it changes.

Before you publish, you can preview what a publish will cost. A [quote](#quote-a-publish) shows you the compute units (CU) that publishing your recipe will use before you publish your tileset. For how Mapbox bills compute units, see [Mapbox Tiling Service pricing](https://docs.mapbox.com/mapbox-tiling-service/guides/pricing/).

Every recipe change produces a *preview* version of the tileset that you can inspect in a map on the Mapbox Console using the [Data Workbench](https://console.mapbox.com/studio/data-workbench/) before you publish. Publishing runs an MTS job and moves the tileset's `latest` tag to the result, so your maps keep serving the last published version until the new one is ready.

## Create a tileset

**POST** : `https://api.mapbox.com/tilesets/v2/{account}.{id}` [Token scope: **tilesets:write**]

Creates a tileset. The recipe is optional:

-   **With a recipe**, the recipe is validated and the tileset gets a `preview` tag.
-   **Without a recipe**, the tileset is created blank, with type `vector` and no tags. Add a recipe later with the [Replace a tileset's recipe endpoint](#replace-a-tilesets-recipe) to be able to publish the tileset.

Creating a tileset doesn't publish it. To process the tileset so you can use it in a map, [publish it](#publish-a-tileset).

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that will own the tileset. |
| `id` | `string` | The ID of the tileset within the account. Up to 32 characters. The only allowed characters are lowercase letters, numbers, `-`, and `_`. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. The token must belong to `account`. |

The request body is a JSON object with any of the following properties:

| Optional body properties | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` | `{id}` | A name for the tileset, up to 64 characters. Letters, numbers, spaces, `-`, `_`, and `.` are allowed. |
| `description` | `string` | None | A description of the tileset, up to 500 characters. |
| `attribution` | array of objects | None | Up to three attributions, each with a `text` and an optional `link`. The combined length of all `text` values must be 80 characters or fewer. |
| `visibility` | `string` | `private` | Who can read the tileset: `private` (only your account) or `public` (any account with a valid access token). |
| `recipe` | `object` | None | The tileset's recipe. Every layer's `source` must be a datasource URI in the form `mapbox://datasource/{account}/{datasource}/{branch}`, and `minzoom` and `maxzoom` must be from `0` to `16`. |

### Example request: Create a tileset

```bash
$ curl -X POST "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees?access_token=TOKEN_PLACEHOLDER::tilesets:write" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Trees",
    "description": "Street trees, refreshed nightly",
    "visibility": "private",
    "attribution": [
      { "text": "City open data", "link": "https://example.com/open-data" }
    ],
    "recipe": {
      "version": 1,
      "layers": {
        "trees": {
          "source": "mapbox://datasource/YOUR_MAPBOX_USERNAME/trees",
          "minzoom": 12,
          "maxzoom": 15
        }
      }
    }
  }'
```

### Response: Create a tileset

If the tileset is created, the response has an HTTP `201 Created` status and contains the [tileset object](#response-retrieve-a-tileset). If a tileset with this ID already exists, the response is an HTTP `409 Conflict` error. If the recipe isn't valid, the response is an HTTP `422 Unprocessable Entity` error with an `errors` array that lists each problem.

#### Example response: Create a tileset

```json
{
  "tilesetId": "penny.trees",
  "owner": "penny",
  "name": "Trees",
  "description": "Street trees, refreshed nightly",
  "attribution": [
    { "text": "City open data", "link": "https://example.com/open-data" }
  ],
  "type": "vector",
  "visibility": "private",
  "created": "2026-07-15T00:00:00.000Z",
  "modified": "2026-07-15T00:00:00.000Z",
  "tags": {
    "preview": {
      "version": "aaaabbbbccccdddd",
      "modified": "2026-07-15T00:00:00.000Z"
    }
  }
}
```

## Retrieve a tileset

**GET** : `https://api.mapbox.com/tilesets/v2/{account}.{id}` [Token scope: **tilesets:read**]

Retrieves a tileset's properties and tags. The recipe isn't included; to get it, use the [Retrieve a tileset's recipe endpoint](#retrieve-a-tilesets-recipe).

A `private` tileset can only be retrieved by its owner. Other accounts receive an HTTP `404 Not Found` error, the same as for a tileset that doesn't exist.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. |

### Example request: Retrieve a tileset

```bash
$ curl "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees?access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: Retrieve a tileset

If the request is successful, the response contains a tileset object with the following properties:

| Property | Type | Description |
| --- | --- | --- |
| `tilesetId` | `string` | The tileset ID, in the form `{account}.{id}`. |
| `owner` | `string` | The account that owns the tileset. |
| `name` | `string` | The name of the tileset. |
| `description` | `string` | The description of the tileset. |
| `attribution` | array of objects | The tileset's attributions, each with a `text` and an optional `link`. |
| `type` | `string` | The type of tileset. Always `vector`. |
| `visibility` | `string` | `private` or `public`. |
| `created` | `string` | When the tileset was created, as an ISO 8601 timestamp. |
| `modified` | `string` | When the tileset was last changed, as an ISO 8601 timestamp. Changing the tileset's properties or recipe, deleting its recipe, and publishing it all update it. |
| `tags` | `object` | The tileset's tags, by name. Each tag has a `version` (the version the tag points at) and a `modified` timestamp (when the tag last moved). Empty or absent if the tileset has never had a recipe. |
| `tags.preview` | `object` | The current preview of the recipe. |
| `tags.latest` | `object` | The most recent successful publish. Absent until the tileset is published for the first time. |
| `metadata` | `object` | Your own metadata for the tileset, if you set any with the [Update tileset metadata endpoint](#update-tileset-metadata). |

#### Example response: Retrieve a tileset

In this example, `tags.preview` and `tags.latest` point at different versions, so the tileset has changes that aren't published yet.

```json
{
  "tilesetId": "penny.trees",
  "owner": "penny",
  "name": "Trees",
  "description": "Street trees, refreshed nightly",
  "attribution": [
    { "text": "City open data", "link": "https://example.com/open-data" }
  ],
  "type": "vector",
  "visibility": "private",
  "created": "2026-07-15T00:00:00.000Z",
  "modified": "2026-08-02T00:00:00.000Z",
  "tags": {
    "preview": {
      "version": "aaaabbbbccccdddd",
      "modified": "2026-08-02T00:00:00.000Z"
    },
    "latest": {
      "version": "def4567890123abc",
      "modified": "2026-07-15T00:00:00.000Z"
    }
  }
}
```

## List tilesets

**GET** : `https://api.mapbox.com/tilesets/v2/{account}` [Token scope: **tilesets:list**]

Lists the V2 tilesets that belong to an account, most recently modified first. Results are returned in pages; see [Pagination](#pagination).

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account whose tilesets to list. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:list` scope. The token must belong to `account`. |

| Optional parameters | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `string` | None (all types) | Only list tilesets of this type. The only type is `vector`. |
| `visibility` | `string` | None (both) | Only list `public` or `private` tilesets. |
| `status` | `string` | None (both) | `published` lists tilesets that have a `latest` tag. `unpublished` lists tilesets that don't. |
| `sortby` | `string` | `modified` | Sort by the `created` or `modified` timestamp. |
| `orderby` | `string` | `desc` | Sort in ascending (`asc`) or descending (`desc`) order. |
| `limit` | `integer` | `100` | The maximum number of tilesets to return, from `1` to `500`. |
| `start` | `string` | None (first page) | The cursor for the next page of results, taken from the `Link` header of the previous response. See [Pagination](#pagination). |

### Example request: List tilesets

```bash
$ curl "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME?status=published&limit=25&access_token=TOKEN_PLACEHOLDER::tilesets:list"
```

### Response: List tilesets

If the request is successful, the response is an array of [tileset objects](#response-retrieve-a-tileset).

#### Example response: List tilesets

```json
[
  {
    "tilesetId": "penny.trees",
    "owner": "penny",
    "name": "Trees",
    "description": "Street trees, refreshed nightly",
    "attribution": [
      { "text": "City open data", "link": "https://example.com/open-data" }
    ],
    "type": "vector",
    "visibility": "private",
    "created": "2026-07-15T00:00:00.000Z",
    "modified": "2026-08-02T00:00:00.000Z",
    "tags": {
      "preview": {
        "version": "aaaabbbbccccdddd",
        "modified": "2026-08-02T00:00:00.000Z"
      },
      "latest": {
        "version": "def4567890123abc",
        "modified": "2026-07-15T00:00:00.000Z"
      }
    }
  }
]
```

### Pagination

Results are returned in pages. When more results are available, the response includes a `Link` header with a URL for the next page:

```
Link: <https://api.mapbox.com/tilesets/v2/penny?limit=25&start=eyJrIjoidHJlZXMifQ&access_token=YOUR_MAPBOX_ACCESS_TOKEN>; rel="next"
```

To get every result, request the `rel="next"` URL from each response until a response has no `Link` header. Treat the `start` value as opaque: don't build or change it. If you send a `start` value that isn't valid, the response is an HTTP `422 Unprocessable Entity` error.

The [List publish jobs for a tileset](#list-publish-jobs-for-a-tileset) and [List publish jobs for an account](#list-publish-jobs-for-an-account) endpoints are paginated the same way.

## Update tileset metadata

**PATCH** : `https://api.mapbox.com/tilesets/v2/{account}.{id}` [Token scope: **tilesets:write**]

Updates one or more of a tileset's properties. Only the properties in the request body change. To change the recipe, use the [Replace a tileset's recipe endpoint](#replace-a-tilesets-recipe).

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. The token must belong to `account`. |

The request body is a JSON object with at least one of the following properties. Any other property, including `recipe`, returns an HTTP `422 Unprocessable Entity` error.

| Optional body properties | Type | Description |
| --- | --- | --- |
| `name` | `string` | A name for the tileset, up to 64 characters. Letters, numbers, spaces, `-`, `_`, and `.` are allowed. |
| `description` | `string` | A description of the tileset, up to 500 characters. |
| `attribution` | array of objects | Up to three attributions, each with a `text` and an optional `link`. The combined length of all `text` values must be 80 characters or fewer. |
| `visibility` | `string` | `private` or `public`. |
| `metadata` | `object` | Your own metadata for the tileset. Replaces any metadata you set before. You can't use keys that start with `mapbox:`, which are reserved. |

### Example request: Update tileset metadata

```bash
$ curl -X PATCH "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees?access_token=TOKEN_PLACEHOLDER::tilesets:write" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Trees 2026",
    "visibility": "public",
    "metadata": { "source": "city-open-data", "refresh": "nightly" }
  }'
```

### Response: Update tileset metadata

If the request is successful, the response contains the updated [tileset object](#response-retrieve-a-tileset).

#### Example response: Update tileset metadata

```json
{
  "tilesetId": "penny.trees",
  "owner": "penny",
  "name": "Trees 2026",
  "description": "Street trees, refreshed nightly",
  "attribution": [
    { "text": "City open data", "link": "https://example.com/open-data" }
  ],
  "type": "vector",
  "visibility": "public",
  "metadata": { "source": "city-open-data", "refresh": "nightly" },
  "created": "2026-07-15T00:00:00.000Z",
  "modified": "2026-08-03T00:00:00.000Z",
  "tags": {
    "preview": {
      "version": "aaaabbbbccccdddd",
      "modified": "2026-08-02T00:00:00.000Z"
    },
    "latest": {
      "version": "def4567890123abc",
      "modified": "2026-07-15T00:00:00.000Z"
    }
  }
}
```

## Delete a tileset

**DELETE** : `https://api.mapbox.com/tilesets/v2/{account}.{id}` [Token scope: **tilesets:write**]

Permanently deletes a tileset. Maps that use the tileset stop receiving its tiles. The datasources the recipe references aren't affected.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. The token must belong to `account`. |

### Example request: Delete a tileset

```bash
$ curl -X DELETE "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees?access_token=TOKEN_PLACEHOLDER::tilesets:write"
```

### Response: Delete a tileset

If the tileset is deleted, the response has an HTTP `204 No Content` status and no body.

## Retrieve a tileset's recipe

**GET** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/recipe` [Token scope: **tilesets:read**]

Retrieves a tileset's recipe, as you wrote it, and the preview version it resolves to now. Only the tileset's owner can retrieve its recipe.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. The token must belong to `account`. |

### Example request: Retrieve a tileset's recipe

```bash
$ curl "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/recipe?access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: Retrieve a tileset's recipe

If the request is successful, the response contains the following properties. If the tileset has no recipe, the response is an HTTP `404 Not Found` error.

| Property | Type | Description |
| --- | --- | --- |
| `recipe` | `object` | The recipe. |
| `version` | `string` | The preview version the recipe resolves to. The same as the tileset's `tags.preview.version`. |

#### Example response: Retrieve a tileset's recipe

```json
{
  "recipe": {
    "version": 1,
    "layers": {
      "trees": {
        "source": "mapbox://datasource/penny/trees",
        "minzoom": 12,
        "maxzoom": 15
      }
    }
  },
  "version": "aaaabbbbccccdddd"
}
```

## Replace a tileset's recipe

**PUT** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/recipe` [Token scope: **tilesets:write**]

Replaces a tileset's recipe. The request body is the complete new recipe, not only the parts that change.

The recipe is validated and its datasource branches are resolved. The result is a new preview version, and the tileset's `preview` tag moves to it. The published `latest` version isn't affected: to publish the change, [publish the tileset](#publish-a-tileset).

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. The token must belong to `account`. |

The request body is a [recipe](https://docs.mapbox.com/mapbox-tiling-service/reference/). For Tilesets API v2, every layer's `source` must be a datasource URI in the form `mapbox://datasource/{account}/{datasource}/{branch}`, and each layer's `minzoom` and `maxzoom` must be from `0` to `16`.

### Example request: Replace a tileset's recipe

```bash
$ curl -X PUT "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/recipe?access_token=TOKEN_PLACEHOLDER::tilesets:write" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1,
    "layers": {
      "trees": {
        "source": "mapbox://datasource/YOUR_MAPBOX_USERNAME/trees",
        "minzoom": 12,
        "maxzoom": 16
      }
    }
  }'
```

### Response: Replace a tileset's recipe

If the request is successful, the response contains the new recipe and its preview `version`, in the same format as the [Retrieve a tileset's recipe endpoint](#response-retrieve-a-tilesets-recipe). If the recipe isn't valid, the response is an HTTP `422 Unprocessable Entity` error with an `errors` array that lists each problem.

#### Example response: Replace a tileset's recipe

```json
{
  "recipe": {
    "version": 1,
    "layers": {
      "trees": {
        "source": "mapbox://datasource/penny/trees",
        "minzoom": 12,
        "maxzoom": 16
      }
    }
  },
  "version": "bbbbccccddddeeee"
}
```

## Delete a tileset's recipe

**DELETE** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/recipe` [Token scope: **tilesets:write**]

Deletes a tileset's recipe, its `preview` tag, and its preview versions. The tileset returns to the state of a tileset created without a recipe.

The published `latest` version isn't affected, so maps that use the tileset keep receiving its published tiles. You can't publish the tileset again until you [add a new recipe](#replace-a-tilesets-recipe).

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. The token must belong to `account`. |

### Example request: Delete a tileset's recipe

```bash
$ curl -X DELETE "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/recipe?access_token=TOKEN_PLACEHOLDER::tilesets:write"
```

### Response: Delete a tileset's recipe

If the recipe is deleted, or the tileset had no recipe, the response has an HTTP `204 No Content` status and no body.

## Validate a recipe

**PUT** : `https://api.mapbox.com/tilesets/v2/validateRecipe` [Token scope: **tilesets:write**]

Checks whether a recipe is valid for your account, without saving it or changing any tileset. Use it to check a recipe before you [create a tileset](#create-a-tileset) or [replace a tileset's recipe](#replace-a-tilesets-recipe).

| Required parameters | Type | Description |
| --- | --- | --- |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. |

| Optional parameters | Type | Default | Description |
| --- | --- | --- | --- |
| `accept_invalid_sources` | `boolean` | `false` | If `true`, datasource URIs that the API can't read produce warnings instead of making the recipe invalid. |

The request body is the [recipe](https://docs.mapbox.com/mapbox-tiling-service/reference/) to validate.

### Example request: Validate a recipe

```bash
$ curl -X PUT "https://api.mapbox.com/tilesets/v2/validateRecipe?access_token=TOKEN_PLACEHOLDER::tilesets:write" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1,
    "layers": {
      "trees": {
        "source": "mapbox://datasource/YOUR_MAPBOX_USERNAME/trees",
        "minzoom": 12,
        "maxzoom": 18
      }
    }
  }'
```

### Response: Validate a recipe

The response has an HTTP `200 OK` status whether the recipe is valid. It contains the following properties:

| Property | Type | Description |
| --- | --- | --- |
| `valid` | `boolean` | `true` if the recipe is valid. |
| `errors` | array of strings | Each problem with the recipe. Only present if `valid` is `false`. |

#### Example response: Validate a recipe

```json
{
  "valid": false,
  "errors": ["layers.trees.maxzoom must be less than or equal to 16"]
}
```

## Run a quote on the publish

**POST** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/quote` [Token scope: **tilesets:read**]

Estimates how many compute units (CU) publishing the tileset's recipe will use. A quote doesn't publish anything, change the tileset, or cost anything. The request has no body.

Use the quote's `id` to make sure the publish you run is the one you quoted. See [Publish a tileset](#publish-a-tileset).

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. The token must belong to `account`. |

### Example request: Run a quote on the publish

```bash
$ curl -X POST "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/quote?access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: Run a quote on the publish

The first quote for a recipe can take a moment to compute. The response's `status` tells you what to do next:

| HTTP status | `status` | What it means |
| --- | --- | --- |
| `202 Accepted` | `planning` | The quote is still being computed. Wait `retry_after_ms` milliseconds (also sent in the `Retry-After` header, in seconds), then send the same request again. |
| `200 OK` | `ready` | The quote is ready. `cu` is the estimated compute units, rounded to three decimals, and `id` identifies the quote. |
| `200 OK` | `no_work` | The last successful publish already covers the recipe, so publishing would do nothing. `cu` is `0`. |

| Property | Type | Description |
| --- | --- | --- |
| `status` | `string` | `planning`, `ready`, or `no_work`. |
| `cu` | `number` | The estimated compute units for the publish. Present when `status` is `ready` or `no_work`. |
| `id` | `string` | The ID of the quote. Present when `status` is `ready`. Treat it as opaque: any change to the recipe or its data gives a new ID. |
| `retry_after_ms` | `integer` | How long to wait before retrying, in milliseconds. Present when `status` is `planning`. |
| `message` | `string` | Why there's nothing to publish. Present when `status` is `no_work`. |

#### Example response: Run a quote on the publish

```json
{
  "status": "ready",
  "cu": 4.213,
  "id": "a3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0de"
}
```

## Publish a tileset

**POST** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/publish` [Token scope: **tilesets:write**]

Starts a publish job that builds tiles from the tileset's recipe. Before the job starts, the recipe is validated again and its datasource branches are resolved, so the job uses the data the branches point at now. When the job succeeds, the tileset's `latest` tag moves to the new version.

The request has no body. The response only confirms that the job was submitted: to follow its progress, [retrieve the publish job](#retrieve-a-publish-job) until its `stage` is `success` or `failed`.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:write` scope. The token must belong to `account`. |

| Optional headers | Description |
| --- | --- |
| `If-Match` | The `id` of a [quote](#quote-a-publish), in double quotes, such as `"a3f5c0de…"`. The tileset is only published if the quote still describes this publish. If the recipe or its data changed, or the tileset was published, since the quote, the response is an HTTP `412 Precondition Failed` error and nothing is published. Request a new quote and try again. |

### Example request: Publish a tileset

```bash
$ curl -X POST "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/publish?access_token=TOKEN_PLACEHOLDER::tilesets:write" \
  -H 'If-Match: "a3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0dea3f5c0de"'
```

### Response: Publish a tileset

| HTTP status | What it means |
| --- | --- |
| `202 Accepted` | A publish job was submitted. `jobId` is the job's ID. |
| `200 OK` | The recipe is already published, so no job was submitted and nothing changed. `jobId` is `null`, and `version` is the version the `latest` tag already points at. To find this out without using a publish request, [quote the publish](#quote-a-publish) first. |

| Property | Type | Description |
| --- | --- | --- |
| `message` | `string` | A description of the result. |
| `jobId` | `string` or null | The ID of the publish job, or `null` if there was nothing to publish. |
| `version` | `string` | The version the `latest` tag points at. Only present if there was nothing to publish. |

#### Example response: Publish a tileset

```json
{
  "message": "Processing penny.trees",
  "jobId": "cl4fj2hkw0001s7q9d2yh7xnl"
}
```

## Retrieve a publish job

**GET** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/jobs/{job_id}` [Token scope: **tilesets:read**]

Retrieves a publish job. Use it to check whether a publish has finished. Only the tileset's owner can retrieve its jobs.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `job_id` | `string` | The ID of the job, from the [Publish a tileset](#publish-a-tileset) response. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. The token must belong to `account`. |

### Example request: Retrieve a publish job

```bash
$ curl "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/jobs/cl4fj2hkw0001s7q9d2yh7xnl?access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: Retrieve a publish job

If the request is successful, the response contains a job object with the following properties:

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` | The ID of the job. |
| `stage` | `string` | Where the job is: `queued` (waiting to start), `processing`, `success`, `failed`, or `superseded` (replaced by a newer publish of the same tileset before it started). `success`, `failed`, and `superseded` are final. |
| `tilesetId` | `string` | The ID of the tileset. |
| `errors` | array of strings | Errors from the job, if any. See [MTS errors](https://docs.mapbox.com/mapbox-tiling-service/overview/errors/#mapbox-tiling-service-errors). |
| `warnings` | array of strings | Warnings from the job, if any. See [MTS warnings](https://docs.mapbox.com/mapbox-tiling-service/overview/warnings/#mapbox-tiling-service-warnings). |
| `created` | `integer` | When the job was created, in milliseconds since the Unix epoch. |
| `created_nice` | `string` | When the job was created, as a human-readable string. |
| `completed` | `integer` or null | When the job finished, in milliseconds since the Unix epoch. `null` until the job finishes. |
| `published` | `integer` | When the job was submitted, in milliseconds since the Unix epoch. |
| `published_by_client` | `string` | What submitted the job: `api`, `studio`, or `dataworkbench`. |
| `filesize` | `integer` | The total size of the source data processed, in bytes. |
| `cu` | `number` | The compute units the job used, once processing statistics are available. |
| `recipe` | `object` | The recipe the job processed. Each datasource URI is pinned to the version of the data that was used. |
| `layer_stats` | `object` | Statistics about each layer in the finished tileset. See the [MTS v1 job reference](https://docs.mapbox.com/api/ja/maps/mapbox-tiling-service/#response-retrieve-information-about-a-single-tileset-job) for the fields. |
| `tileset_precisions` | `object` | The area processed at each precision tier, in square kilometers. |

#### Example response: Retrieve a publish job

```json
{
  "id": "cl4fj2hkw0001s7q9d2yh7xnl",
  "stage": "success",
  "tilesetId": "penny.trees",
  "errors": [],
  "warnings": [],
  "created": 1785628800000,
  "created_nice": "Sun Aug 02 2026 00:00:00 GMT+0000 (Coordinated Universal Time)",
  "completed": 1785629400000,
  "published": 1785628800000,
  "published_by_client": "api",
  "filesize": 1048576,
  "cu": 1.25,
  "recipe": {
    "version": 1,
    "layers": {
      "trees": {
        "source": "mapbox://datasource/penny/trees/812094471182364207",
        "minzoom": 12,
        "maxzoom": 15
      }
    }
  }
}
```

## List publish jobs for a tileset

**GET** : `https://api.mapbox.com/tilesets/v2/{account}.{id}/jobs` [Token scope: **tilesets:read**]

Lists a tileset's publish jobs. Results are returned in pages; see [Pagination](#pagination). Only the tileset's owner can list its jobs.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account that owns the tileset. |
| `id` | `string` | The ID of the tileset within the account. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. The token must belong to `account`. |

| Optional parameters | Type | Default | Description |
| --- | --- | --- | --- |
| `stage` | `string` | None (all stages) | Only list jobs in this [stage](#response-retrieve-a-publish-job), such as `failed`. |
| `orderby` | `string` | `desc` | List jobs oldest first (`asc`) or newest first (`desc`). |
| `limit` | `integer` | `100` | The maximum number of jobs to return, from `1` to `500`. |
| `start` | `string` | None (first page) | The cursor for the next page of results, taken from the `Link` header of the previous response. See [Pagination](#pagination). |

### Example request: List publish jobs for a tileset

```bash
$ curl "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME.trees/jobs?stage=failed&access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: List publish jobs for a tileset

If the request is successful, the response is an array of [job objects](#response-retrieve-a-publish-job). If the tileset has no jobs that match, the response is an HTTP `404 Not Found` error, not an empty array.

#### Example response: List publish jobs for a tileset

```json
[
  {
    "id": "cl4fj2hkw0001s7q9d2yh7xnl",
    "stage": "success",
    "tilesetId": "penny.trees",
    "errors": [],
    "warnings": [],
    "created": 1785628800000,
    "created_nice": "Sun Aug 02 2026 00:00:00 GMT+0000 (Coordinated Universal Time)",
    "completed": 1785629400000,
    "published": 1785628800000,
    "published_by_client": "api",
    "filesize": 1048576,
    "cu": 1.25
  }
]
```

## List publish jobs for an account

**GET** : `https://api.mapbox.com/tilesets/v2/{account}/jobs` [Token scope: **tilesets:read**]

Lists the publish jobs for all an account's Tilesets API v2 tilesets, newest first. Results are returned in pages; see [Pagination](#pagination). Jobs for tilesets created with the [Mapbox Tiling Service v1](https://docs.mapbox.com/api/ja/maps/mapbox-tiling-service/) aren't included.

| Required parameters | Type | Description |
| --- | --- | --- |
| `account` | `string` | The Mapbox username of the account whose jobs to list. |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. The token must belong to `account`. |

| Optional parameters | Type | Default | Description |
| --- | --- | --- | --- |
| `stage` | `string` | None (all stages) | Only list jobs in this [stage](#response-retrieve-a-publish-job), such as `processing`. |
| `orderby` | `string` | `desc` | List jobs oldest first (`asc`) or newest first (`desc`). |
| `limit` | `integer` | `100` | The maximum number of jobs to return, from `1` to `500`. |
| `start` | `string` | None (first page) | The cursor for the next page of results, taken from the `Link` header of the previous response. See [Pagination](#pagination). |

### Example request: List publish jobs for an account

```bash
$ curl "https://api.mapbox.com/tilesets/v2/YOUR_MAPBOX_USERNAME/jobs?stage=processing&access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: List publish jobs for an account

If the request is successful, the response is an array of [job objects](#response-retrieve-a-publish-job), each with an `account` property. If the account has no jobs that match, the array is empty.

#### Example response: List publish jobs for an account

```json
[
  {
    "id": "cl4fj2hkw0001s7q9d2yh7xnl",
    "stage": "success",
    "tilesetId": "penny.trees",
    "account": "penny",
    "errors": [],
    "created": 1785628800000,
    "completed": 1785629400000,
    "published_by_client": "api",
    "filesize": 1048576,
    "cu": 1.25
  }
]
```

## View the global publish queue

**PUT** : `https://api.mapbox.com/tilesets/v2/queue` [Token scope: **tilesets:read**]

Returns how many publish jobs, across all Mapbox accounts, are waiting to start. A long queue means your publish may take longer to start.

| Required parameters | Type | Description |
| --- | --- | --- |
| `access_token` | `string` | A valid Mapbox [access token](https://docs.mapbox.com/api/ja/overview/#access-tokens-and-token-scopes) with the `tilesets:read` scope. |

### Example request: View the global publish queue

```bash
$ curl -X PUT "https://api.mapbox.com/tilesets/v2/queue?access_token=TOKEN_PLACEHOLDER::tilesets:read"
```

### Response: View the global publish queue

If the request is successful, the response contains a `total` property: the number of jobs in the `queued` stage.

#### Example response: View the global publish queue

```json
{
  "total": 4
}
```

## Tilesets API v2 errors

Error responses contain a `message` property describing the problem. Errors about recipes also contain an `errors` array, with one entry for each problem.

| HTTP status code | Response body `message` | Description |
| --- | --- | --- |
| `400` | Varies | A query parameter has a value that isn't allowed, such as `visibility=everyone`. |
| `400` | `If-Match must be a single quote id returned by the quote endpoint, in double quotes.` | The `If-Match` header on a [publish](#publish-a-tileset) isn't a single quote ID in double quotes. |
| `401` | Varies | The access token is missing or isn't valid. |
| `403` | `This API requires a token with {scope} scope.` | The access token needs the specified [scope](https://docs.mapbox.com/accounts/guides/tokens/#scopes). |
| `404` | `Tileset not found` | The tileset doesn't exist, is `private` and belongs to another account, or the request is for the owner only and the token belongs to another account. |
| `404` | `Recipe does not exist for this tileset` | The tileset has no recipe. |
| `409` | `Tileset {tileset_id} already exists` | You tried to create a tileset that already exists. |
| `412` | `The quote no longer matches this tileset. Request a new quote and publish again.` | The quote in `If-Match` no longer describes the publish. Nothing was published. [Request a new quote](#quote-a-publish) and try again. |
| `422` | `Recipe is invalid.` | The recipe isn't valid. The `errors` array lists each problem. |
| `422` | `Tileset {tileset_id} has no recipe. Add a recipe before publishing.` | You tried to publish or quote a tileset that has no recipe. |
| `422` | Varies | The tileset ID or a request body property isn't valid, or a `start` cursor isn't valid. |
| `429` | `Too Many Requests` | You have exceeded the [rate limit](#tilesets-api-v2-restrictions-and-limits), or your account has reached its limit of publish jobs running at the same time. |
| `503` | Varies | A quote couldn't be produced or checked right now. Nothing was published. Try again shortly. |

## Tilesets API v2 restrictions and limits

Requests are rate limited per account. The endpoints in each row of the following table share one limit: for example, creating, updating, and deleting tilesets together count toward 100 requests per minute. If you exceed a limit, you receive an HTTP `429 Too Many Requests` error.

| Tilesets API v2 endpoint | Requests per minute |
| --- | --- |
| [Retrieve a tileset](#retrieve-a-tileset), [List tilesets](#list-tilesets), and the jobs and queue endpoints | 3,000 |
| [Retrieve a tileset's recipe](#retrieve-a-tilesets-recipe) | 3,000 |
| [Create](#create-a-tileset), [update](#update-tileset-metadata), or [delete](#delete-a-tileset) a tileset | 100 |
| [Replace](#replace-a-tilesets-recipe), [delete](#delete-a-tilesets-recipe), or [validate](#validate-a-recipe) a recipe | 100 |
| [Run a quote on the publish](#quote-a-publish) | 75 |
| [Publish a tileset](#publish-a-tileset) | 2 |

もし、レート制限をの数を高くしたい場合は、 [お問い合わせください。](https://www.mapbox.com/contact/sales/).

The Tilesets API v2 also has the following limits:

| Limit | Value |
| --- | --- |
| Tileset ID | `{account}.{id}`, where `{id}` is up to 32 characters: lowercase letters, numbers, `-`, and `_`. |
| Tileset name | Up to 64 characters. |
| Tileset description | Up to 500 characters. |
| Attribution | Up to three entries, with up to 80 characters of `text` in total. |
| Recipe layer sources | Datasource URIs only. |
| Recipe layer zoom levels | `0` to `16`. |
| List page size | Up to 500 results per page. |