Newscatcher Webhooks API

Operations to create and manage reusable webhook endpoints. A webhook is a named HTTP endpoint that receives a POST notification when a job or monitor completes. Create webhooks once at the organization level and attach them to any number of jobs or monitors via `webhook_ids`. Supports Slack, Microsoft Teams, and generic HTTP targets with configurable delivery modes, authentication, and headers.

Operations 11

POST /catchAll/webhooks Create webhook #
GET /catchAll/webhooks List webhooks #
GET /catchAll/webhooks/{webhook_id} Get webhook #
PATCH /catchAll/webhooks/{webhook_id} Update webhook #
DELETE /catchAll/webhooks/{webhook_id} Delete webhook #
POST /catchAll/webhooks/{webhook_id}/test Test webhook delivery #
POST /catchAll/webhooks/{webhook_id}/resources Assign resource to webhook #
GET /catchAll/webhooks/{webhook_id}/resources List webhook resources #
DELETE /catchAll/webhooks/{webhook_id}/resources/{resource_type}/{resource_id} Remove resource from webhook #
GET /catchAll/resources/{resource_type}/{resource_id}/webhooks List webhooks for resource #
GET /catchAll/webhook-history Get delivery history #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/newscatcher-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

newscatcher-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NewsCatcher CatchAll Webhooks API
  version: 1.6.1
  description: "CatchAll is a web search API that generates unique datasets that don't exist anywhere else on the web. Built on NewsCatcher's proprietary real-world event index, it delivers state-of-the-art recall—finding all relevant events, not just top results.\n\n### Authentication\n\nAll endpoints except /health and /version require `x-api-key` header. If the key is invalid or missing, the API returns the `403 Forbidden` error.\n\n### Job workflow\n\n1. (Optional) Get suggestions via /catchAll/initialize\n2. Submit a query via /catchAll/submit with optional date ranges and custom validators/enrichments\n3. Poll /catchAll/status/{job_id} until completed (10-15 minutes)\n4. Retrieve results via /catchAll/pull/{job_id}\n\n### Monitor workflow\n\n1. Create successful job via /catchAll/submit\n2. Create monitor via /catchAll/monitors/create with schedule\n3. Retrieve aggregated results via /catchAll/monitors/pull/{monitor_id}\n\n### Webhook workflow\n\n1. Create a webhook via `POST /catchAll/webhooks`\n2. Attach it to a job or monitor via `POST /catchAll/webhooks/{webhook_id}/resources`,\n   or pass `webhook_ids` at job or monitor creation time\n3. Receive HTTP notifications at the configured URL when each job completes\n\n### Company search workflow\n\n1. Create a dataset via `POST /catchAll/datasets/` or `POST /catchAll/datasets/upload`\n2. Wait for the dataset `latest_status` to reach `ready`\n3. Submit a job with `connected_dataset_ids` pointing to your dataset\n4. Retrieve results — each record includes a `connected_entities` array\n   with relevance scores per matched company\n\n### Important notes\n\n**Dynamic schemas**: Response schemas are generated dynamically by LLMs. Field names in the `enrichment` object may vary and are not deterministic across jobs unless explicitly specified.\n"
  contact:
    name: NewsCatcher
    url: https://newscatcherapi.com
    email: support@newscatcherapi.com
servers:
- url: https://catchall.newscatcherapi.com
  description: Production server
security:
- ApiKeyAuth: []
tags:
- name: Webhooks
  description: 'Operations to create and manage reusable webhook endpoints.


    A webhook is a named HTTP endpoint that receives a POST notification

    when a job or monitor completes. Create webhooks once at the organization

    level and attach them to any number of jobs or monitors via `webhook_ids`.

    Supports Slack, Microsoft Teams, and generic HTTP targets with configurable

    delivery modes, authentication, and headers.

    '
  externalDocs:
    description: Learn about centralized webhooks and notification setup
    url: https://www.newscatcherapi.com/docs/web-search-api/guides-and-concepts/webhooks
