# scrubBody

**Kind:** Function

**Source:** [`atloria-monorepo/packages/ui-core/src/components/api-explorer/permalink.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/ui-core/src/components/api-explorer/permalink.ts#L97)

A request body, minus anything credential-shaped.

A JSON body is walked so that `{"email":…, "password":…}` on a login operation loses only the
password. A body that is NOT JSON cannot be walked, so it travels only when nothing in it
looks like a credential — the conservative direction, because the alternative is putting a
reader's token into a link they are about to paste into a chat room.

## Signature

```ts
function scrubBody(body: string | undefined, secrets: string[]): string | undefined
```

## Parameters

| Name | Type |
|---|---|
| `body` | `string | undefined` |
| `secrets` | `string[]` |

**Returns:** `string | undefined`
