{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-list-custom-fields-response-schema.json",
  "title": "ListCustomFieldsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-custom-fields-beta-api-openapi.yml#/components/schemas/ListCustomFieldsResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "description": "Active custom fields in the caller's organization.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "fieldKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "TEXT",
              "TEXT_ARRAY",
              "NUMBER",
              "DATE",
              "BOOLEAN"
            ]
          },
          "hasFixedOptions": {
            "type": "boolean"
          },
          "allowedValues": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "displayAs": {
            "type": "string",
            "enum": [
              "DATE",
              "AGE"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organizationId",
          "fieldKey",
          "label",
          "type",
          "hasFixedOptions",
          "allowedValues",
          "displayAs",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      }
    },
    "nextToken": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass back as `nextToken` to fetch the next page. Null when there are no more results."
    }
  },
  "required": [
    "items",
    "nextToken"
  ],
  "additionalProperties": false
}