Skip to main content

removeWebhook

WebhooksConfigWrapper removeWebhook(id)

DELETE /api/2.0/settings/webhook/{id}

Remove a webhook

Removes one webhook subscription from the current portal for good, addressed by id in the path. Deliveries stop with it: matching events are no longer queued, and there is no undo, so a subscription dropped by mistake has to be created again with POST api/2.0/settings/webhook, which gives it a new identifier and needs a new secret key. To pause deliveries without losing the configuration, switch the subscription off with PUT api/2.0/settings/webhook/enable instead. A DocSpaceAdmin may remove any subscription in the portal, anyone else only the ones they created, and a Guest may not use webhooks at all. The response repeats the subscription as it was just before the removal, so the caller can record what disappeared, again without the secret key. An identifier that no longer exists gives 404, which is what a second removal of the same subscription answers as well, so a repeated call is harmless but reports the state truthfully rather than pretending to succeed.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The identifier of the object the operation acts on, as the listing operation of that kind of object reports it. It has to match the shape the route declares - a GUID where the route is typed as one - since a value of another shape does not match the route at all and is answered as not found.[required] [example: 1]

Responses​

Status codeDescriptionTypeResponse headers
200The removed webhook subscription, as it was just before the removalWebhooksConfigWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The subscription belongs to another member, or the caller may not use webhooks at all--
404No webhook subscription with this ID exists in the portal--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

WebhooksConfigWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json