---
title: "TypeScript SDK: Healthcare"
description: "The methods of the TypeScript client under Healthcare. The business associate agreement an eligible team signs, and the guardrails it unlocks: protected health information replaced in everything an agent or a system is given, held or refused on the way out, and custom guardrails. Every operation answers 404 until the deployment switches the capability on."
url: https://doorman.fyi/docs/sdk/reference/healthcare
markdown: https://doorman.fyi/docs/sdk/reference/healthcare.md
area: "SDKs and tools"
section: "TypeScript SDK"
---

# TypeScript SDK: Healthcare

The methods of the TypeScript client under Healthcare. The business associate agreement an eligible team signs, and the guardrails it unlocks: protected health information replaced in everything an agent or a system is given, held or refused on the way out, and custom guardrails. Every operation answers 404 until the deployment switches the capability on.

Source: https://doorman.fyi/docs/sdk/reference/healthcare

## client.inboxes.guardrails.get

TypeScript:
```ts
client.inboxes.guardrails.get(inboxId: string): Promise<GuardrailSettings>
```

Operation [`inboxes.guardrails.get`](https://doorman.fyi/docs/reference/healthcare.md#inboxes-guardrails-get): `GET /v1/inboxes/{inboxId}/guardrails`

The guardrails in force for one inbox (`inherited` says whether it follows the account's).

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.inboxes.guardrails.update

TypeScript:
```ts
client.inboxes.guardrails.update(inboxId: string, body: UpdateGuardrailPolicy): Promise<GuardrailSettings>
```

Operation [`inboxes.guardrails.update`](https://doorman.fyi/docs/reference/healthcare.md#inboxes-guardrails-update): `PATCH /v1/inboxes/{inboxId}/guardrails`

Give an inbox guardrails of its own.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.inboxes.guardrails.reset

TypeScript:
```ts
client.inboxes.guardrails.reset(inboxId: string): Promise<void>
```

Operation [`inboxes.guardrails.reset`](https://doorman.fyi/docs/reference/healthcare.md#inboxes-guardrails-reset): `DELETE /v1/inboxes/{inboxId}/guardrails`

Remove the inbox's own guardrails so it follows the account's again.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.messages.original

TypeScript:
```ts
client.messages.original(messageId: string): Promise<Message>
```

Operation [`messages.original`](https://doorman.fyi/docs/reference/healthcare.md#messages-original): `GET /v1/messages/{messageId}/original`

The message as it arrived, where healthcare guardrails redact every other read (ADR-027). A console session whose member holds `phi:read`; each read of a message that carries findings is recorded.

Access `session`: a console session only; an API key gets 403 `session_required`. App tokens are refused.

## client.baa.get

TypeScript:
```ts
client.baa.get(): Promise<BaaStanding>
```

Operation [`baa.get`](https://doorman.fyi/docs/reference/healthcare.md#baa-get): `GET /v1/baa`

Where the account stands: whether it may sign, whether someone has, and whether guardrails apply.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.baa.document

TypeScript:
```ts
client.baa.document(): Promise<BaaDocument>
```

Operation [`baa.document`](https://doorman.fyi/docs/reference/healthcare.md#baa-document): `GET /v1/baa/document`

The current text with its version and SHA-256, which a signature names.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.baa.sign

TypeScript:
```ts
client.baa.sign(body: SignBaa): Promise<BaaStanding>
```

Operation [`baa.sign`](https://doorman.fyi/docs/reference/healthcare.md#baa-sign): `POST /v1/baa/sign`

Sign the current text. A console session only: no key and no app signs.

Access `session`: a console session only; an API key gets 403 `session_required`. App tokens are refused.

## client.baa.terminate

TypeScript:
```ts
client.baa.terminate(): Promise<BaaStanding>
```

Operation [`baa.terminate`](https://doorman.fyi/docs/reference/healthcare.md#baa-terminate): `POST /v1/baa/terminate`

End the agreement. Guardrails stop applying at once. A console session only.

Access `session`: a console session only; an API key gets 403 `session_required`. App tokens are refused.

## client.guardrails.get

TypeScript:
```ts
client.guardrails.get(): Promise<GuardrailSettings>
```

Operation [`guardrails.get`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-get): `GET /v1/guardrails`

The account's guardrails, and whether they are in force.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.guardrails.update

TypeScript:
```ts
client.guardrails.update(body: UpdateGuardrailPolicy): Promise<GuardrailSettings>
```

Operation [`guardrails.update`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-update): `PATCH /v1/guardrails`

Change single values. Taking protection away needs a session unless allowed.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.guardrails.preview

TypeScript:
```ts
client.guardrails.preview(body: GuardrailPreviewRequest): Promise<GuardrailPreview>
```

Operation [`guardrails.preview`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-preview): `POST /v1/guardrails/preview`

Run the guardrails, or a draft of them, over a text of your own. Nothing is stored.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.guardrails.rules.list

TypeScript:
```ts
client.guardrails.rules.list(params: ListGuardrailRulesParams = {}): Promise<GuardrailRuleList>
```

Operation [`guardrails.rules.list`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-rules-list): `GET /v1/guardrails/rules`

The custom guardrails, oldest first. `value` is null for a caller that may not change guardrails.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.guardrails.rules.create

TypeScript:
```ts
client.guardrails.rules.create(body: CreateGuardrailRule): Promise<GuardrailRule>
```

Operation [`guardrails.rules.create`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-rules-create): `POST /v1/guardrails/rules`

A term or a pattern, with what a match does in each direction. A pattern is a mask, not a regular expression.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.guardrails.rules.update

TypeScript:
```ts
client.guardrails.rules.update(guardrailId: string, body: UpdateGuardrailRule): Promise<GuardrailRule>
```

Operation [`guardrails.rules.update`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-rules-update): `PATCH /v1/guardrails/rules/{guardrailId}`

Change its name, its actions or whether it applies. Taking protection away needs a session unless allowed.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

## client.guardrails.rules.delete

TypeScript:
```ts
client.guardrails.rules.delete(guardrailId: string): Promise<void>
```

Operation [`guardrails.rules.delete`](https://doorman.fyi/docs/reference/healthcare.md#guardrails-rules-delete): `DELETE /v1/guardrails/rules/{guardrailId}`

Remove it. What it matched is no longer redacted, held or refused.

Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.
