Delete a workflow state
const url = 'https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workflow/states/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0?version=1';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workflow/states/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0?version=1' \ --header 'Authorization: Bearer <token>'Deletes a state and moves its items to moveTo, another state of the same category, each move with a timeline row by the admin; a state holding no items needs no moveTo, and its items then go to the first other state of its category. The last triage state, whose category may be empty, moves its items to a state of another open category (without moveTo, the first unstarted state). The duplicate state is never a state to move to and does not count as the state a category keeps; it and the last state of any other category cannot be deleted. The state is removed first, under the version check, so a stale request moves nothing. An item that still names the deleted state reads as being in the state its items moved to, cannot be moved into the deleted state, and is moved by the next change to the workflow’s settings. Organization admins only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The workflow version the change is based on.
The state the deleted state’s items move to; required while any item is in the state.
Responses
Section titled “Responses”OK
An organization’s work item workflow: its states, its labels and the prefix item numbers are shown with.
object
object
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Present on the duplicate state, which a close enters only with the original named. Kept beside its role for readers that predate the role.
The meaning a workflow state has beyond its category; absent on an ordinary state. Such a state can be renamed and reordered within its category, never deleted. DUPLICATE is the canceled state a close enters only with the original named; NOT_A_PROBLEM is the canceled state recording that the team accepts a finding, which only a finding item enters, by a close. It leaves the model’s validity unchanged.
A label of the organization’s workflow. Its name is unique in the organization, ignoring case.
object
The colour a label is drawn in.
How many items carry the label; present where the workflow is read for its settings only.
Written before every item number, as in GEO-231; derived from the organization’s name until an admin sets one.
The prefixes the organization used before, so an address written with one still finds its item.
The number the next item takes.
Raised by every change to the settings; a settings write names the version it was read at, and one naming an older version is refused with workflow-stale.
Example
{ "states": [ { "category": "TRIAGE", "role": "DUPLICATE" } ], "labels": [ { "colour": "slate" } ]}The state is the reserved duplicate state or the last of its category, or moveTo is missing while items are in the state, is the state itself or is in another category.
An RFC 9457 problem document, always sent as application/problem+json.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}The caller is not an organization admin, holds no seat in the organization, or is a service account.
An RFC 9457 problem document, always sent as application/problem+json.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}The organization is not there for the caller, or the workflow has no such state.
An RFC 9457 problem document, always sent as application/problem+json.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}The workflow changed since the version the request names; the problem carries the current version.
The workflow changed since the version the settings write named.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
The workflow’s current version.
Example
{ "type": "https://modeldesk.io/problems/workflow-stale"}default
Section titled “default”Error
An RFC 9457 problem document, always sent as application/problem+json.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}