---
title: "Create Custom Enum"
method: POST
path: "/custom-enums"
tags: ["custom-enums"]
---

# Create Custom Enum

`POST /custom-enums`

Create a new custom enum for the authenticated user.

Args:
    request: Create payload.
    auth: Authenticated caller.
    service: Custom-enum service.

Returns:
    CustomEnumResponse for the created enum.

Raises:
    HTTPException: 409 when the name already exists for this user.

## Request body

- CustomEnumCreate — Request model for creating a custom enum.
  - `name` string, required — Name for the enum type
  - `values` string[], required — List of allowed enum values
  - `description` string, nullable — Optional description of the enum

## Response `200`

Successful Response

- CustomEnumResponse — Response model for a single custom enum.
  - `id` string, required
  - `user_id` string, required
  - `name` string, required
  - `values` string[], required
  - `description` string, nullable
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `422` — Validation Error

---

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