Skip to content
Go to Micro

Re-run verification

client.webhooks.verify(stringwebhookID, WebhookVerifyParams { teamId } params?, RequestOptionsoptions?): WebhookVerifyResponse { verification }
POST/v2/webhooks/{teamId}/{webhookId}/verify

Re-runs the GET challenge/echo handshake against the webhook’s url and updates its verified state.

ParametersExpand Collapse
webhookID: string
formatuuid
params: WebhookVerifyParams { teamId }
teamId?: string
formatuuid
ReturnsExpand Collapse
WebhookVerifyResponse extends Webhook { id, created_at, enabled, 8 more } { verification }

A webhook plus the status of a verification handshake enqueued by this request.

verification?: Verification { status }

Status of the verification handshake enqueued by this request. The handshake runs asynchronously in the dispatcher; poll the webhook (its verified flag flips to true on success) to observe the outcome.

status: "pending"

Always pending at the moment of the response — the dispatcher has been asked to run the handshake but has not reported back yet.

Re-run verification

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.verify('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(response);
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "created_at": "2019-12-27T18:11:19.117Z",
  "enabled": true,
  "name": "name",
  "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "url": "https://example.com",
  "verified": true,
  "description": "description",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "verification_token": "verification_token",
  "verified_at": "2019-12-27T18:11:19.117Z",
  "verification": {
    "status": "pending"
  }
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "created_at": "2019-12-27T18:11:19.117Z",
  "enabled": true,
  "name": "name",
  "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "url": "https://example.com",
  "verified": true,
  "description": "description",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "verification_token": "verification_token",
  "verified_at": "2019-12-27T18:11:19.117Z",
  "verification": {
    "status": "pending"
  }
}