# Search Custom Fields

Searches custom-field definitions by name or data type, including IDs and email placeholders, the account's own fields newest first, then the global ones; paginated by cursor. Global fields are read-only; contact values are read with get-contact.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "Text the name of a field has to contain; omit to list them all",
      "default": null,
      "maxLength": 250
    },
    "types": {
      "type": [
        "array",
        "null"
      ],
      "description": "Only fields of these data types, for example [\"field-date\", \"field-datetime\"]; omit for every type",
      "default": null,
      "items": {
        "type": "string",
        "enum": [
          "field-single",
          "field-paragraph",
          "field-email",
          "field-number",
          "field-url",
          "field-date",
          "field-time",
          "field-datetime",
          "field-html",
          "field-decimal"
        ]
      },
      "uniqueItems": true
    },
    "onlyWritable": {
      "type": [
        "null",
        "boolean"
      ],
      "description": "Only the account's own fields, the ones the write tools may touch; omit to include the global fields",
      "default": null
    },
    "limit": {
      "type": [
        "null",
        "integer"
      ],
      "description": "How many fields to return at most, 1 to 200, 50 by default",
      "default": null,
      "minimum": 1,
      "maximum": 200
    },
    "cursor": {
      "type": [
        "null",
        "string"
      ],
      "description": "nextCursor of the previous page, with the same filters; omit for the first page",
      "default": null,
      "minLength": 1,
      "maxLength": 500
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "count",
    "totalCount",
    "hasMore",
    "nextCursor",
    "customFields"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "totalCount": {
      "type": "integer"
    },
    "hasMore": {
      "type": "boolean"
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "customFields": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "isGlobal",
          "multiValue",
          "placeholder",
          "apiFieldId",
          "category",
          "editUrl"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "isGlobal": {
            "type": "boolean"
          },
          "multiValue": {
            "type": "boolean"
          },
          "placeholder": {
            "type": "string"
          },
          "apiFieldId": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "editUrl": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

