---
url: https://next.zammad.org/it/reference/rest-api/core-workflow.md
---

# Core workflow

::: info
Core Workflows are different from [triggers](/en/reference/rest-api/trigger):
they control the ticket create/edit form while someone fills it out, for
example by restricting which values are selectable in another field. The
form sends its current values to Zammad, which evaluates the workflows
and returns the resulting field changes. Unlike triggers, they don't act
on existing tickets in the background.

Compare to [report profiles](/en/reference/rest-api/report-profile), whose
`condition` field, unlike Core Workflow, does validate that referenced
fields are real.
:::

## Elenca

Required permission: `admin.core_workflow`

`GET`-Request sent: `/api/v1/core_workflows`

::: details

```json
// HTTP-Code 200 OK

[
  {
    "id": 11,
    "name": "Restrict priority for incidents",
    "object": "Ticket",
    "preferences": {},
    "condition_saved": {},
    "condition_selected": {
      "ticket.type": {
        "operator": "is",
        "value": [
          "Incident"
        ]
      }
    },
    "perform": {
      "ticket.state_id": {
        "operator": "set_fixed_to",
        "set_fixed_to": [
          "new",
          "open"
        ]
      }
    },
    "active": true,
    "stop_after_match": false,
    "changeable": true,
    "priority": 100,
    "updated_by_id": 3,
    "created_by_id": 3,
    "created_at": "2026-09-24T12:32:01.736Z",
    "updated_at": "2026-09-24T12:32:01.736Z"
  }
]

```

:::

::: info
This endpoint only returns workflows with `changeable: true`. Zammad's
built-in system workflows are not changeable and are not included, so
the response on a fresh instance is an empty array. Show, Update and
Delete also only operate on changeable workflows.
:::

## Mostra

Required permission: `admin.core_workflow`

`GET`-Request sent: `/api/v1/core_workflows/{id}`

::: details

```json
// HTTP-Code 200 OK

{
  "id": 11,
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "preferences": {},
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "updated_by_id": 3,
  "created_by_id": 3,
  "created_at": "2026-09-24T12:32:01.736Z",
  "updated_at": "2026-09-24T12:32:01.736Z"
}

```

:::

::: details

```json
// HTTP-Code 404 Not Found

{
  "error": "Couldn't find CoreWorkflow with 'id'=\"12\" [WHERE \"core_workflows\".\"changeable\" = $1]",
  "error_human": "Couldn't find CoreWorkflow with 'id'=\"12\" [WHERE \"core_workflows\".\"changeable\" = $1]"
}

```

:::

## Crea

Required permission: `admin.core_workflow`

`POST`-Request sent: `/api/v1/core_workflows`

:::: details

::: tabs key:reqres

\=== Request

```json
{
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100
}

```

\=== Response

```json
// HTTP-Code 201 Created

{
  "id": 11,
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "preferences": {},
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "updated_by_id": 3,
  "created_by_id": 3,
  "created_at": "2026-09-24T12:32:01.736Z",
  "updated_at": "2026-09-24T12:32:01.736Z"
}

```

:::

::::

::: info
Core Workflow does *not* validate that fields referenced in
`condition_selected` or `perform` exist. A workflow that references a
field that doesn't exist yet is saved without error. It has no visible
effect in the ticket form until the referenced field exists.
:::

## Aggiornamento

Required permission: `admin.core_workflow`

`PUT`-Request sent: `/api/v1/core_workflows/{id}`

Payload shape is identical to Create. The response is the updated record,
same shape as Show/Create.

::: info
Sending the full Create payload to an existing workflow's `id` updates
that record in place. It doesn't create a duplicate.
:::

:::: details

::: tabs key:reqres

\=== Request

```json
{
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "id": 11
}

```

\=== Response

```json
// HTTP-Code 200 OK

{
  "id": 11,
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "preferences": {},
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "updated_by_id": 3,
  "created_by_id": 3,
  "created_at": "2026-09-24T12:32:01.736Z",
  "updated_at": "2026-09-24T12:32:44.519Z"
}

```

:::

::::

## Elimina

Required permission: `admin.core_workflow`

::: danger
**This is a permanent removal**

Please note that removing core workflows cannot be undone.
:::

`DELETE`-Request sent: `/api/v1/core_workflows/{id}`

::: details

```json
// HTTP-Code 200 OK

{}

```

:::
