GET
/
settings
/
webhook
curl --request GET \
  --url https://api.sandbox.metriport.com/settings/webhook \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const response = await metriportClient.getWebhookStatus();

Response

Might return an empty body if there’s no settings yet stored for your account.

webhookEnabled
string
required

Indicates whether the webhook is currently enabled, and working properly.

webhookStatusDetail
string

The message indicating the reason for the webhook being disabled, or ‘OK’ if the webhook is enabled. This gets updated with the message of the last failed request to the webhook.

webhookRequestsProcessing
number
required

The number of webhook requests currently being processed. It gets updated as the requests are processed.

webhookRequestsFailed
number
required

The number of failed webhook requests for your acccount. It gets updated as the retries are attempted.

import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const response = await metriportClient.getWebhookStatus();

Example response:

{
  "webhookEnabled": false,
  "webhookStatusDetail": "Request failed with status code 404",
  "webhookRequestsProcessing": 0,
  "webhookRequestsFailed": 3
}