Developer & Reseller REST API
Welcome to the programmatic API reference for Muse Runner. Connect your storefront, automated Telegram bot, or commerce backend to purchase instant ready-made accounts and high-concurrency referral boosts with zero-touch delivery.
https://api.artificial.ai.id Authentication & Secret Keys
RFC 6750 Bearer
All reseller operations require programmatic authentication via secret API keys. Generate your secret key through the Telegram Bot menu using /api. Keys carry the prefix muse_live_ followed by a 64-character cryptographic hash.
hmac.compare_digest() to eliminate side-channel timing attack vulnerabilities. In-memory TTL caching guarantees sub-millisecond authorization.
| Header | Description |
|---|---|
Authorization string • required |
Standard RFC 6750 HTTP Bearer authentication token: Bearer muse_live_... |
X-API-Key string • optional | Direct API key header accepted as alternative to Bearer header without prefix. |
Content-Type string • required for POST/PUT |
Must be explicitly set to application/json for all mutating endpoints.
|
Cryptographic Security & Hash Verification
HMAC-SHA256 & Anti-ReplayProtect your integration from packet tampering, unauthorized webhook injection, and replay attacks with enterprise cryptographic standards:
X-Muse-Signature header. Payloads are canonicalized with sorted keys and compact separators (separators=(',', ':')) before signing.
t={timestamp},v1={hash}. Payloads with clock drift exceeding 300 seconds (5 minutes) must be discarded.
Idempotency-Key: <uuid-v4> on purchase requests. If your network connection drops or times out, re-sending with the same key guarantees exactly-once processing with zero double-debiting.
127.0.0.1, ::1), RFC 1918 private subnets, link-local, or cloud metadata endpoints are rejected with 422 Unprocessable Entity.
| Attribute | Specification |
|---|---|
X-Muse-Signature HTTP Header |
Header format: t=<timestamp>,v1=<hmac_sha256_hex> |
Idempotency-Key HTTP Header • UUIDv4 | Prevents duplicate transactions upon network retry during transient drops. |
Signature Digest HMAC-SHA256 |
Computed over "{timestamp}.{raw_json_body}" using your secret API key.
|
Anti-Replay Window 300 Seconds | Maximum allowable time drift between dispatcher timestamp and your server clock. |
Make Your First Request
GET /api/v1/reseller/me
Verify connectivity and inspect your wallet balance by sending a test request to /api/v1/reseller/me. A successful response confirms valid authentication and returns your live USD balance, remaining boost tickets, and default webhook URL.
| Attribute | Description |
|---|---|
telegram_id integer | Unique Telegram user ID linked to your reseller wallet account. |
balance_usd float | Active available balance in USD. Debited atomically when purchasing accounts or boosts. |
tickets integer | Pre-allocated boost tickets usable in place of cash balance. |
masked_api_key string |
Masked representation of your active secret key for verification (muse_live_***b85b).
|
webhook_url string / null | Persistent default webhook URL registered to receive asynchronous batch completion callbacks. |
# Platform Architecture & Reliability Guarantees
Core behavioral invariants enforced across all API endpoints, queue workers, and webhook pipelines:
01. Sliding-Window Rate Limiting
Traffic is throttled at 120 requests per 60 seconds per API key. Exceeding requests return an HTTP 429 response ({"detail": "Rate limit exceeded"}) with standard Retry-After headers.
02. Zero-Loss Auto-Refund Guarantee
If a target referral code saturates its capacity mid-batch, the queue triggers a fast-halt Circuit-Breaker. Unprocessed tickets are 100% automatically refunded to your wallet USD balance immediately with zero support ticket required.
03. 3-Tier Webhook Resolution & DLQ
Dynamic Override (webhook_url in order payload) > Account Default > Silent Fulfillment. Failed attempts retry automatically across [5s, 15s, 30s, 60s, 300s] before Dead-Letter-Queue archival.
04. Deterministic Error Contracts
Errors follow RFC-7807 structured JSON problem details with machine-readable error codes (e.g. ERR_INSUFFICIENT_FUNDS, ERR_RATE_LIMIT_EXCEEDED, ERR_SSRF_BLOCKED) ensuring reliable programmatic handling.
Category 01 · Catalog Discovery & Reseller Profile
4 Endpoints /health Service Health & Liveness Probe
Public readiness and liveness diagnostic probe checking API gateway availability.
| Attribute | Description |
|---|---|
status string | Service health status ('ok'). |
service string | Service identifier ('muse-gateway'). |
message string | Operational status notice. |
/api/v1/catalog Browse Catalog, Live Stock & Prices
Discovers all active catalog products, available stock counts, token denominations, and dynamic unit prices.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
| Attribute | Description |
|---|---|
status string | Catalog status ('ok'). |
products array | List of available products (BYOC and Ready Accounts). |
products[].product_id string | Product SKU identifier (e.g. 'BYOC', 'ACCOUNT_1B', 'ACCOUNT_31B'). |
products[].unit_price_usd float | Unit price per account or referral boost in USD. |
products[].stock_available integer | Current inventory count (-1 for unlimited BYOC booster). |
products[].delivery_type string | 'SYNCHRONOUS_CREDENTIALS' or 'ASYNCHRONOUS_BOOST'. |
/api/v1/reseller/me Reseller Profile, Balance & Webhook
Retrieves authenticated reseller's account profile, USD wallet balance, free voucher tickets, masked secret key, and configured default webhook URL.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
| Attribute | Description |
|---|---|
telegram_id integer | Unique Telegram owner account identifier. |
balance_usd float | Current wallet credit balance in USD available for orders. |
tickets integer | Remaining promotional ticket voucher balance. |
masked_api_key string | Masked representation of your API secret key. |
webhook_url string | null | Persistent default webhook URL registered on this account. |
is_banned boolean | Whether the account is active or suspended. |
/api/v1/reseller/transactions Wallet Ledger Transactions History
Retrieves paginated audit mutations for deposits, order purchases, compensations, and referral bonuses.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
| Parameter | Description |
|---|---|
limit integer • optional | Records per page (1 to 100).
Default: 20 |
offset integer • optional | Pagination offset.
Default: 0 |
tx_type string • optional | Filter by category: 'TOPUP', 'DEBIT_PURCHASE', 'REFUND_ORDER', 'BONUS'. |
| Attribute | Description |
|---|---|
total integer | Total ledger transactions matching criteria. |
transactions array | List of financial transaction records. |
transactions[].amount_usd float | Debit (negative) or credit (positive) amount in USD. |
transactions[].balance_after_usd float | Wallet balance after transaction execution. |
transactions[].reference_id string | Related order ID or deposit invoice ID. |
Category 02 · Unified Orders & Fulfillment Engine
4 Endpoints /api/v1/reseller/orders Unified Order Placement (Ready & BYOC)
Unified order creation endpoint for all catalog items. Instantly delivers credentials for pre-generated accounts, or dispatches asynchronous referral boosts across hundreds of background cloud queue workers with automatic default webhook fallback.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
Content-Type string • required | application/json |
| Field | Description |
|---|---|
product_type string • required | SKU identifier (e.g. 'ACCOUNT_1B', 'ACCOUNT_31B', 'ACCOUNT_60B', 'BYOC'). |
quantity integer • required | Quantity of accounts or referral boost tickets (1 to 500). |
custom_id string • optional | Client tracking ID for idempotency and polling (1-128 chars). |
invite_code string • optional | Target referral invite code (mandatory only for BYOC boost orders). |
webhook_url string • optional | Optional notification URL. If omitted, falls back to persistent default webhook. |
auto_retry boolean • optional | Automatically retry transient registration errors.
Default: true |
max_retries integer • optional | Maximum retries per ticket (0 to 5).
Default: 2 |
| Attribute | Description |
|---|---|
status string | 'completed' (instant ready account) or 'queued' (asynchronous BYOC). |
order_id string | Order reference or batch identifier. |
product_type string | Purchased SKU identifier. |
delivery_type string | 'SYNCHRONOUS_CREDENTIALS' or 'ASYNCHRONOUS_BOOST'. |
total_amount_usd float | Total USD deducted from reseller wallet. |
balance_remaining_usd float | Available wallet balance remaining after purchase. |
delivered_accounts array | null | Delivered account credentials for ready-made purchases. |
/api/v1/reseller/orders List Reseller Orders
Retrieves a paginated list of all orders submitted by the authenticated reseller with optional status and product filtering.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
| Parameter | Description |
|---|---|
limit integer • optional | Records per page (1 to 100).
Default: 20 |
offset integer • optional | Pagination offset.
Default: 0 |
status string • optional | Filter by status: 'completed', 'processing', 'queued', 'failed'. |
product_type string • optional | Filter by SKU (e.g. 'BYOC', 'ACCOUNT_1B'). |
/api/v1/reseller/orders/{order_id} Query Order Details by ID or Custom ID
Inspects real-time progress, delivered account credentials, completion telemetry, or auto-refund counts by order_id or custom_id with strict tenant BOLA guard.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
| Parameter | Description |
|---|---|
order_id string • required | System order_id, batch_id, or client custom_id. |
| Attribute | Description |
|---|---|
status string | 'queued', 'processing', 'completed', 'partial_success', or 'failed'. |
completed_count integer | Number of successfully claimed accounts. |
failed_count integer | Failed ticket attempts. |
refund_quantity integer | Tickets automatically refunded to wallet balance. |
circuit_breaker_tripped boolean | True if invite code quota exhaustion occurred. |
Category 03 · Persistent Webhooks & Diagnostic Pings
5 Endpoints /api/v1/reseller/webhook Check Persistent Default Webhook
Inspects the persistent default webhook notification URL currently configured on the authenticated reseller's account.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
/api/v1/reseller/webhook Set / Update Persistent Default Webhook
Registers or updates the persistent default webhook URL. Enforces strict anti-SSRF validation against private and loopback networks. Future orders automatically notify this URL.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
Content-Type string • required | application/json |
| Field | Description |
|---|---|
webhook_url string • required | Target public HTTPS URL to receive automated order completions. |
/api/v1/reseller/webhook Clear Registered Default Webhook
Removes the persistent default webhook URL from your reseller profile.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
/api/v1/reseller/webhooks/test Test Webhook Ping & HMAC Signature
Dispatches a synthetic signed test ping to verify endpoint connectivity, round-trip latency, and HMAC-SHA256 signature verification.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
Content-Type string • required | application/json |
| Field | Description |
|---|---|
webhook_url string • required | Public HTTPS URL to test. |
Client Webhook Notification Asynchronous Batch Completion Webhook Payload
Specification of the HTTP POST payload dispatched by Muse Runner to your webhook destination when an asynchronous referral boost batch finishes.
| Header | Description |
|---|---|
Content-Type string • required | application/json |
User-Agent string • required | MuseRunner-WebhookDispatcher/1.0 |
X-Muse-Event string • required | Event identifier ('batch.completed'). |
X-Muse-Batch-ID string • required | Unique UUID of the completed batch. |
X-Muse-Signature string • required | sha256=<hex> HMAC-SHA256 signature calculated over raw JSON payload. |
| Attribute | Description |
|---|---|
event string | 'batch.completed' event name. |
batch_id string | UUID of the completed batch. |
custom_id string | Your external order tracking ID. |
invite_code string | Target referral invite code. |
status string | 'completed', 'partial_success', or 'failed'. |
requested_quantity integer | Total referrals ordered. |
successful_count integer | Total successful registrations. |
failed_count integer | Failed ticket attempts. |
refund_quantity integer | Number of tickets automatically refunded to wallet balance. |
duration_seconds float | Total execution runtime in seconds. |
accounts array | List of created accounts and individual outcomes. |
Category 04 · Prepaid Deposits & Billing Settlement
2 Endpoints /api/v1/reseller/deposits Create Instant Crypto Deposit Invoice
Generates a direct non-redirect NOWPayments cryptocurrency deposit invoice with exact destination address and crypto token amount.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
Content-Type string • required | application/json |
| Field | Description |
|---|---|
amount_usd float • required | USD amount to credit to your reseller wallet balance (min: $5.00). |
pay_currency string • optional | Target crypto asset (e.g. 'usdttrc20', 'usdterc20').
Default: usdttrc20 |
/api/v1/reseller/deposits/{invoice_id} Query Crypto Invoice Confirmation Status
Inspects live on-chain deposit confirmation, payment address, and settlement status for cryptocurrency top-ups via NOWPayments.
| Header | Description |
|---|---|
Authorization string • required | Bearer muse_live_... secret key. |
| Parameter | Description |
|---|---|
invoice_id string • required | Unique invoice identifier generated during deposit creation. |