ORGANIZATION MANAGEMENT

⚙️ Admin API

Programmatically manage your organization, team members, API keys, and usage data with secure administrative endpoints.

Available Resources

👥
Members
Invite, list, and manage organization members
🔑
API Keys
Create, rotate, and revoke API keys
📊
Usage
Query token usage and cost data
📁
Projects
Create and manage project workspaces
📝
Audit Logs
View organization activity history
🛡️
Settings
Configure organization preferences

API Endpoints

GET /v1/organization/members
List all members in your organization
POST /v1/organization/invites
Invite a new member to your organization
GET /v1/organization/api-keys
List all API keys
POST /v1/organization/api-keys
Create a new API key
DELETE /v1/organization/api-keys/:id
Revoke an API key
GET /v1/organization/usage
Get organization usage data
PATCH /v1/organization/members/:id
Update a member's role
GET /v1/organization/audit-logs
Retrieve audit log entries

Example: List Organization Members

Python
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!

Permission Scopes

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

⚠️ Security Notice

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.

Manage Your Organization

Access the Admin API to automate organization management.

API Reference → Security Best Practices