---
title: "Update an Operation"
method: PATCH
path: "/operations/{id}"
tags: ["Operations"]
---

# Update an Operation

`PATCH /operations/{id}`

Update an existing operation

## Path parameters

- `id` string, required

## Query parameters

- `fields` string[]
- `meta` string

## Request body

- Operations
  - `id` string — Unique identifier for the operation.
  - `name` string — The name of the operation.
  - `key` string — Key for the operation. Must be unique within a given flow.
  - `type` string — Type of operation. One of `log`, `mail`, `notification`, `create`, `read`, `request`, `sleep`, `transform`, `trigger`, `condition`, or any type of custom operation extensions.
  - `position_x` integer — Position of the operation on the X axis within the flow workspace.
  - `position_y` integer — Position of the operation on the Y axis within the flow workspace.
  - `options` object, nullable — Options depending on the type of the operation.
  - `resolve` union — The operation triggered when the current operation succeeds (or `then` logic of a condition operation).
    - string
    - Operations — recursive
  - `reject` union — The operation triggered when the current operation fails (or `otherwise` logic of a condition operation).
    - string
    - Operations — recursive
  - `flow` union
    - string, uuid
    - Flows
      - `id` string — Unique identifier for the flow.
      - `name` string — The name of the flow.
      - `icon` string — Icon displayed in the Admin App for the flow.
      - `color` string, nullable — Color of the icon displayed in the Admin App for the flow.
      - `description` string, nullable
      - `status` 'active' | 'inactive' — Current status of the flow.
      - `trigger` string — Type of trigger for the flow. One of `hook`, `webhook`, `operation`, `schedule`, `manual`.
      - `accountability` string — The permission used during the flow. One of `$public`, `$trigger`, `$full`, or UUID of a role.
      - `options` object, nullable — Options of the selected trigger for the flow.
      - `operation` union — UUID of the operation connected to the trigger in the flow.
        - string
        - Operations — recursive
      - `date_created` string, date-time, nullable — Timestamp in ISO8601 when the flow was created.
      - `user_created` union — The user who created the flow.
        - string
        - Users
          - `id` string — Unique identifier for the user.
          - `first_name` string — First name of the user.
          - `last_name` string — Last name of the user.
          - `email` string, email — Unique email address for the user.
          - `password` string — Password of the user.
          - `location` string, nullable — The user's location.
          - `title` string, nullable — The user's title.
          - `description` string, nullable — The user's description.
          - `tags` string[], nullable — The user's tags.
          - `avatar` union — The user's avatar.
            - string
            - Files
              - …
          - `language` string — The user's language used in Directus.
          - `tfa_secret` string, nullable — The 2FA secret string that's used to generate one time passwords.
          - `status` 'active' | 'invited' | 'draft' | 'suspended' | 'deleted' — Status of the user.
          - `role` union — Unique identifier of the role of this user.
            - string
            - Roles
              - …
          - `token` string, nullable — Static token for the user.
          - `last_access` string, date-time, nullable — When this user used the API last.
          - `last_page` string, nullable — Last page that the user was on.
          - `provider` string
          - `external_identifier` string, nullable
          - `auth_data` unknown
          - `email_notifications` boolean, nullable
          - `appearance` string, nullable
          - `theme_dark` string, nullable
          - `theme_light` string, nullable
          - `theme_light_overrides` unknown
          - `theme_dark_overrides` unknown
          - `text_direction` string
          - `policies` unknown
      - `operations` union[], nullable
        - union
          - string, uuid
          - Operations — recursive
  - `date_created` string, date-time, nullable — Timestamp in ISO8601 when the operation was created.
  - `user_created` union — The user who created the operation.
    - string
    - Users
      - `id` string — Unique identifier for the user.
      - `first_name` string — First name of the user.
      - `last_name` string — Last name of the user.
      - `email` string, email — Unique email address for the user.
      - `password` string — Password of the user.
      - `location` string, nullable — The user's location.
      - `title` string, nullable — The user's title.
      - `description` string, nullable — The user's description.
      - `tags` string[], nullable — The user's tags.
      - `avatar` union — The user's avatar.
        - string
        - Files
          - `id` string — Unique identifier for the file.
          - `storage` string — Where the file is stored. Either `local` for the local filesystem or the name of the storage adapter (for example `s3`).
          - `filename_disk` string — Name of the file on disk. By default, Directus uses a random hash for the filename.
          - `filename_download` string — How you want to the file to be named when it's being downloaded.
          - `title` string — Title for the file. Is extracted from the filename on upload, but can be edited by the user.
          - `type` string — MIME type of the file.
          - `folder` union — Virtual folder where this file resides in.
            - string
            - Folders
              - …
          - `uploaded_by` union — Who uploaded the file.
            - string
            - Users — recursive
          - `created_on` string, date-time — When the file was created.
          - `modified_by` union
            - string, uuid
            - Users — recursive
          - `modified_on` string, date-time
          - `charset` string, nullable — Character set of the file.
          - `filesize` integer — Size of the file in bytes.
          - `width` integer, nullable — Width of the file in pixels. Only applies to images.
          - `height` integer, nullable — Height of the file in pixels. Only applies to images.
          - `duration` integer, nullable — Duration of the file in seconds. Only applies to audio and video.
          - `embed` string, nullable — Where the file was embedded from.
          - `description` string, nullable — Description for the file.
          - `location` string, nullable — Where the file was created. Is automatically populated based on Exif data for images.
          - `tags` string[], nullable — Tags for the file. Is automatically populated based on Exif data for images.
          - `metadata` object, nullable — IPTC, Exif, and ICC metadata extracted from file
          - `focal_point_x` integer, nullable
          - `focal_point_y` integer, nullable
          - `tus_id` string, nullable
          - `tus_data` unknown
          - `uploaded_on` string, date-time — When the file was last uploaded/replaced.
      - `language` string — The user's language used in Directus.
      - `tfa_secret` string, nullable — The 2FA secret string that's used to generate one time passwords.
      - `status` 'active' | 'invited' | 'draft' | 'suspended' | 'deleted' — Status of the user.
      - `role` union — Unique identifier of the role of this user.
        - string
        - Roles
          - `id` string — Unique identifier for the role.
          - `name` string — Name of the role.
          - `icon` string — The role's icon.
          - `description` string, nullable — Description of the role.
          - `parent` union — $t:field_options.directus_roles.parent_note
            - string, uuid
            - Roles — recursive
          - `children` union[], nullable — $t:field_options.directus_roles.children_note
            - union
              - …
          - `policies` unknown
          - `users` union[], nullable
            - union
              - …
      - `token` string, nullable — Static token for the user.
      - `last_access` string, date-time, nullable — When this user used the API last.
      - `last_page` string, nullable — Last page that the user was on.
      - `provider` string
      - `external_identifier` string, nullable
      - `auth_data` unknown
      - `email_notifications` boolean, nullable
      - `appearance` string, nullable
      - `theme_dark` string, nullable
      - `theme_light` string, nullable
      - `theme_light_overrides` unknown
      - `theme_dark_overrides` unknown
      - `text_direction` string
      - `policies` unknown

