Secrets
Secrets
toothfairyai@latest…Manager for secrets operations.
This manager provides methods to create, update, and manage secrets.
Example:
>>> client = ToothFairyClient(api_key="...", workspace_id="...")
>>> secret = client.secrets.create(...)
Accessed via client.secrets.
Methods
| Method | HTTP | Endpoint |
|---|---|---|
create | POST | POST /secret/create |
delete | DELETE | DELETE /secret/delete/{secret_id} |
create
Create a new secret linked to an authorisation.
def create(
authorisation_id: str,
password_secret_value: str,
suffix: Optional[str] = None
) -> Secret
Endpoint: POST /secret/create · API service
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Authorisation record ID to associate the secret with |
workspaceid | string | yes | Unique workspace identifier in UUID v4 format |
secret | string | yes | The secret value to store in TF Secrets Manager |
The Python SDK accepts
snake_casekeyword arguments and converts them to thecamelCasewire fields shown above.
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | Operation success status |
data | object | Response data |
message | string | Optional success message |
Example
client.secrets.create(authorisation_id="agent-id", password_secret_value="…")
delete
Delete a secret.
def delete(secret_id: str) -> Dict[str, bool]
Endpoint: DELETE /secret/delete/{secret_id} · API service
Response
Returns the SuccessResponse object — fields documented in the create section above.
Example
client.secrets.delete(secret_id="agent-id")