---
search:
  tags:
    - customFields
    - POST
seo:
  description: >-
    Reference for the POST /v1/custom-fields endpoint in the Vortex Payments
    API.
sidebar:
  label: POST /v1/custom-fields
  badge: POST
title: POST /v1/custom-fields
type: openapi-operation
---
`POST /v1/custom-fields`

**curl**

```bash
curl "https://api.vortex.nyc/v1/custom-fields?environment=...&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'
```

**TypeScript**

```ts
import { createCustomField, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await createCustomField({
  client: vortex,
  query: { environment: "...", merchantAccountId: "..." },
  body: {...},
});
```

**Request body** (`application/json`, required)

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `customFieldId` (string | null)
- `slug` (string, required)
- `name` (string, required)
- `fieldType` (string, required)
- `properties` (object | null)
- `metadata` (object | null)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "customFieldId": "string",
  "slug": "string",
  "name": "string",
  "fieldType": "text",
  "properties": {
    "formLabel": "string",
    "formHelpText": "string",
    "formPlaceholder": "string",
    "textarea": true,
    "minLength": 0,
    "maxLength": 0,
    "ge": 0,
    "le": 0,
    "options": [
      {
        "value": "string",
        "label": "string"
      }
    ]
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  }
}
```

**Responses**

- `201` — Success

Response example, 201:

```json
{
  "data": {
    "customFieldId": "string",
    "slug": "string",
    "name": "string",
    "fieldType": "text",
    "properties": {
      "formLabel": "string",
      "formHelpText": "string",
      "formPlaceholder": "string",
      "textarea": true,
      "minLength": 0,
      "maxLength": 0,
      "ge": 0,
      "le": 0,
      "options": [
        {
          "value": "string",
          "label": "string"
        }
      ]
    },
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "createdAt": "string",
    "archivedAt": "string"
  },
  "requestId": "string"
}
```