## Response `200`

Successful request

- object
  - `data` Operations
    - `id` string — Unique identifier for the operation.
    - `name` string — The name of the operation.
    - `key` string — Key for the operation. Must be unique within a given flow.
    - `type` string — Type of operation. One of `log`, `mail`, `notification`, `create`, `read`, `request`, `sleep`, `transform`, `trigger`, `condition`, or any type of custom operation extensions.
    - `position_x` integer — Position of the operation on the X axis within the flow workspace.
    - `position_y` integer — Position of the operation on the Y axis within the flow workspace.
    - `options` object, nullable — Options depending on the type of the operation.
    - `resolve` union — The operation triggered when the current operation succeeds (or `then` logic of a condition operation).
      - string
      - Operations — recursive
    - `reject` union — The operation triggered when the current operation fails (or `otherwise` logic of a condition operation).
      - string
      - Operations — recursive
    - `flow` union
      - string, uuid
      - Flows
        - `id` string — Unique identifier for the flow.
        - `name` string — The name of the flow.
        - `icon` string — Icon displayed in the Admin App for the flow.
        - `color` string, nullable — Color of the icon displayed in the Admin App for the flow.
        - `description` string, nullable
        - `status` 'active' | 'inactive' — Current status of the flow.
        - `trigger` string — Type of trigger for the flow. One of `hook`, `webhook`, `operation`, `schedule`, `manual`.
        - `accountability` string — The permission used during the flow. One of `$public`, `$trigger`, `$full`, or UUID of a role.
        - `options` object, nullable — Options of the selected trigger for the flow.
        - `operation` union — UUID of the operation connected to the trigger in the flow.
          - string
          - Operations — recursive
        - `date_created` string, date-time, nullable — Timestamp in ISO8601 when the flow was created.
        - `user_created` union — The user who created the flow.
          - string
          - Users
            - `id` string — Unique identifier for the user.
            - `first_name` string — First name of the user.
            - `last_name` string — Last name of the user.
            - `email` string, email — Unique email address for the user.
            - `password` string — Password of the user.
            - `location` string, nullable — The user's location.
            - `title` string, nullable — The user's title.
            - `description` string, nullable — The user's description.
            - `tags` string[], nullable — The user's tags.
            - `avatar` union — The user's avatar.
              - …
            - `language` string — The user's language used in Directus.
            - `tfa_secret` string, nullable — The 2FA secret string that's used to generate one time passwords.
            - `status` 'active' | 'invited' | 'draft' | 'suspended' | 'deleted' — Status of the user.
            - `role` union — Unique identifier of the role of this user.
              - …
            - `token` string, nullable — Static token for the user.
            - `last_access` string, date-time, nullable — When this user used the API last.
            - `last_page` string, nullable — Last page that the user was on.
            - `provider` string
            - `external_identifier` string, nullable
            - `auth_data` unknown
            - `email_notifications` boolean, nullable
            - `appearance` string, nullable
            - `theme_dark` string, nullable
            - `theme_light` string, nullable
            - `theme_light_overrides` unknown
            - `theme_dark_overrides` unknown
            - `text_direction` string
            - `policies` unknown
        - `operations` union[], nullable
          - union
            - string, uuid
            - Operations — recursive
    - `date_created` string, date-time, nullable — Timestamp in ISO8601 when the operation was created.
    - `user_created` union — The user who created the operation.
      - string
      - Users
        - `id` string — Unique identifier for the user.
        - `first_name` string — First name of the user.
        - `last_name` string — Last name of the user.
        - `email` string, email — Unique email address for the user.
        - `password` string — Password of the user.
        - `location` string, nullable — The user's location.
        - `title` string, nullable — The user's title.
        - `description` string, nullable — The user's description.
        - `tags` string[], nullable — The user's tags.
        - `avatar` union — The user's avatar.
          - string
          - Files
            - `id` string — Unique identifier for the file.
            - `storage` string — Where the file is stored. Either `local` for the local filesystem or the name of the storage adapter (for example `s3`).
            - `filename_disk` string — Name of the file on disk. By default, Directus uses a random hash for the filename.
            - `filename_download` string — How you want to the file to be named when it's being downloaded.
            - `title` string — Title for the file. Is extracted from the filename on upload, but can be edited by the user.
            - `type` string — MIME type of the file.
            - `folder` union — Virtual folder where this file resides in.
              - …
            - `uploaded_by` union — Who uploaded the file.
              - …
            - `created_on` string, date-time — When the file was created.
            - `modified_by` union
              - …
            - `modified_on` string, date-time
            - `charset` string, nullable — Character set of the file.
            - `filesize` integer — Size of the file in bytes.
            - `width` integer, nullable — Width of the file in pixels. Only applies to images.
            - `height` integer, nullable — Height of the file in pixels. Only applies to images.
            - `duration` integer, nullable — Duration of the file in seconds. Only applies to audio and video.
            - `embed` string, nullable — Where the file was embedded from.
            - `description` string, nullable — Description for the file.
            - `location` string, nullable — Where the file was created. Is automatically populated based on Exif data for images.
            - `tags` string[], nullable — Tags for the file. Is automatically populated based on Exif data for images.
            - `metadata` object, nullable — IPTC, Exif, and ICC metadata extracted from file
            - `focal_point_x` integer, nullable
            - `focal_point_y` integer, nullable
            - `tus_id` string, nullable
            - `tus_data` unknown
            - `uploaded_on` string, date-time — When the file was last uploaded/replaced.
        - `language` string — The user's language used in Directus.
        - `tfa_secret` string, nullable — The 2FA secret string that's used to generate one time passwords.
        - `status` 'active' | 'invited' | 'draft' | 'suspended' | 'deleted' — Status of the user.
        - `role` union — Unique identifier of the role of this user.
          - string
          - Roles
            - `id` string — Unique identifier for the role.
            - `name` string — Name of the role.
            - `icon` string — The role's icon.
            - `description` string, nullable — Description of the role.
            - `parent` union — $t:field_options.directus_roles.parent_note
              - …
            - `children` union[], nullable — $t:field_options.directus_roles.children_note
              - …
            - `policies` unknown
            - `users` union[], nullable
              - …
        - `token` string, nullable — Static token for the user.
        - `last_access` string, date-time, nullable — When this user used the API last.
        - `last_page` string, nullable — Last page that the user was on.
        - `provider` string
        - `external_identifier` string, nullable
        - `auth_data` unknown
        - `email_notifications` boolean, nullable
        - `appearance` string, nullable
        - `theme_dark` string, nullable
        - `theme_light` string, nullable
        - `theme_light_overrides` unknown
        - `theme_dark_overrides` unknown
        - `text_direction` string
        - `policies` unknown

## Other responses

- `401` — Error: Unauthorized request
- `404` — Error: Not found.

---

[API](https://skmtc.dev/utomic-media/apis/dynamic-api-specification.md) · [All operations](https://skmtc.dev/utomic-media/apis/dynamic-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/utomic-media/dynamic-api-specification/revisions/4a0ccd34700e/schema)
