> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.mailercloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search and List Webhooks

> API to list all webhooks with the ability to search, filter, and sort the results.



## OpenAPI

````yaml /openapi-v1.json post /webhooks/search
openapi: 3.1.0
info:
  title: Mailercloud Marketing API
  version: 1.0.0
  description: >-
    Campaigns, contacts, lists, segments, automations, and webhooks for the
    Mailercloud Marketing Platform.
servers:
  - url: https://cloudapi.mailercloud.com/v1
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Contacts
  - name: Lists
  - name: Tags
  - name: Segments
  - name: Custom Properties
  - name: Senders
  - name: Templates
  - name: Automations
  - name: Webhooks
  - name: Webforms
  - name: Inbox Tracker
  - name: Account
paths:
  /webhooks/search:
    post:
      tags:
        - Webhooks
      summary: Search and List Webhooks
      description: >-
        API to list all webhooks with the ability to search, filter, and sort
        the results.
      operationId: search-and-list-webhooks
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: Request body type
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  limit: 10
                  page: 1
                  search: test
                  sort_field: name
                  sort_order: asc
              required:
                - limit
                - page
              properties:
                limit:
                  type: integer
                  description: |
                    Maximum number of elements to return. 

                    Minimum: 10
                    Maximum: 100
                  minimum: 10
                  maximum: 100
                page:
                  type: integer
                  description: >-
                    You can retrieve a subset of records starting from the page
                    value you have specified. You can add a limit, which will
                    determine the number of records you can retrieve on a single
                    page.


                    Starts From: 1
                  minimum: 1
                search:
                  type: string
                  description: |
                    Filter webhook by searching through webhook name or url.
                sort_field:
                  type: string
                  description: |-
                    Sort webhook data based on this field.

                    Supported sort fields:

                        - name
                        - url   
                        - modified_date
                sort_order:
                  type: string
                  description: |-
                    Sorting order for sort field.

                    Supported sort orders:
                     
                    asc, ASC, desc, DESC 
            examples:
              Example-1:
                value:
                  limit: 10
                  page: 1
                  search: ''
                  sort_field: name
                  sort_order: asc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        created_date:
                          type: string
                        event:
                          type: array
                          items:
                            type: string
                        modified_date:
                          type: string
                        name:
                          type: string
                        status:
                          type: integer
                        url:
                          type: string
                  max_webhook_limit:
                    type: integer
                  total:
                    type: integer
                  webhook_count:
                    type: integer
                x-examples:
                  Example 1:
                    data:
                      - created_date: '2024-02-06 14:33:23'
                        event:
                          - campaign_sent
                          - campaign_opened
                          - campaign_clicked
                          - campaign_error
                          - spam
                          - hard_bounce
                          - unsubscribe
                        modified_date: '2024-02-06 14:33:23'
                        name: gf
                        status: 0
                        url: https://example.com/hooks/mailercloud
                    max_webhook_limit: 50
                    total: 2
                    webhook_count: 2
              examples:
                Example-1:
                  value:
                    data:
                      - created_date: '2024-02-15 17:06:56'
                        event:
                          - campaign_sent
                          - campaign_opened
                          - campaign_clicked
                          - campaign_error
                          - spam
                          - hard_bounce
                          - unsubscribe
                        id: f
                        modified_date: '2024-02-16 16:05:52'
                        name: Main webhook
                        status: 1
                        url: https://www.randomurl1.com
                      - created_date: '2024-02-15 17:05:51'
                        event:
                          - campaign_sent
                          - campaign_opened
                          - campaign_clicked
                          - campaign_error
                          - spam
                          - hard_bounce
                          - unsubscribe
                        id: E
                        modified_date: '2024-02-16 16:05:18'
                        name: new webhook
                        status: 1
                        url: https://www.randomurl2.com
                      - created_date: '2024-02-16 13:50:30'
                        event:
                          - campaign_sent
                          - campaign_opened
                        id: KK
                        modified_date: '2024-02-16 15:57:18'
                        name: Test Webhook
                        status: 0
                        url: https://www.randomurl3.com
                    max_webhook_limit: 20
                    total: 10
                    webhook_count: 3
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                x-examples:
                  Example 1:
                    error:
                      - field: limit
                        message: Limit is a required field
              examples:
                Example-1:
                  value:
                    error:
                      - field: limit
                        message: Limit is a required field
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                x-examples:
                  Example 1:
                    errors:
                      - field: ''
                        message: Authorization failed
              examples:
                Example-1:
                  value:
                    errors:
                      - field: ''
                        message: Authorization failed
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Mailercloud API key (plain text, no Bearer prefix). Create keys in
        Settings → API.

````