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

**curl**

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

**TypeScript**

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

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

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

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `productId` (string | null)
- `attachments` (object[], required)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "productId": "string",
  "attachments": [
    {
      "customFieldId": "string",
      "order": 0,
      "required": true
    }
  ]
}
```

**Responses**

- `200` — Success

Response example, 200:

```json
{
  "data": {
    "items": [
      {
        "customFieldId": "string",
        "order": 0,
        "required": true,
        "field": {
          "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"
}
```
