---
title: "Python SDK: Healthcare"
description: "The methods of the Python 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/python/reference/healthcare
markdown: https://doorman.fyi/docs/python/reference/healthcare.md
area: "SDKs and tools"
section: "Python SDK"
---

# Python SDK: Healthcare

The methods of the Python 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/python/reference/healthcare

## client.baa.document

Python:
```python
client.baa.document() -> models.BaaDocument
```

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

Read the agreement.

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

## client.baa.get

Python:
```python
client.baa.get() -> models.Baa
```

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

Read the agreement's standing.

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

## client.baa.sign

Python:
```python
client.baa.sign(body: models.SignBaa) -> models.Baa
```

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

Sign the agreement.

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

## client.baa.terminate

Python:
```python
client.baa.terminate(body: models.TerminateBaa) -> models.Baa
```

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

End the agreement.

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

## client.guardrails.get

Python:
```python
client.guardrails.get() -> models.GuardrailSettings
```

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

Read the guardrails.

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

## client.guardrails.preview

Python:
```python
client.guardrails.preview(body: models.GuardrailPreviewRequest) -> models.GuardrailPreview
```

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

Preview what the guardrails do to a text.

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

## client.guardrails.update

Python:
```python
client.guardrails.update(body: models.UpdateGuardrailPolicy) -> models.GuardrailSettings
```

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

Change the 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

Python:
```python
client.guardrails.rules.create(body: models.CreateGuardrailRule) -> models.GuardrailRule
```

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

Write a custom guardrail.

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

Python:
```python
client.guardrails.rules.delete(guardrail_id: str) -> None
```

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

Remove a custom guardrail.

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

Python:
```python
client.guardrails.rules.list(*, inbox_id: str | None = None) -> models.GuardrailRuleList
```

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

List custom 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.update

Python:
```python
client.guardrails.rules.update(guardrail_id: str, body: models.UpdateGuardrailRule) -> models.GuardrailRule
```

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

Change a custom guardrail.

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

## client.inboxes.guardrails.get

Python:
```python
client.inboxes.guardrails.get(inbox_id: str) -> models.GuardrailSettings
```

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

Read an inbox's guardrails.

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

Python:
```python
client.inboxes.guardrails.reset(inbox_id: str) -> None
```

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

Return an inbox to the account's guardrails.

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

Python:
```python
client.inboxes.guardrails.update(inbox_id: str, body: models.UpdateGuardrailPolicy) -> models.GuardrailSettings
```

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

Give an inbox its own guardrails.

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

## client.messages.original

Python:
```python
client.messages.original(message_id: str) -> models.Message
```

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

Read a message as it arrived.

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