# List Webhook Subscriptions — Calendly

> Get a list of Webhook Subscriptions for an Organization or User via GET /webhook_subscriptions. Requires organizationUri when scope is organization, or userUri when scope is user. Run List Organization Memberships first to obtain an…

- Key: `calendly_v2-list-webhook-subscriptions`
- Type: Action (Read-only)
- Version: 0.1.8
- App: Calendly (`calendly_v2`) — https://pipedream.com/apps/calendly-v2.md
- This page (HTML): https://pipedream.com/apps/calendly-v2/actions/list-webhook-subscriptions
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/calendly_v2/actions/list-webhook-subscriptions/list-webhook-subscriptions.mjs

## Description

Get a list of Webhook Subscriptions for an Organization or User via `GET /webhook_subscriptions`. Requires `organizationUri` when `scope` is `organization`, or `userUri` when `scope` is `user`. Run **List Organization Memberships** first to obtain an organization or user URI. Example: call with `scope` set to `organization` and `organizationUri` set to `https://api.calendly.com/organizations/AAAAAAAAAAAAAAAA` to return that organization's webhook subscriptions. [See the documentation](https://calendly.stoplight.io/docs/api-docs/faac832d7c57d-list-webhook-subscriptions)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `scope` | `string` | Yes | Filter the list by organization or user. |
| `organizationUri` | `string` | No | Filters the results by organization URI, such as https://api.calendly.com/organizations/012345678901234567890. Required when scope is organization. Run List Organization Memberships first to obtain a valid organization URI. |
| `userUri` | `string` | No | Filters the results by user URI, such as https://api.calendly.com/users/CAFHCZWDQLKQ73HX. Required when scope is user. Run List Organization Memberships first to obtain a valid user URI. |
| `count` | `string` | No | The number of rows to return. |
| `pageToken` | `string` | No | The token to pass to get the next portion of the collection. |
| `sort` | `string` | No | Order results by the specified field and direction. Accepts comma-separated list of {field}:{direction} values. Supported fields are: created_at. Sort direction is specified as: asc, desc. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "calendly_v2",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "calendly_v2-list-webhook-subscriptions",
  arguments: {
    scope: "Scope",
    organizationUri: "Organization URI",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "calendly_v2-list-webhook-subscriptions",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    calendly_v2: { authProvisionId: "apn_xxxxxxx" },
    scope: "Scope",
    organizationUri: "Organization URI",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "calendly_v2-list-webhook-subscriptions",
    "configured_props": {
      "calendly_v2": { "authProvisionId": "apn_xxxxxxx" },
      "scope": "Scope",
      "organizationUri": "Organization URI"
    }
  }'
```

---

- App: https://pipedream.com/apps/calendly-v2.md · All apps: https://pipedream.com/apps