paths:
  /catchAll/webhooks:
    post:
      tags:
      - Webhooks
      summary: Create webhook
      description: 'Creates a new webhook endpoint for the organization.

        '
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequestDto'
            example:
              name: Layoffs Alert
              url: https://hooks.slack.com/services/T000/B000/xxx
              type: slack
              delivery_mode: full
      responses:
        '201':
          $ref: '#/components/responses/CreateWebhookResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '422':
          $ref: '#/components/responses/ValidationError'
    get:
      tags:
      - Webhooks
      summary: List webhooks
      description: Returns a paginated list of webhooks belonging to the organization.
      operationId: listWebhooks
      parameters:
      - $ref: '#/components/parameters/Page'
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 100
          minimum: 1
          maximum: 500
        description: Number of webhooks per page.
      - $ref: '#/components/parameters/Search'
      responses:
        '200':
          $ref: '#/components/responses/ListWebhooksResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '422':
          $ref: '#/components/responses/ValidationError'
  /catchAll/webhooks/{webhook_id}:
    get:
      tags:
      - Webhooks
      summary: Get webhook
      description: Returns the full configuration of a single webhook by ID.
      operationId: getWebhook
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      responses:
        '200':
          $ref: '#/components/responses/GetWebhookResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
    patch:
      tags:
      - Webhooks
      summary: Update webhook
      description: 'Updates one or more fields of an existing webhook.

        '
      operationId: updateWebhook
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookRequestDto'
            example:
              name: Layoffs Alert (EU)
              is_active: false
      responses:
        '200':
          $ref: '#/components/responses/UpdateWebhookResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
    delete:
      tags:
      - Webhooks
      summary: Delete webhook
      description: "Permanently deletes a webhook and removes all resource assignments. \n\nAssigned jobs and monitors no longer trigger delivery to this webhook. This operation cannot be undone.\n"
      operationId: deleteWebhook
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      responses:
        '204':
          description: Webhook deleted successfully. No response body.
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /catchAll/webhooks/{webhook_id}/test:
    post:
      tags:
      - Webhooks
      summary: Test webhook delivery
      description: 'Sends a test HTTP request to the webhook URL using the webhook''s configured method, headers, and auth. Returns the response from the target endpoint.


        Use this to verify URL reachability and authentication before attaching the webhook to a live job or monitor.

        '
      operationId: testWebhook
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWebhookRequestDto'
            example:
              payload:
                test: true
                message: CatchAll webhook test
      responses:
        '200':
          $ref: '#/components/responses/TestWebhookResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
  /catchAll/webhooks/{webhook_id}/resources:
    post:
      tags:
      - Webhooks
      summary: Assign resource to webhook
      description: 'Attaches a job, monitor, or monitor group to the webhook. When the

        resource completes, the webhook receives a delivery.


        A single webhook can be assigned to multiple resources. Each resource

        can have up to 5 webhooks assigned.

        '
      operationId: assignWebhookResource
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignWebhookResourceRequestDto'
            example:
              resource_type: monitor
              resource_id: 3fec5b07-8786-46d7-9486-d43ff67eccd4
      responses:
        '200':
          $ref: '#/components/responses/AssignWebhookResourceResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
    get:
      tags:
      - Webhooks
      summary: List webhook resources
      description: 'Returns a paginated list of resources currently assigned to this webhook.

        '
      operationId: listWebhookResources
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      - name: resource_type
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/MappableResourceType'
      - $ref: '#/components/parameters/Page'
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 100
          minimum: 1
          maximum: 500
        description: Number of assignments per page.
      responses:
        '200':
          $ref: '#/components/responses/ListWebhookResourcesResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
  /catchAll/webhooks/{webhook_id}/resources/{resource_type}/{resource_id}:
    delete:
      tags:
      - Webhooks
      summary: Remove resource from webhook
      description: 'Detaches a resource from this webhook. Completions of the resource no longer trigger delivery to this webhook.


        The webhook and the resource itself are not deleted.

        '
      operationId: removeWebhookResource
      parameters:
      - $ref: '#/components/parameters/WebhookId'
      - $ref: '#/components/parameters/WebhookResourceType'
      - $ref: '#/components/parameters/WebhookResourceId'
      responses:
        '204':
          description: Resource removed from webhook. No response body.
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /catchAll/resources/{resource_type}/{resource_id}/webhooks:
    get:
      tags:
      - Webhooks
      summary: List webhooks for resource
      description: 'Returns all webhooks currently assigned to the given resource.

        '
      operationId: listWebhooksForResource
      parameters:
      - $ref: '#/components/parameters/WebhookResourceType'
      - $ref: '#/components/parameters/WebhookResourceId'
      - name: is_active
        in: query
        required: false
        schema:
          type: boolean
        description: Filter by active status. Omit to return webhooks regardless of status.
      - $ref: '#/components/parameters/Page'
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 100
          minimum: 1
          maximum: 500
        description: Number of webhooks per page.
      responses:
        '200':
          $ref: '#/components/responses/ListResourceWebhooksResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
  /catchAll/webhook-history:
    get:
      tags:
      - Webhooks
      summary: Get delivery history
      description: "Returns a paginated delivery log for a given resource, ordered by timestamp descending. \n\nEach record shows the webhook dispatched, the HTTP status code returned, delivery outcome, and any error or warning messages. Use this to debug failed deliveries or audit dispatch activity.\n"
      operationId: getWebhookDeliveryHistory
      parameters:
      - name: resource_type
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/MappableResourceType'
        description: Type of the resource to retrieve delivery history for.
      - name: resource_id
        in: query
        required: true
        schema:
          type: string
          format: uuid
        description: Identifier of the resource to retrieve delivery history for.
        example: 3fec5b07-8786-46d7-9486-d43ff67eccd4
      - $ref: '#/components/parameters/Page'
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 500
        description: Number of records per page.
      responses:
        '200':
          $ref: '#/components/responses/DeliveryHistoryResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    CreateWebhookResponse:
      description: Webhook created successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateWebhookResponseDto'
          example:
            success: true
            message: Webhook created successfully.
            webhook:
              id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              name: Layoffs Alert
              url: https://hooks.slack.com/services/T000/B000/xxx
              type: slack
              delivery_mode: full
              method: POST
              headers: {}
              params: {}
              formatter_config: null
              is_active: true
              organization_id: org-uuid-here
              created_by_user_id: user-uuid-here
              created_at: '2026-05-18T10:00:00Z'
              updated_at: '2026-05-18T10:00:00Z'
    AssignWebhookResourceResponse:
      description: Resource assigned to webhook.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AssignWebhookResourceResponseDto'
          example:
            success: true
            message: Resource assigned to webhook.
            already_existed: false
            mapping:
              id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
              webhook_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              resource_type: monitor
              resource_id: 3fec5b07-8786-46d7-9486-d43ff67eccd4
              assigned_at: '2026-05-18T10:00:00Z'
    ListWebhooksResponse:
      description: Webhooks retrieved successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListWebhooksResponseDto'
          example:
            total: 2
            page: 1
            page_size: 100
            total_pages: 1
            webhooks:
            - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              name: Layoffs Alert
              url: https://hooks.slack.com/services/T000/B000/xxx
              type: slack
              delivery_mode: full
              method: POST
              headers: {}
              params: {}
              formatter_config: null
              is_active: true
              organization_id: org-uuid-here
              created_by_user_id: user-uuid-here
              created_at: '2026-05-18T10:00:00Z'
              updated_at: '2026-05-18T10:00:00Z'
            - id: b2c3d4e5-f6a7-8901-bcde-f12345678901
              name: M&A Tracker
              url: https://my-service.example.com/catchall-hook
              type: generic
              delivery_mode: per_record
              method: POST
              headers:
                Authorization: Bearer token123
              params: {}
              formatter_config: null
              is_active: true
              organization_id: org-uuid-here
              created_by_user_id: user-uuid-here
              created_at: '2026-05-19T09:00:00Z'
              updated_at: '2026-05-19T09:00:00Z'
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    DeliveryHistoryResponse:
      description: Webhook delivery history retrieved successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeliveryHistoryResponseDto'
          example:
            resource_type: monitor
            resource_id: 3fec5b07-8786-46d7-9486-d43ff67eccd4
            total: 2
            page: 1
            page_size: 50
            total_pages: 1
            items:
            - id: 42
              webhook_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              resource_type: monitor
              resource_id: 3fec5b07-8786-46d7-9486-d43ff67eccd4
              additional_info: {}
              status_code: 200
              attempt_number: 1
              timestamp: '2026-05-18T10:00:00Z'
              delivery_status: SUCCESS
              error_message: null
              warning_message: null
            - id: 41
              webhook_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              resource_type: monitor
              resource_id: 3fec5b07-8786-46d7-9486-d43ff67eccd4
              additional_info: {}
              status_code: 503
              attempt_number: 1
              timestamp: '2026-05-17T10:00:00Z'
              delivery_status: FAILED
              error_message: Service unavailable
              warning_message: null
    ListResourceWebhooksResponse:
      description: Webhooks for resource retrieved successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListWebhooksResponseDto'
          example:
            total: 1
            page: 1
            page_size: 100
            total_pages: 1
            webhooks:
            - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              name: Layoffs Alert
              url: https://hooks.slack.com/services/T000/B000/xxx
              type: slack
              delivery_mode: full
              method: POST
              headers: {}
              params: {}
              formatter_config: null
              is_active: true
              organization_id: org-uuid-here
              created_by_user_id: user-uuid-here
              created_at: '2026-05-18T10:00:00Z'
              updated_at: '2026-05-18T10:00:00Z'
    NotFoundError:
      description: Job/monitor not found or results not available
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequestError:
      description: 'Bad request - invalid parameters or constraint violations.


        Common causes: date ranges outside plan limits, invalid job state for continuation.

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            date_validation:
              summary: Date outside plan limit
              value:
                detail: start_date must be >= 2025-02-05, your plan limited to lookback 365 days.
            invalid_continuation:
              summary: Invalid job continuation
              value:
                detail: New limit must be greater than the previous limit for this job.
    ListWebhookResourcesResponse:
      description: Webhook resource assignments retrieved successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListWebhookResourcesResponseDto'
          example:
            total: 1
            page: 1
            page_size: 100
            total_pages: 1
            resources:
            - id: f1e2d3c4-b5a6-7890-abcd-ef1234567890
              webhook_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              resource_type: monitor
              resource_id: 3fec5b07-8786-46d7-9486-d43ff67eccd4
              assigned_at: '2026-05-18T10:00:00Z'
    TestWebhookResponse:
      description: Test delivery attempted. Check `success` and `http_status_code` for the outcome.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TestWebhookResponseDto'
          example:
            success: true
            message: Test delivery succeeded.
            http_status_code: 200
            response_body: ok
    ForbiddenError:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UpdateWebhookResponse:
      description: Webhook updated successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateWebhookResponseDto'
          example:
            success: true
            message: Webhook updated successfully.
            webhook:
              id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              name: Layoffs Alert (EU)
              url: https://hooks.slack.com/services/T000/B111/yyyy
              type: slack
              delivery_mode: full
              method: POST
              headers: {}
              params: {}
              formatter_config: null
              is_active: true
              organization_id: org-uuid-here
              created_by_user_id: user-uuid-here
              created_at: '2026-05-18T10:00:00Z'
              updated_at: '2026-05-19T08:30:00Z'
    GetWebhookResponse:
      description: Webhook retrieved successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetWebhookResponseDto'
          example:
            success: true
            message: Webhook retrieved successfully.
            webhook:
              id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              name: Layoffs Alert
              url: https://hooks.slack.com/services/T000/B000/xxx
              type: slack
              delivery_mode: full
              method: POST
              headers: {}
              params: {}
              formatter_config: null
              is_active: true
              organization_id: org-uuid-here
              created_by_user_id: user-uuid-here
              created_at: '2026-05-18T10:00:00Z'
              updated_at: '2026-05-18T10:00:00Z'
  parameters:
    Search:
      name: search
      in: query
      required: false
      schema:
        type: string
      description: Filter results by text (case-insensitive substring match).
    WebhookResourceId:
      name: resource_id
      in: path
      required: true
      description: Unique resource identifier.
      schema:
        type: string
        format: uuid
      example: 3fec5b07-8786-46d7-9486-d43ff67eccd4
    WebhookResourceType:
      name: resource_type
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/MappableResourceType'
    Page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        default: 1
        minimum: 1
      description: 'Page number to retrieve.

        '
    WebhookId:
      name: webhook_id
      in: path
      required: true
      description: Unique webhook identifier.
      schema:
        type: string
        format: uuid
      example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  schemas:
    CreateWebhookRequestDto:
      type: object
      required:
      - name
      - url
      properties:
        name:
          type: string
          description: Human-readable label for this webhook.
          example: Layoffs Alert
        url:
          type: string
          format: uri
          description: 'Destination URL that receives the payload. Must use HTTPS. IP addresses are not accepted.


            Type-specific URL requirements:

            - `slack`: Must start with `https://hooks.slack.com/`.

            - `teams`: Hostname must match `*.webhook.office.com` or `*.webhook.office365.com`.

            - `generic`: Any valid HTTPS domain.

            - `custom`: Any valid HTTPS domain.


            When `type` is omitted, it is auto-detected from the URL.

            '
          example: https://hooks.slack.com/services/T000/B000/xxx
        type:
          $ref: '#/components/schemas/WebhookType'
        delivery_mode:
          $ref: '#/components/schemas/DeliveryMode'
        method:
          $ref: '#/components/schemas/HttpMethod'
        headers:
          type: object
          additionalProperties:
            type: string
          description: Custom HTTP headers forwarded with each delivery.
          default: {}
        params:
          type: object
          additionalProperties:
            type: string
          description: Query parameters appended to the webhook URL.
          default: {}
        auth:
          oneOf:
          - $ref: '#/components/schemas/BearerAuthDto'
          - $ref: '#/components/schemas/ApiKeyAuthDto'
          - $ref: '#/components/schemas/BasicAuthDto'
          discriminator:
            propertyName: type
            mapping:
              bearer: '#/components/schemas/BearerAuthDto'
              api_key: '#/components/schemas/ApiKeyAuthDto'
              basic: '#/components/schemas/BasicAuthDto'
          description: 'Authentication forwarded with each delivery. Supported types:

            - `bearer`: Adds an `Authorization: Bearer <token>` header.

            - `api_key`: Adds a custom header with the specified name and value.

            - `basic`: Adds an `Authorization: Basic <credentials>` header.

            '
        formatter_config:
          type:
          - object
          - 'null'
          description: Custom payload transformation configuration. Required only when `type` is `custom`.
      example:
        name: Layoffs Alert
        url: https://hooks.slack.com/services/T000/B000/xxx
        type: slack
        delivery_mode: full
    ValidationErrorDetail:
      type: object
      properties:
        loc:
          type: array
          items:
            oneOf:
            - type: string
            - type: integer
          description: Location of the validation error
        msg:
          type: string
          description: Error message
        type:
          type: string
          description: Error type
    UpdateWebhookRequestDto:
      type: object
      description: All fields are optional. Only supplied fields are updated.
      properties:
        name:
          type: string
          description: Updated webhook name.
          example: Layoffs Alert (EU)
        url:
          type: string
          format: uri
          description: Updated destination URL. Must use HTTPS. Type-specific URL rules apply.
          example: https://hooks.slack.com/services/T000/B111/yyyy
        type:
          $ref: '#/components/schemas/WebhookType'
        delivery_mode:
          $ref: '#/components/schemas/DeliveryMode'
        method:
          $ref: '#/components/schemas/HttpMethod'
        headers:
          type: object
          additionalProperties:
            type: string
          description: Updated HTTP headers. Replaces existing headers entirely.
          example:
            Authorization: Bearer new-token
        params:
          type: object
          additionalProperties:
            type: string
          description: Updated query parameters. Replaces existing params entirely.
          example: {}
        auth:
          oneOf:
          - $ref: '#/components/schemas/BearerAuthDto'
          - $ref: '#/components/schemas/ApiKeyAuthDto'
          - $ref: '#/components/schemas/BasicAuthDto'
          discriminator:
            propertyName: type
            mapping:
              bearer: '#/components/schemas/BearerAuthDto'
              api_key: '#/components/schemas/ApiKeyAuthDto'
              basic: '#/components/schemas/BasicAuthDto'
          description: Updated authentication configuration. Replaces existing auth entirely.
        formatter_config:
          type:
          - object
          - 'null'
          description: Updated formatter configuration.
        is_active:
          type: boolean
          description: Set to `false` to disable delivery without deleting the webhook.
          example: false
    WebhookResourceMappingResponseDto:
      type: object
      required:
      - id
      - webhook_id
      - resource_type
      - resource_id
      properties:
        id:
          type: string
          format: uuid
          description: Mapping identifier.
          example: f1e2d3c4-b5a6-7890-abcd-ef1234567890
        webhook_id:
          type: string
          format: uuid
          description: Webhook identifier.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        resource_type:
          type: string
          description: Type of the assigned resource.
          example: monitor
        resource_id:
          type: string
          format: uuid
          description: Identifier of the assigned resource.
          example: 3fec5b07-8786-46d7-9486-d43ff67eccd4
        assigned_at:
          type: string
          format: date-time
          description: Timestamp when the resource was assigned in ISO 8601 format with UTC timezone.
          example: '2026-05-18T10:00:00Z'
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message.
          example: Invalid API key
    TestWebhookRequestDto:
      type: object
      properties:
        payload:
          type: object
          description: 'Custom payload to send in the test request. If omitted, a synthetic

            test payload is sent.

            '
          example:
            test: true
            message: CatchAll webhook test
    ValidationErrorResponse:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorDetail'
    UpdateWebhookResponseDto:
      type: object
      required:
      - success
      - message
      properties:
        success:
          type: boolean
          description: True if the webhook was updated; false otherwise.
          example: true
        message:
          type: string
          description: Human-readable result message.
          example: Webhook updated successfully.
        webhook:
          $ref: '#/components/schemas/WebhookResponseDto'
          description: The updated webhook object.
    ListWebhookResourcesResponseDto:
      type: object
      required:
      - total
      - page
      - page_size
      - total_pages
      - resources
      properties:
        total:
          type: integer
          description: Total number of resource mappings for this webhook.
          example: 2
        page:
          type: integer
          description: Current page number.
          example: 1
        page_size:
          type: integer
          description: Number of mappings per page.
          example: 100
        total_pages:
          type: integer
          description: Total number of pages available.
          example: 1
        resources:
          type: array
          items:
            $ref: '#/components/schemas/WebhookResourceMappingResponseDto'
          description: Resource mappings on this page.
    BearerAuthDto:
      type: object
      required:
      - type
      - token
      properties:
        type:
          type: string
          enum:
          - bearer
          description: Authentication type.
        token:
          type: string
          description: Bearer token sent in the `Authorization` header.
          example: my-secret-token
    TestWebhookResponseDto:
      type: object
      required:
      - success
      - message
      properties:
        success:
          type: boolean
          description: True if the test delivery received a 2xx response; false otherwise.
          example: true
        message:
          type: string
          description: Human-readable result message.
          example: Test delivery succeeded.
        http_status_code:
          type: integer
          description: HTTP status code returned by the webhook endpoint.
          example: 200
        response_body:
          description: Response body returned by the webhook endpoint. Type varies by target.
          example: ok
    DeliveryStatus:
      type: string
      enum:
      - SUCCESS
      - FAILED
      descripti

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/newscatcher/refs/heads/main/openapi/newscatcher-webhooks-api-openapi.yml