---
title: "Delete fields from a dataset"
method: POST
path: "/datasets/{dataset_id}/delete-fields"
tags: ["datasets"]
---

# Delete fields from a dataset

`POST /datasets/{dataset_id}/delete-fields`

## Request

- Base URL: `https://api.axiom.co/v2`
- URL: `https://api.axiom.co/v2/datasets/{dataset_id}/delete-fields`
- Auth: OAuth 2
  - Authorization code: `https://accounts.google.com/o/oauth2/v2/auth`
  - Token URL: `https://www.googleapis.com/oauth2/v4/token` scopes: `vacuum|update`
- TypeScript: <https://skmtc.dev/axiom/apis/axiom-public-api/docs/datasets/:dataset_id/delete-fields/post.ts> (a function with typed inputs; its response is checked against the schema)

Queues the deletion of the listed fields from the dataset schema. Deleted values stay in storage but can't be queried, and ingesting a deleted field again recreates it. You can delete fields once every 5 minutes per dataset.

## Path parameters

- `dataset_id` string, required

## Request body

- DeleteDatasetFieldsRequest
  - `fields` string[], required

## Response `202`

Field deletion queued.

- DeleteDatasetFieldsResult
  - `fields` string[]
  - `jobId` string

## Other responses

- `400`: Empty `fields`, a field that isn't in the schema, a system field or map field, a locked schema, or a metrics dataset.
- `403`: Forbidden
- `404`: Not found
- `429`: Fields were deleted from this dataset less than 5 minutes ago. Retry after the time in `Retry-After`.

## Changes

- **2026-10-16** (v2) `fbc1b8430feb`: 1 breaking
  - the `code` response's property type changed from `string` to `integer` for status `400`
- **2026-10-14** (v2) `8920e1697284`: 1 info
  - added the optional property `jobId` to the response with the `202` status
- **2026-09-24** (v2) `9c36e456e582`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/axiom/apis/axiom-public-api/changes/datasets/:dataset_id/delete-fields/post.md)

---

[API](https://skmtc.dev/axiom/apis/axiom-public-api.md) - [All operations](https://skmtc.dev/axiom/apis/axiom-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/axiom/apis/axiom-public-api/revisions/7e39a295e3ba?raw)
