Skip to main content
Node.js
import { PeriskopeApi } from '@periskope/periskope-client';

const client = new PeriskopeApi({
  authToken: 'YOUR_API_KEY',
  phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});

async function getWebhookById() {
  const response = await client.webhooks.getById({
    id: 'webhook-id-123'
  });

  console.log(response);
}

getWebhookById();
{
  "id": "0ef25935-0b78-4660-beeb-f17311793305",
  "subscribed_at": "2025-11-16T11:20:42.038+00:00",
  "is_subscribed": true,
  "integration_name": "ticket.created",
  "integration_type": "webhook",
  "type": "webhook",
  "integration_metadata": {
    "id": "28ee5da7-d6e5-438b-8b73-9eba97f08269",
    "name": "https://webhook.site/951e142b-d2e6-420d-a666-f2c4bd8e572c"
  },
  "org_id": "03a52dbe-b8af-47c5-9fd1-e5a622680cad",
  "hook_url": "https://webhook.site/951e142b-d2e6-420d-a666-f2c4bd8e572c",
  "integration_id": "28ee5da7-d6e5-438b-8b73-9eba97f08269"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The unique identifier of the webhook subscription

Response

200 OK

id
string

Unique identifier of the webhook subscription

Example:

"0ef25935-0b78-4660-beeb-f17311793305"

subscribed_at
string

Timestamp when the webhook was subscribed

Example:

"2025-11-16T11:20:42.038+00:00"

is_subscribed
boolean

Whether the webhook is currently active

Example:

true

integration_name
string

Name of the event this webhook listens to

Example:

"ticket.created"

integration_type
string

Type of integration

Example:

"webhook"

type
string

Type of the subscription

Example:

"webhook"

integration_metadata
object

Additional metadata about the integration

org_id
string

Organization ID that owns this webhook

Example:

"03a52dbe-b8af-47c5-9fd1-e5a622680cad"

hook_url
string

The URL where webhook events are sent

Example:

"https://webhook.site/951e142b-d2e6-420d-a666-f2c4bd8e572c"

integration_id
string

Unique identifier of the integration

Example:

"28ee5da7-d6e5-438b-8b73-9eba97f08269"