# Search Opt-In Processes

Searches active opt-in processes (subscriber lists) by name, sorted by name, with ID, opt-in mode and distinguishing flags. Deleted processes are excluded; get-opt-in-process reads full settings.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "description": "Case-insensitive name fragment to search for; omit to return every active process",
      "default": null,
      "maxLength": 250
    },
    "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",
    "optInProcesses"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "optInProcesses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "isDefaultProcess",
          "optInMode",
          "resendConfirmationEmail",
          "useForChangeEmail",
          "createdAt",
          "confirmationEmailId",
          "editUrl"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "isDefaultProcess": {
            "type": "boolean"
          },
          "optInMode": {
            "type": "string"
          },
          "resendConfirmationEmail": {
            "type": "boolean"
          },
          "useForChangeEmail": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "confirmationEmailId": {
            "type": "integer"
          },
          "editUrl": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

