Dual-Tier Cryptographic Keys, HMAC Signing & Rate Limits المفاتيح المشفرة ذات المستويين، توقيع HMAC، وحدود الطلبات
Vismatix API v3 accepts credentials via Authorization: Bearer <key> or X-API-Key: <key> and splits authority into two cryptographically prefixed tiers to follow strict least-privilege isolation.
يدعم الإصدار الثالث تمرير المفتاح عبر ترويسة Authorization: Bearer <key> أو X-API-Key: <key> مع فصل الصلاحيات إلى مستويين لمنع تصعيد الامتيازات.
Account Master Key
Root administrative power across all owned workspaces, global settings, GC wallet, webhooks, notifications, presets, audit logs, and (when admin-verified) verified AI routes.
Project Restricted Key
Locked strictly to a single project_id. Ideal for client websites, Discord bots, and isolated content scripts.
Exact Scope Matrix by Key Prefix مصفوفة الصلاحيات الفعلية حسب نوع المفتاح
| Resource Prefix | vmtx_u_ (Master) | vmtx_p_ (Project) |
|---|---|---|
| /api/v3/me · /posts · /matrix · /tasks · /ideas | Allowed (All workspaces) | Allowed (Scoped project_id only) |
| /api/v3/analytics/* · /templates/* | Allowed | Allowed (Project filtered) |
| /api/v3/account* · /audit-logs* · /wallet* | Allowed | 403 FORBIDDEN_PROJECT_KEY |
| /api/v3/webhooks* · /notifications* · /presets* | Allowed | 403 FORBIDDEN_PROJECT_KEY |
| /api/v3/ai/* | Requires Admin Verification | 403 FORBIDDEN_PROJECT_KEY |
Verify Key Identity (GET /api/v3/me)
Starter 180 · Plus+ 300 req/min
Pass X-Vismatix-Signature: t=<unix_ts>,v3=<hex> with a 300-second drift limit. Sign "{ts}.{METHOD}.{path}.{sha256_hex(raw_body)}" using sha256(plain_api_key) as the HMAC-SHA256 secret.
Rate Limits, Idempotency Replay & Machine Error Code Reference حدود الطلبات، مفتاح عدم التكرار (Idempotency)، وجدول أخطاء API v3
Protected by adaptive burst & sustained edge protection (per plan: Starter 180 req/min, Plus+ 300 req/min).
Successful responses replay for 24h (86,400s) with header X-Vismatix-Idempotency: HIT; concurrent pending lock is 600s.
/api/v3/analytics/export permits 15/day on Starter, 50/day on Plus, and Unlimited on Pro / Ultra.
| HTTP | Error Code | Cause & Autonomous Agent Recovery Action |
|---|---|---|
| 400 | IDEMPOTENCY_KEY_REQUIRED | Attach a fresh UUID v4 Idempotency-Key (<= 255 chars) and retry mutation. |
| 401 | UNAUTHORIZED / INVALID_SIGNATURE | Check Authorization: Bearer header or recompute HMAC within 300s clock skew. |
| 403 | SUBSCRIPTION_REQUIRED | Account has plan = 'none' or lacks the paid API entitlement; Free Forever workspace access remains within its published limits. |
| 403 | FORBIDDEN_PROJECT_KEY | vmtx_p_ blocked on account/wallet/webhook/ai routes; switch to vmtx_u_. |
| 403 | FORBIDDEN_PLAN_LIMIT | Action exceeds plan tier (e.g., Starter API post writes or webhook cap reached). |
| 403 | AI_API_ACCESS_DISABLED | External key lacks admin unlock for /ai/*; fall back to /posts/virality-audit or /geo/analyze. |
| 409 | IDEMPOTENCY_REQUEST_IN_PROGRESS | Same key currently executing (600s lock); wait 1–3s and retry with identical key. |
| 409 | PUBLICATION_REVIEW_REQUIRED | Post currently publishing or awaiting 2FA/browser check; pause edits until resolved. |
| 422 | SSRF_BLOCKED / VALIDATION_ERROR | Private/localhost webhook target blocked or schedule outside +60m..+12m; fix payload. |
| 429 | RATE_LIMIT_EXCEEDED / EXPORT_QUOTA_EXCEEDED | Sleep exact Retry-After seconds (or note 15/50 daily analytics export cap). |