Skip to content

Delete a workspace state ​

DELETE/api/v2/workspaces/{slug}/states/{pk}/

Remove a state from the workspace catalog. A successful delete returns 204 with an empty body.

This works only in a workspace with governance turned on. In an ungoverned workspace, a project's state id returns 404. Delete it with Delete a state on its project.

Three conditions block the delete with 409 conflict. See Before you delete.

Path Parameters ​

slug:requiredstring

The workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.

pk:requiredstring (uuid)

The id of the catalog state to delete.

Response shaping ​

fields:optionalstring

Comma-separated list of fields to return. Unrequested keys are omitted from the response, not returned as null, so absent means "not requested" and null means "actually null". id always comes back whether or not you name it.

Pass all for every requestable field. An unknown name is a 400 that lists the valid set and suggests the closest match, so a typo can't silently cost you the saving.

Requestable here: color, created_at, created_by_id, description, external_id, external_source, group, id, is_default, is_triage, name, project_id, sequence, updated_at, updated_by_id.

See Sparse fields.

Scopes ​

workspaces.states:write

Errors ​

StatusCodeCause
400invalid_requestThe request body or a query parameter failed validation.
401unauthorizedMissing or invalid credentials.
402payment_requiredThe feature this endpoint belongs to isn't enabled on your plan, or is switched off.
403forbiddenOnly workspace owners and admins can delete catalog states, or your token lacks the scope.
404not_foundNo catalog state with this id. The response has an empty body.
406not_acceptableThe Accept header asks for a representation the API can't produce.
409states_managed_at_projectThe state is a catalog state, but the workspace doesn't have governance turned on.
409conflictThe state is the triage state, a workflow still lists it, or work items are still in it.
409governance_migration_in_progressA governance migration is running, so the workspace is read-only. Retry after it finishes.
413payload_too_largeThe request body is over the size limit.
415unsupported_media_typeThe Content-Type isn't one this endpoint accepts.
429rate_limitedThrottled. Honor the Retry-After header before retrying.
Delete a workspace state
bash
curl -X DELETE \
  "https://api.plane.so/api/v2/workspaces/my-team/states/9e1b7c35-2a4f-4d08-b6e3-1c5f8a2d7e90/" \
  -H "X-Api-Key: $PLANE_API_KEY"
Response204

No response body.

Response409
json
{
  "type": "conflict",
  "code": "conflict",
  "detail": "Used by Default, Engineering"
}
Response409
json
{
  "type": "conflict",
  "code": "conflict",
  "detail": "The state is not empty, only empty states can be deleted"
}

Before you delete ​

All three blocked cases return 409 conflict. Read detail to tell them apart.

  • A workflow still lists the state. detail names the workflows, for example Used by Default, Engineering. Remove the state from each workflow first with Workspace workflow states. If your plan doesn't include workflows, Plane added the state to the default workflow when you created it, so it starts out blocked this way.
  • Work items or drafts are still in the state. Move them to another state, then retry.
  • It is the triage state. Plane manages the triage state, and you can't delete it.

Deletes are soft

The state stops appearing in the API and in Plane, but the row is kept. The states API has no restore operation, so treat the 204 as final.