---
title: "Create Custom Field"
method: POST
path: "/api/v2/custom_fields"
tags: ["Custom Fields"]
---

# Create Custom Field

`POST /api/v2/custom_fields`

Creates a new custom field that can be used in user journeys or forms.

## Request body

- RequestsCustomFieldCreate
  - `transition_type` 'pre_offer' | 'offer' | 'post_offer' | 'onboarding' | 'offboarding', required
  - `name` string, required
  - `key` string, required
  - `data_type` string, required
  - `mandatory` boolean, required
  - `mapping` string
  - `validation_rule` string
  - `regexp_pattern` string — Required if validation_rule is regexp
  - `allowed_values` string[], required — Required if validation_rule is list
  - `list_of_values_map_id` string, required — Required if validation_rule is list_of_values_map
  - `created_at` string, required
  - `deactivated` boolean
  - `rule_settable` boolean — Used in Assignment Rules
  - `placeholderable` boolean — Used in placeholders
  - `allowed_rule_set_types` string[], required
  - `allowed_placeholder_type` string[], required
  - `workday_organization_type` string — Required if validation_rule is workday_organization

## Response `201`

The request has succeeded and a new resource has been created as a result.

- ResponsesCustomFieldCreate
  - `id` string, uuid, required
  - `transition_type` 'pre_offer' | 'offer' | 'post_offer' | 'onboarding' | 'offboarding', required
  - `name` string, required
  - `key` string, required
  - `data_type` string, required
  - `mandatory` boolean, required
  - `mapping` string
  - `validation_rule` string
  - `regexp_pattern` string — Required if validation_rule is regexp
  - `allowed_values` string[], required — Required if validation_rule is list
  - `list_of_values_map_id` string, required — Required if validation_rule is list_of_values_map
  - `created_at` string, required
  - `deactivated` boolean
  - `rule_settable` boolean — Used in Assignment Rules
  - `placeholderable` boolean — Used in placeholders
  - `allowed_rule_set_types` string[], required
  - `allowed_placeholder_type` string[], required
  - `workday_organization_type` string — Required if validation_rule is workday_organization

## Other responses

- `422` — Client error

## Changes

- **2026-03-09** `3f638e7bcdd4` — 1 breaking, 5 warning, 5 info
  - request property `transition_type` was restricted to a list of enum values
  - added the new `offboarding` enum value to the `transition_type` response property for the response status `201`
  - added the new `offer` enum value to the `transition_type` response property for the response status `201`
  - added the new `onboarding` enum value to the `transition_type` response property for the response status `201`
  - …7 more
- **2025-07-31** `33c1d5958395` — 2 breaking, 1 warning, 1 info
  - added the new required request property `transition_type`
  - removed the required property `journey_type` from the response with the `201` status
  - removed the request property `journey_type`
  - added the required property `transition_type` to the response with the `201` status
- **2025-05-19** `805744a185fa` — 1 info
  - endpoint added
- **2024-06-11** `6cde27481f55` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/xpand-io/apis/xpand-api/changes/api/v2/custom_fields/post.md)

---

[API](https://skmtc.dev/xpand-io/apis/xpand-api.md) · [All operations](https://skmtc.dev/xpand-io/apis/xpand-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xpand-io/xpand-api/revisions/85bece7875fd/schema)
