Skip to main content

Update Webhook

PATCH 

/api/v2/public/webhooks/facility/:webhookId

Updates an existing webhook. This endpoint allows you to modify the URL, events, or other settings of an already registered webhook.

Request

Path Parameters

    webhookId stringrequired

    Webhook id

    Example: dd6189c9-4aae-4ca3-b855-654c607824da

Body

required
    url string

    The URL that will be called when an event is triggered.

    events string[]

    Possible values: [shift.request.created, shift.request.cancelled, shift.report.created, shift.scheduled.cancelled, shift.scheduled, shift.created, shift.report.accepted-automatically, shift.report.accepted, shift.report.rejected, shift.cancelled, all]

    The events that this webhook will listen to.

    facilities string[]

    The IDs of the facilities that will receive events from this webhook. If no value is provided it will auto detect facilities that user has access

    secrets string[]
      The secrets that will be used to verify the authenticity of the webhook.
    If no value is provided it will auto generate a secret.
    Secrets are used to sign and validate the payload of the webhook.
    It will accept 2 secrets to allow a rotation strategy without service downtime.

Responses

Schema
    data object
    id stringrequired

    If of the Webhook

    url stringrequired

    Url of the Webhook

    events string[]required

    Possible values: [shift.request.created, shift.request.cancelled, shift.report.created, shift.scheduled.cancelled, shift.scheduled, shift.created, shift.report.accepted-automatically, shift.report.accepted, shift.report.rejected, shift.cancelled, all]

    List of events that this webhook will listen to

    clientId stringrequired
    facilities string[]required

    List of facilities ids that this webhook belongs to

    secrets string[]required

    List of webhook secrets

Loading...