> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/workflow/howto/redact-fields&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Redact Private Data

> How to redact private data in your workflow runs

Workflow runs can contain private data that you don't want visible in the Upstash Console or API responses.

Upstash Workflow allows you to redact specific fields so they appear as `REDACTED:<SHA256>` in the dashboard and API. The original values are still used when delivering requests to your workflow endpoint. The SHA256 hash lets you verify the data without revealing the original values.

To redact fields, pass the `redact` option when triggering a workflow run.

Available options:
| Option | Description |
|--|--|
| body | Redact the body of the workflow steps |
| headers | Redact the headers of the workflow steps |
| headers[header_name] | Redact a specific header (e.g., `headers[Authorization]`) |

<Info>
Redaction is one-way. Once a field is redacted, the original value cannot be retrieved from the API or dashboard.
</Info>

<CodeGroup>
```typescript TypeScript
import { Client } from "@upstash/workflow";

const client = new Client({ token: "<QSTASH_TOKEN>" });

const { workflowRunId } = await client.trigger({
  url: "https://my-app.com/api/workflow",
  body: { hello: "world" },
  redact: {
    body: true,
    header: ["Authorization"] // or `header: true` to redact all headers
  },
});
```


```bash cURL
curl -XPOST \
    -H 'Authorization: Bearer XXX' \
    -H "Content-Type: application/json" \
    -H "Upstash-Redact-Fields: body, header[Authorization]" \
    -d '{ "hello": "world" }' \
    'https://qstash.upstash.io/v2/publish/https://my-app.com/api/workflow'
```
</CodeGroup>

<Frame caption="Logs of a workflow run with `body` and header[My-Secret-Header] redacted">
  <img src="/img/qstash/redact-workflow.png" alt="Redacted workflow fields in the Upstash Console" />
</Frame>

Redaction is configured per workflow run, so you can redact different fields for different runs.

When `body` is redacted, the step outputs in the dashboard and API will show `REDACTED:<SHA256>` instead of the actual values. The workflow still executes with the original data.

If a workflow run fails and moves to the DLQ, the redacted fields remain redacted in the DLQ.
However, when you retry, resume or restart a workflow run from DLQ, Workflow delivers the original values to your endpoint.
