# Managing Operators As a platform partner, you manage the lifecycle of operators — from creation through to suspension. ## Create an operator ``` POST /platform-api/operators ``` Provisions a new operator account under your platform. ### Example ```bash curl -X POST https://api.onehazel.com/platform-api/operators \ -H "Authorization: Bearer oh_platform_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Lucky Spin Casino", "plan": "professional", "contactEmail": "admin@luckyspin.com", "industry": "igaming" }' ``` ## List operators ``` GET /platform-api/operators ``` Returns all operators managed by your platform. ### Example ```bash curl https://api.onehazel.com/platform-api/operators \ -H "Authorization: Bearer oh_platform_YOUR_KEY" ``` ## Get operator details ``` GET /platform-api/operators/:id ``` Returns detailed information about a specific operator, including their current plan, status, and configuration. ### Example ```bash curl https://api.onehazel.com/platform-api/operators/op_abc123 \ -H "Authorization: Bearer oh_platform_YOUR_KEY" ``` ## Update an operator ``` PUT /platform-api/operators/:id ``` Update an operator's plan, status, or other configuration. ### Example ```bash curl -X PUT https://api.onehazel.com/platform-api/operators/op_abc123 \ -H "Authorization: Bearer oh_platform_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "plan": "enterprise", "status": "active" }' ``` ## Suspend an operator ``` DELETE /platform-api/operators/:id ``` Suspends an operator account. Suspended operators cannot authenticate or make API calls. ### Example ```bash curl -X DELETE https://api.onehazel.com/platform-api/operators/op_abc123 \ -H "Authorization: Bearer oh_platform_YOUR_KEY" ``` ## Manage operator API keys ### Generate a key for an operator ``` POST /platform-api/operators/:id/api-keys ``` Creates an API key on behalf of the operator. The plaintext key is returned once. ```bash curl -X POST https://api.onehazel.com/platform-api/operators/op_abc123/api-keys \ -H "Authorization: Bearer oh_platform_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "Platform-provisioned key" }' ``` ### List an operator's keys ``` GET /platform-api/operators/:id/api-keys ``` Returns the operator's keys with masked hashes. ```bash curl https://api.onehazel.com/platform-api/operators/op_abc123/api-keys \ -H "Authorization: Bearer oh_platform_YOUR_KEY" ``` ### Revoke an operator's key ``` DELETE /platform-api/operators/:id/api-keys/:keyId ``` Revokes a specific API key belonging to the operator. ```bash curl -X DELETE https://api.onehazel.com/platform-api/operators/op_abc123/api-keys/key_xyz \ -H "Authorization: Bearer oh_platform_YOUR_KEY" ``` ## Tenant isolation Each operator has fully isolated data. Platform partners can view and manage operator metadata (name, plan, status, keys) but cannot access operator data, events, or analytics directly. Operators access their own data through the standard operator APIs using their own API keys.