Skip to main content

Enterprise API Reference

This document covers the API endpoints for Waxell's enterprise features.

Authentication

All enterprise APIs require authentication with your API key:

curl -H "X-Wax-Key: wax_sk_..." https://api.waxell.dev/waxell/v1/...

Data Residency

List Regions

GET /waxell/v1/regions/

Response:

{
"regions": [
{
"code": "us-east-1",
"name": "US East",
"price_cents": 0,
"compliance": ["HIPAA", "SOC2", "FedRAMP"]
},
{
"code": "eu-west-1",
"name": "EU West",
"price_cents": 50000,
"compliance": ["GDPR", "SOC2", "ISO27001"]
}
]
}

Get Current Region

GET /waxell/v1/tenant/region/

Change Region

POST /waxell/v1/tenant/region/
Content-Type: application/json

{
"region_code": "eu-west-1"
}

Sub-Tenants

List Sub-Tenants

GET /waxell/v1/sub-tenants/

Response:

{
"sub_tenants": [
{
"id": "st_abc123",
"name": "Acme Corp",
"slug": "acme-corp",
"status": "active",
"created_at": "2024-01-15T10:00:00Z"
}
]
}

Create Sub-Tenant

POST /waxell/v1/sub-tenants/
Content-Type: application/json

{
"name": "Acme Corp",
"external_id": "customer-123",
"contact_email": "admin@acme.com",
"quotas": {
"max_agents": 50,
"max_tokens_per_day": 500000,
"max_agent_runs_per_day": 1000
}
}

Update Sub-Tenant

PATCH /waxell/v1/sub-tenants/{sub_tenant_id}/
Content-Type: application/json

{
"quotas": {
"max_agents": 100
}
}

Suspend Sub-Tenant

POST /waxell/v1/sub-tenants/{sub_tenant_id}/suspend/
Content-Type: application/json

{
"reason": "Payment overdue"
}

Resume Sub-Tenant

POST /waxell/v1/sub-tenants/{sub_tenant_id}/resume/

Sub-User Identity

Create Token

POST /waxell/v1/identity/sub-users/token/
Content-Type: application/json

{
"sub_user_id": "user-123",
"email": "user@example.com",
"display_name": "John Doe",
"roles": ["viewer", "agent_user"],
"permissions": ["agents:trigger"],
"expires_in": 3600
}

Response:

{
"token": "wax_su_eyJ...",
"session_id": "sess_abc123",
"expires_at": "2024-01-15T13:00:00Z"
}

Validate Token

POST /waxell/v1/identity/sub-users/validate/
Content-Type: application/json

{
"token": "wax_su_eyJ..."
}

Revoke Sessions

POST /waxell/v1/identity/sub-users/{sub_user_id}/revoke/

Add-Ons

List Available Add-Ons

GET /waxell/v1/add-ons/

List Active Add-Ons

GET /waxell/v1/tenant/add-ons/

Activate Add-On

POST /waxell/v1/tenant/add-ons/
Content-Type: application/json

{
"add_on_code": "hipaa_compliance"
}

Cancel Add-On

DELETE /waxell/v1/tenant/add-ons/{add_on_code}/

Audit Logs

List Audit Logs

GET /waxell/v1/audit/

Query Parameters:

  • start_date - Filter by start date (ISO 8601)
  • end_date - Filter by end date (ISO 8601)
  • actor_type - Filter by actor type (user, agent, system)
  • action - Filter by action
  • limit - Number of results (default: 100)
  • offset - Pagination offset

Export Audit Logs

POST /waxell/v1/audit/export/
Content-Type: application/json

{
"start_date": "2024-01-01T00:00:00Z",
"end_date": "2024-01-31T23:59:59Z",
"format": "json"
}

Response:

{
"export_id": "exp_abc123",
"status": "processing",
"download_url": null
}

Get Export Status

GET /waxell/v1/audit/export/{export_id}/

Error Responses

All errors follow this format:

{
"error": {
"code": "quota_exceeded",
"message": "Sub-tenant quota exceeds parent limit",
"details": {
"field": "max_agents",
"requested": 100,
"parent_limit": 50
}
}
}

Common error codes:

  • unauthorized - Invalid or missing API key
  • forbidden - Insufficient permissions
  • not_found - Resource not found
  • quota_exceeded - Quota limit reached
  • validation_error - Invalid request data

Next Steps