# Search Webhooks

Searches webhooks by name, newest first, with settings and app links; does not call their targets.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": [
        "null",
        "string"
      ],
      "default": null
    },
    "limit": {
      "type": "integer",
      "default": 50,
      "minimum": 1,
      "maximum": 200
    },
    "offset": {
      "type": "integer",
      "default": 0,
      "minimum": 0
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "items",
    "total"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "accountId",
          "id",
          "settings",
          "activationSmartTagId",
          "editUrl"
        ],
        "properties": {
          "accountId": {
            "type": "integer"
          },
          "id": {
            "type": "integer"
          },
          "settings": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 250
              },
              "notes": {
                "type": "string",
                "maxLength": 1000
              },
              "metaLabels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "activationTagIds": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "new": {
                    "type": "array",
                    "maxItems": 0,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "activationUrl": {
                "type": "string"
              },
              "requestMethod": {
                "type": "string",
                "enum": [
                  "GET",
                  "POST"
                ]
              },
              "sendingMode": {
                "type": "string",
                "enum": [
                  "all",
                  "custom"
                ]
              },
              "postFormat": {
                "type": "string",
                "enum": [
                  "form-data",
                  "json"
                ]
              },
              "fields": {
                "type": "array",
                "description": "The contact data sent in sendingMode \"custom\". id names the field as the app does: \"CustomField\" followed by the ID from search-custom-fields (e.g. \"CustomField885\"), or a contact field such as \"EmailAddress\" or \"SubscriberID\"; a bare custom field ID is refused. type is taken from the field, as in the app, and a date or time format outside its options becomes the default. Refused together with sendingMode \"all\"; pass an empty list when switching to \"all\".",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "parameterName",
                    "type",
                    "defaultValue",
                    "format"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "parameterName": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "defaultValue": {
                      "type": "string"
                    },
                    "format": {
                      "type": "integer"
                    }
                  }
                }
              },
              "staticFields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "parameterName",
                    "type",
                    "defaultValue",
                    "format"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "parameterName": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "defaultValue": {
                      "type": "string"
                    },
                    "format": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "activationSmartTagId": {
            "type": "integer"
          },
          "editUrl": {
            "type": "string"
          }
        }
      }
    },
    "total": {
      "type": "integer"
    }
  }
}
```

