DEVELOPER & VENDOR REFERENCE

Stateless REST API, Secret Key Login & SMTP Relay

Automate domain onboarding, virtual mailbox provisioning, and white-label customer creation using stateless `tya_ws_...` and `tya_admin_...` tokens.

1. Stateless Secret Key Auto-Login

Sign in directly to the Workspace Console by passing your active `tya_ws_...` API key in the URL query string:

GET https://workspace.teeyatech.com/login/?secret=tya_ws_YOUR_SECRET_KEY

2. Tenant Domain & Mailbox REST API

Pass `X-API-Key: tya_ws_...` or `Authorization: Bearer tya_ws_...` on any `/api/v1/` endpoint.

GET / POST /api/v1/domains/
curl -X POST https://workspace.teeyatech.com/api/v1/domains/ \
  -H "X-API-Key: tya_ws_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'
GET / POST /api/v1/mailboxes/
curl -X POST https://workspace.teeyatech.com/api/v1/mailboxes/ \
  -H "X-API-Key: tya_ws_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com", "local_part": "hello", "password": "StrongPassword123!", "quota_mb": 1024}'

3. Private Administrative / Vendor Provisioning API

Atomically creates a verified User account, Business workspace, Subscription plan, custom Domain, initial Mailbox, and returns a stateless `secret_login_url`. Requires `X-Admin-API-Key: tya_admin_...`.

POST /api/v1/admin/provision/
curl -X POST https://workspace.teeyatech.com/api/v1/admin/provision/ \
  -H "X-Admin-API-Key: tya_admin_YOUR_VENDOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "founder@clientco.com",
    "password": "SecurePassword2026!",
    "business_name": "ClientCo Ltd",
    "domain": "clientco.com",
    "plan_code": "business",
    "initial_mailbox": "hello"
  }'

4. Programmatic SMTP Submission (Paid Plans)

Configure your backend framework (Django, Node.js, Laravel, Go) using scoped SMTP credentials generated in the Workspace Console:

SMTP_HOST = "mail.teeyatech.com"
SMTP_PORT = 587
SMTP_USE_TLS = True
SMTP_USERNAME = "hello@yourdomain.com"
SMTP_PASSWORD = "tya_smtp_YOUR_SCOPED_CREDENTIAL"