Widgets

Delete widgets

Puts the named widgets in the trash: they leave the site at once and keep their responses, statistics, integrations and history; Restore widgets brings them back whole. A widget that is on is deleted as it is; its item says is_active: true, so tell the user it was live. A widget in an A/B test leaves the test. Up to 100 ids per call; the answer reports every one, a widget already deleted as unchanged. Deleted widgets are listed with list_widgets(is_deleted=true).

post/v1/sites/{site_id}/widgets/delete

Request

  • Base URL
    https://api.getsitecontrol.com
  • Auth
    HTTP bearer

Path parameters

site_idinteger required

Headers

Idempotency-Keystring

Makes a retry of a POST safe: a repeat with the same key, body and GSC-Version returns the stored response with Idempotency-Replayed: true instead of running again. The key protects against repeated execution while the key store works. Saving the change and storing the response under the key are not atomic: if the process or the key store fails between them, the change is kept, the key is released after 15 minutes and a retry runs the request again. After a timeout or a 5xx, read the resource to check the result before retrying. 5xx and 429 responses and responses over 256 KB are not stored, so a repeat runs the request again. A key is kept for 24 hours. The same key with another body or version is 422; a repeat while the first request runs is 409.

Request body

idsinteger[] required

Widget ids from List widgets, up to 100, each once

Response

Successful Response

updatedinteger required
unchangedinteger required
failedinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.