Delete a widget
DELETE/api/v2/workspaces/{slug}/dashboards/{dashboard_id}/widgets/{pk}/
A widget is one chart on a dashboard. Remove a widget from its dashboard. A later GET of the widget returns 404.
Path parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
dashboard_id:requiredstring (uuid)The dashboard the widget is on.
pk:requiredstring (uuid)The widget ID. A widget on a different dashboard returns 404.
Scopes
workspaces.dashboards.widgets:write, or the broad write scope.
Errors
| Status | Code | Cause |
|---|---|---|
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | Dashboards aren't included in the workspace's plan, or you aren't a member of the workspace. |
403 | forbidden | You can see the dashboard but can't edit it. |
404 | not_found | The dashboard or widget doesn't exist, or you can't see the dashboard. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
429 | rate_limited | Throttled. Wait for the Retry-After header's seconds before retrying. |
Delete a widget
bash
curl -X DELETE \
"https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/0bda418f-3e9a-47bd-8e70-faa04e1f9540/" \
-H "X-Api-Key: $PLANE_API_KEY"python
import requests
response = requests.delete(
"https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/0bda418f-3e9a-47bd-8e70-faa04e1f9540/",
headers={"X-Api-Key": "your-api-key"},
)
print(response.status_code)javascript
const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/0bda418f-3e9a-47bd-8e70-faa04e1f9540/",
{
method: "DELETE",
headers: {
"X-Api-Key": "your-api-key",
},
},
);
console.log(response.status);Response204
No response body.

