---
title: "Create a new field."
method: POST
path: "/v1/fields"
tags: ["fieldManagementV1"]
---

# Create a new field.

`POST /v1/fields`

Adding a field will define it in the Fields schema allowing it to be assigned as metadata to your logs.

## Request body

- FieldName
  - `fieldName` string, required — Field name.

## Response `200`

The field was created successfully.

- CustomField
  - `fieldName` string, required — Field name.
  - `fieldId` string, required — Identifier of the field.
  - `dataType` string, required — Field type. Possible values are `String`, `Long`, `Int`, `Double`, and `Boolean`.
  - `state` string, required — Indicates whether the field is enabled and its values are being accepted. Possible values are `Enabled` and `Disabled`.

## Other responses

- `default` — Operation failed with an error.

---

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