Settings
Update Settings
POST

/settings

x-api-key*
curl --request POST \
  --url https://api.metriport.com/settings \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "webhookUrl": "<webhookurl>"
}'

Body

webhookUrlrequired
string

The webhook URL to be stored with your settings. It should be a valid URL.

Response

idrequired
string

The settings ID.

webhookUrlrequired
string

Your application’s webhook URL.

webhookKeyrequired
string

The key used to authenticate webhook calls to your app.

import { MetriportDevicesApi } from "@metriport/api";

const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");

const response = await metriportClient.updateSettings("https://api.health.com/webhook");

Example response:

{
  "id": "<settings-id>",
  "webhookUrl": "https://server.domain.com/webhook/endpoint",
  "webhookKey": "<webhook-key>"
}