nodestash
Custom fields

Update a custom field definition

Partially updates a custom field definition. Only the provided fields are changed — omitted fields remain untouched. `entity_type`, `slug`, and `field_type` cannot be changed after creation.

PATCH
/custom-fields/{id}
AuthorizationBearer <token>

API key from your nodestash dashboard. Pass as a Bearer token in the Authorization header.

In: header

Path Parameters

id*string

Custom field definition ID (prefixed with cf_).

Match^cf_

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.nodestash.io/v1/custom-fields/cf_5hJ3kM9pQrVwXyZaB2cD4" \  -H "Content-Type: application/json" \  -d '{    "name": "Subscription Plan",    "is_required": true,    "options": [      "free",      "starter",      "pro",      "enterprise",      "custom"    ]  }'
{
  "data": {
    "id": "cf_5hJ3kM9pQrVwXyZaB2cD4",
    "type": "custom_field_definition",
    "attributes": {
      "id": "cf_5hJ3kM9pQrVwXyZaB2cD4",
      "entity_type": "contact",
      "name": "Subscription Plan",
      "slug": "plan",
      "field_type": "select",
      "description": "Subscription plan of the contact",
      "is_required": true,
      "options": [
        "free",
        "starter",
        "pro",
        "enterprise",
        "custom"
      ],
      "display_order": 0,
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-16T14:22:00Z"
    }
  },
  "meta": {
    "request_id": "req_9iJ1kL2mN3oP4qR5sT6u"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": [
      {
        "field": "email",
        "message": "Invalid email"
      }
    ]
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Missing or invalid Authorization header"
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Contact not found"
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded"
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}