---
id: workflow-config-rotate
title: "Rotate a value"
description: "Replaces the entry's value in place. Name, place, and the secret flag are unchanged."
sidebar_label: "Rotate a value"
hide_title: true
hide_table_of_contents: true
api: eJy1WG1v4zYS/isDosBmfbKcFnvonYF+8OayaFo0DbJZpMU2iGlxZLGRSC05suMz/N8PQ0qyHTuboMXlS2SJmtdnnpnRWpCcezH+LG6te8hLuwSPmUPyII2ChXRazkr04i4RCn3mdE3aGjEW11iXMkMPVCCgIbd642EhywZBGwjPUriUFSbxRxIE8uGoAPJSzkE6hMZkhTRzVKlIhK3RSVZxocRYLFujhpk1uZ6PnSVJKBJRSycrJHRs+1potqiWVIhEGFmhGAutRCIcfmm0QyXG5BpMhM8KrKQYrwWtaj7lyWkzF5un3t0UCFFn9A20gpNpls/v0zSdvmVL8VFWdclC+PZ3s3+rb/NTKTZ3US16em/VinVl1hAa4ktZ16XOgoOjPz2rWh8aZWd/YkZ75n8WIbSchtpxjEij51fi7UOHwl8iPGaN07QKUZqhdOgmDRVi/PkuGupra3wU9d3pKf87DETM6lJ6iPEPiXq9U5pClM5COM85miI5cHVf66QDiXU9BlM4f5QZlSuwBsHmMOWET/nItMPJFLRCQzrXLTAD9EATlHqBPoWPUWzwyAf0LZ0mHFpTrsb8xircNLhABw6pcQYVzFYgzQocyuD6bloCzALkQrAdsjOZQw7ThK+bWrXXB7nT6jBxz+OqQ/bhG08LM0eHJkPFhagw10bzIw/Sw/Sb9bqr8PRy8ss5bDYxhPxgId327j7GL6/uJ1cX9z+f/y42vadbW2bWlijNgTEXVdVQzN6US3AKlXxoc9PCqo9/IAiHSmaECjgDq2WBDlPWGIr7Rd8/2FKha7N+Mh1NQUdd1s2l0f8NGAVnLb1N4cqhR0OwLNBsWSwiBawBCXkQtx+IkcxYyFATVp4t67D3snU9xbouRS8bwVjvNIRAPFPwiTBNWXKkO67b1/0rB7gHdG4dGGuGbZWxTo0+yMc8x4z0Al+R3SB0qamAqTQZerLO/xDSPGaHqEAHVGjmjSUstfFQO8x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SYWdfO2THOXAm86/D/pOUOUzfkE7ANxQvORWnnvpX48djHgsEAHhBrnrDCNibLeMAjsc2epXHT4xBv6SSO+dZTJUOLavf46zCRgYwD2lPA7CzX/68vEm3FED7SKMxYYZRz5ZZePvc7gI8dmEkkEWMdJtTCeuIz6/VMevzkys2Gb39p0PFafscjfQxcKHSlPV8rMc5l6Z/O8bv+nly3rPMWXvG54qgbHUcbZuiukkUiHnAVP6Fs7jaJKFAqdMG6+OAs2jC84de3Lx4Mmpuke2OSZVjTV8/e7TDk1eTm7Edmo/YLSlwNhJNLXr/lMlppQ1ACyYV7a1FKM28Cb4solLlL7lPfE6oLbh2Nw3odT9zYBzSbTR8W4t8cmc3mf92ruAw=
sidebar_class_name: "patch api-method"
info_path: docs/api/workflows
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Rotate a value"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/workflows/config/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Replaces the entry's value in place. Name, place, and the secret flag are unchanged.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"The config entry id (`cfg_...`).","example":"cfg_2b9d1f0a"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The value was rotated.","content":{"application/json":{"schema":{"title":"ConfigEntry","type":"object","description":"A secret or variable. Exactly one of `path` or `workflow` identifies the place it lives. Secret values are write-only: they are never returned by any read.","required":["id","name","secret","createdAt","updatedAt"],"properties":{"id":{"type":"string","example":"cfg_2b9d1f0a"},"name":{"type":"string","description":"Referenced in definitions as `${{ secrets.NAME }}` or `${{ vars.NAME }}`.","example":"NP_API_KEY"},"secret":{"type":"boolean","description":"Immutable. `true` makes the value write-only and redacted everywhere."},"path":{"type":"string","description":"Folder place (`/` is the organization root). Present when the entry lives on a folder.","example":"/action-items"},"workflow":{"type":"string","description":"Workflow reference. Present when the entry lives on one workflow."},"value":{"type":"string","nullable":true,"description":"Only returned for non-secret entries."},"effective":{"type":"boolean","description":"Only with `ancestors=true`: whether this row wins precedence for its name."},"mode":{"type":"string","enum":["created","updated"],"description":"Write responses only: whether the entry was created or its value rotated."},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}}}},"4XX":{"description":"Client error, as plain JSON.","content":{"application/json":{"schema":{"title":"ConfigError","type":"object","description":"The error body secrets-and-variables endpoints return: a machine-readable code plus a message.","properties":{"error":{"type":"string","description":"Machine-readable code, e.g. `invalid_name`, `invalid_place`, `secret_flag_immutable`, `not_found`.","example":"invalid_place"},"message":{"type":"string","example":"Provide exactly one of path or workflow"}}}}}},"5XX":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}}}}
>
  
</StatusCodes>


      