---
title: "Create custom field for badges"
method: POST
path: "/api_gateway/v1/badges/customField"
---

# Create custom field for badges

`POST /api_gateway/v1/badges/customField`

## Request body

- object
  - `name` string, required — The name of the custom field.
  - `isMandatory` boolean — Indicates if the custom field is mandatory.
  - `defaultValue` string — The default value of the custom field.
  - `dataType` 'INTEGER' | 'BOOLEAN' | 'DATE' | 'STRING', required — The data type of the custom field's value.

## Response `201`

201

- object
  - `data` object
    - `id` string
    - `orgId` integer
    - `name` string
    - `isMandatory` boolean
    - `defaultValue` string
    - `isActive` boolean
    - `dataType` string
    - `createdOn` number
    - `createdBy` integer
    - `lastUpdatedOn` number
    - `lastUpdatedBy` integer
  - `errors` unknown[]
    - unknown
  - `warnings` unknown[]
    - unknown

## Other responses

- `400` — 400

---

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