---
title: "Create a Column"
method: POST
path: "/1/columns/{datasetSlug}"
tags: ["Columns"]
---

# Create a Column

`POST /1/columns/{datasetSlug}`

Create a column by providing corresponding details for that type.

## Request body

- CreateColumn
  - `key_name` string, required — Name of the Column.
  - `type` 'string' | 'float' | 'integer' | 'boolean' | 'histogram' — Type of data that the Column will contain. Histogram is in beta and only works in your Metrics dataset.
  - `description` string — Column description.
  - `hidden` boolean — If `true`, the column is excluded from autocomplete and raw data field lists.
  - `id` string — Unique identifier (ID), returned in response bodies.
  - `last_written` string — ISO8601 formatted time the column was last written to (received event data).
  - `created_at` string — ISO8601 formatted time the column was created.
  - `updated_at` string — ISO8601 formatted time the column was updated.

## Response `201`

Success

- Column
  - `key_name` string, required — Name of the Column.
  - `type` 'string' | 'float' | 'integer' | 'boolean' | 'histogram' — Type of data that the Column will contain. Histogram is in beta and only works in your Metrics dataset.
  - `description` string — Column description.
  - `hidden` boolean — If `true`, the column is excluded from autocomplete and raw data field lists.
  - `id` string — Unique identifier (ID), returned in response bodies.
  - `last_written` string — ISO8601 formatted time the column was last written to (received event data).
  - `created_at` string — ISO8601 formatted time the column was created.
  - `updated_at` string — ISO8601 formatted time the column was updated.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Invalid request
- `429` — Rate Limit Exceeded

---

[API](https://skmtc.net/honeycomb/apis/honeycomb-api.md) · [All operations](https://skmtc.net/honeycomb/apis/honeycomb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/honeycomb/honeycomb-api/revisions/117619fac2a5/schema)
