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();curl -X GET \
https://api.periskope.app/v1/webhooks/webhook-id-123 \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json'{
"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"
}Get Webhook by ID
This endpoint retrieves a specific webhook by its ID
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();curl -X GET \
https://api.periskope.app/v1/webhooks/webhook-id-123 \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json'{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the webhook subscription
Response
200 OK
Unique identifier of the webhook subscription
"0ef25935-0b78-4660-beeb-f17311793305"
Timestamp when the webhook was subscribed
"2025-11-16T11:20:42.038+00:00"
Whether the webhook is currently active
true
Name of the event this webhook listens to
"ticket.created"
Type of integration
"webhook"
Type of the subscription
"webhook"
Additional metadata about the integration
Show child attributes
Show child attributes
Organization ID that owns this webhook
"03a52dbe-b8af-47c5-9fd1-e5a622680cad"
The URL where webhook events are sent
"https://webhook.site/951e142b-d2e6-420d-a666-f2c4bd8e572c"
Unique identifier of the integration
"28ee5da7-d6e5-438b-8b73-9eba97f08269"
Was this page helpful?