Skip to main content
PATCH
Restore webhook

Overview

Bring back a webhook that Flabs deleted automatically because it returned no 2xx response for 24 hours. The webhook starts receiving new events straight away, with the same events, endpoint and party it had before. Fix your endpoint before restoring it. If it still returns no 2xx for 24 hours, it is deleted again.

Endpoint

No request body is needed.

Authentication

This endpoint requires a valid Bearer token obtained from the authentication API.

Request Parameters

The webhook identifier is sent in the path; the rest are query parameters:
Catch-all accounts (default): do not send a party. Party-scoped accounts: you must send the same corporateUser or organization the webhook is bound to; you can only restore your own party’s webhooks. See integration modes.

What can be restored

  • Only webhooks that Flabs deleted automatically can be restored.
  • A webhook you deleted yourself with Delete Webhook cannot be restored. Register it again instead.
  • Party-scoped accounts: a party can have only one active webhook per event. If you registered a replacement for the same party and an overlapping event while this webhook was deleted, restoring returns 409. Delete one of them first, otherwise every event would be delivered twice.
  • If the webhook is not found among your auto-deleted webhooks (already active, deleted by you, another lab’s or another party’s), the API returns 404 with error.details set to "Deactivated event not found".

Responses

200 Restored
404 Not an auto-deleted webhook
409 Replacement already active (party-scoped accounts)
After a restore, the webhook appears again in Get All Webhooks.
Events created while the webhook was deleted are not sent after you restore it. If you need them, contact Flabs support.

Authorizations

Authorization
string
header
required

JWT token obtained from the authentication endpoint

Path Parameters

id
string
required

Unique identifier of the auto-deleted webhook

Query Parameters

labID
string
required

Flabs lab (branch) identifier. Fetch the list of labs via GET /client/labs.

corporateUser
string

Party-scoped accounts only. The corporate the webhook is bound to. Pass either corporateUser or organization, not both.

organization
string

Party-scoped accounts only. The doctor/hospital the webhook is bound to. Pass either corporateUser or organization, not both.

Response

Successfully restored webhook

success
boolean
Example:

true

message
string
Example:

"Event reactivated successfully"

data
object