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.
client.baa.document
client.baa.document() -> models.BaaDocumentSends 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
client.baa.get() -> models.BaaSends 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
client.baa.sign(body: models.SignBaa) -> models.BaaSends 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
client.baa.terminate(body: models.TerminateBaa) -> models.BaaSends 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
client.guardrails.get() -> models.GuardrailSettingsSends 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
client.guardrails.preview(body: models.GuardrailPreviewRequest) -> models.GuardrailPreviewSends 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
client.guardrails.update(body: models.UpdateGuardrailPolicy) -> models.GuardrailSettingsSends 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
client.guardrails.rules.create(body: models.CreateGuardrailRule) -> models.GuardrailRuleSends 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
client.guardrails.rules.delete(guardrail_id: str) -> NoneSends 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
client.guardrails.rules.list(*, inbox_id: str | None = None) -> models.GuardrailRuleListSends 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
client.guardrails.rules.update(guardrail_id: str, body: models.UpdateGuardrailRule) -> models.GuardrailRuleSends 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
client.inboxes.guardrails.get(inbox_id: str) -> models.GuardrailSettingsSends 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
client.inboxes.guardrails.reset(inbox_id: str) -> NoneSends 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
client.inboxes.guardrails.update(inbox_id: str, body: models.UpdateGuardrailPolicy) -> models.GuardrailSettingsSends 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
client.messages.original(message_id: str) -> models.MessageSends 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.

