Programmatically manage your organization, team members, API keys, and usage data with secure administrative endpoints.
from mythicdot import MythicDot
# Use an admin API key
client = MythicDot(api_key="mythic-admin-...")
# List all organization members
members = client.organization.members.list()
for member in members.data:
print(f"{member.email} - {member.role}")
# Invite a new member
invite = client.organization.invites.create(
email="developer@company.com",
role="member" # or "admin"
)
print(f"Invite sent: {invite.id}")
# Create a new API key
new_key = client.organization.api_keys.create(
name="Production Key",
permissions=["models.read", "chat.completions"]
)
print(f"New key: {new_key.key}") # Only shown once!
| Scope | Description |
|---|---|
| organization.read | View organization details and settings |
| organization.write | Modify organization settings |
| members.read | List and view member details |
| members.write | Invite, update, or remove members |
| api_keys.read | List API keys (without exposing secrets) |
| api_keys.write | Create, rotate, or revoke API keys |
| usage.read | View usage and billing data |
| audit_logs.read | View organization audit logs |
Admin API keys have elevated privileges. Store them securely and never expose them in client-side code or version control. Use environment variables and secret management systems. Admin keys should only be used in secure server environments.
Access the Admin API to automate organization management.