---
title: "Search webhooks"
method: POST
path: "/api/webhooks/search"
tags: ["webhooks"]
---

# Search webhooks

`POST /api/webhooks/search`

## Request

- Base URL: `https://beta.getsales.io/integrations/v1`
- URL: `https://beta.getsales.io/integrations/v1/api/webhooks/search`
- Auth: HTTP bearer and API key in header `Team-SID`

The team's webhook subscriptions: which endpoints get which events, their status and failure counters. events.eq finds who listens to one type, status.eq failed the endpoints the plane switched off, consecutive_failed_attempts the ones close to it; include latest_webhook_logs for the recent deliveries. The secret is null on every read. page_size 0 returns the counts only.

Contract:
- MCP tool `search_webhooks`, registry package `mcp.integrations/webhooks`, mount `integrations.webhooks`.
- Operation `search`, response envelope `search`.
- Flags: read only.

## Request body

- SearchWebhooksRequest: Request body of `search_webhooks`.
  - `filter` object: Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row.
    - `status` object: on | off | failed.
      - `eq` 'on' | 'off' | 'failed'
      - `in` string[]
    - `events` object: eq: the subscriptions to this event type; in: to any of these.
      - `eq` string
      - `in` string[]
    - `name` object: Exact name.
      - `eq` string
    - `q` string: Full text over name and target_url.
    - `consecutive_failed_attempts` object: The close-to-failing axis (20 disables).
      - `eq` number
      - `gte` number
      - `lte` number
      - `gt` number
      - `lt` number
    - `last_failure_at` object: ISO 8601 bounds.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `created_at` object: ISO 8601 bounds.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `updated_at` object: ISO 8601 bounds.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `deleted_at` object: ISO 8601 bounds (with deleted true).
      - `gte` string
      - `lte` string
    - `deleted` boolean: true = include soft-deleted rows; default excludes them.
  - `include` string[]: Relations to attach to every item; omit for the bare rows.
  - `sort` object: One column and its direction; omit for the default order.
    - `field` 'created_at' | 'updated_at' | 'name', required: The column to order by.
    - `direction` 'asc' | 'desc': asc or desc; default desc.
  - `page_size` integer: 0..500, default 50; 0 = counts only, 1 = the first row.
  - `cursor` string, nullable: pagination.next_cursor of the previous page.

## Response `200`

`search` success envelope.

- SearchWebhooksResponse
  - `success` true, required
  - `operation` 'search', required
  - `items` object[], required
    - `item` object, required
      - `sid` string, required: Webhook sid (wh_hk_...).
      - `team_sid` string, required: The subscribing workspace (ts_tm_...).
      - `name` string, required: Free text, 1..255 chars.
      - `target_url` string, required: The https endpoint events are POSTed to; one subscription per team per URL.
      - `events` string[], required: The subscribed event types (WebhookEventTypeEnum values), exact membership.
      - `filters` object, nullable, required: The narrowing by sending identity; null or {} = every subscribed event.
        - `account_sid` string, nullable: Deliver only the events of this sending identity (18 chars, e.g. a sender profile ub_sp_...); null = no narrowing.
      - `secret` string, nullable: The 32-hex HMAC secret: in the create response only, null on every other read.
      - `status` 'on' | 'off' | 'failed', required: on; off (switched off by hand); failed (20 failed deliveries in a row or one 410: revive with update status on).
      - `consecutive_failed_attempts` integer, required: Failed deliveries in a row, driven by the log; 20 trips the auto-disable.
      - `last_failure_at` string, nullable, required: ISO 8601 UTC of the most recent failed delivery.
      - `created_by` object, required: Who subscribed.
        - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
        - `actor_sid` string, nullable, required
        - `team_sid` string, required
        - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
        - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
        - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
        - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
        - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
        - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
      - `deleted_by` object, nullable, required: Who deleted it; null while live.
        - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
        - `actor_sid` string, nullable, required
        - `team_sid` string, required
        - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
        - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
        - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
        - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
        - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
        - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
      - `created_at` string, required: ISO 8601 UTC.
      - `updated_at` string, required: ISO 8601 UTC.
      - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live.
    - `included` object, required
      - `latest_webhook_logs` object[]: The most recent delivery rows (WebhookLogDomain) of the subscription.
  - `pagination` object, required
    - `next_cursor` string, nullable, required
    - `has_more` boolean, required
    - `total_count` integer, nullable, required
  - `applied_filters` object, required
  - `includes` string[], required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
  - `counts` object
    - `total_count` number, required: Subscriptions matching the filter.
    - `groups` object, required: status: the count per status.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-integrations.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-integrations/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-integrations/revisions/2e7105d58335?raw)
