Skip to content
Go to Micro

Send a test event

client.webhooks.ping(stringwebhookID, WebhookPingParams { teamId, data, event } params?, RequestOptionsoptions?): WebhookPingResponse { dispatched, event, webhook_id }
POST/v2/webhooks/{teamId}/{webhookId}/ping

Fire-and-forget test delivery through the async dispatcher. The webhook must be enabled and verified.

ParametersExpand Collapse
webhookID: string
formatuuid
params: WebhookPingParams { teamId, data, event }
teamId?: string

Path param

formatuuid
data?: Record<string, unknown>

Body param: Arbitrary JSON payload body.

event?: string

Body param: Event name to send.

ReturnsExpand Collapse
WebhookPingResponse { dispatched, event, webhook_id }
dispatched: boolean
event: string
webhook_id: string
formatuuid

Send a test event

import Micro from '@micro-so/sdk';

const client = new Micro({
  teamID: 'My Team ID',
  apiKey: process.env['MICRO_API_KEY'], // This is the default and can be omitted
});

const response = await client.webhooks.ping('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(response.webhook_id);
{
  "dispatched": true,
  "event": "event",
  "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
Returns Examples
{
  "dispatched": true,
  "event": "event",
  "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}