Build bots, overlays, stream tools, and integrations with D1Arena data.
Authentication
All API requests require an API key passed in the X-API-Key / Authorization: Bearer header.
To create an API key, go to Developer Settings in your dashboard. You can have up to 5 keys.
429 Too Many Requests with a Retry-After header.
Base URL
All endpoints return JSON. Paginated endpoints include a meta object with current_page, last_page, and total.
Streams
| Parameter | Type | Description |
|---|---|---|
category_id | integer | Filter by game/category ID |
limit | integer | Results per page (default: 20) |
page | integer | Page number |
Categories
| Parameter | Type | Description |
|---|---|---|
search | string | Filter categories by name |
limit | integer | Results per page (default: 50) |
Users
Clips
| Parameter | Type | Description |
|---|---|---|
streamer_id | integer | Filter clips by streamer's user ID |
category_id | integer | Filter by game/category ID |
limit | integer | Results per page (default: 20) |
Tournaments
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status (e.g. open, in_progress, completed) |
league_id | integer | Filter by league ID |
limit | integer | Results per page (default: 20) |
ELO Rankings
| Parameter | Type | Description |
|---|---|---|
category_id | integer | Filter by game/category ID |
limit | integer | Number of results (default: 50) |
Leagues
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by league status |
category_id | integer | Filter by game/category ID |
limit | integer | Results per page (default: 20) |
Error Responses
All errors return a consistent JSON envelope. The error object always contains a machine-readable code and a human-readable message.
Status Codes
Error Codes Reference
| Code | HTTP Status | Description |
|---|---|---|
invalid_api_key | 401 | The API key is missing, malformed, or does not exist |
api_key_disabled | 403 | The API key has been revoked or disabled |
not_found | 404 | The requested resource could not be found |
validation_error | 422 | One or more request parameters are invalid |
rate_limited | 429 | Request rate limit exceeded for this API key |
server_error | 500 | Internal server error — please retry or contact support |
Rate Limits
API requests are rate-limited per API key. When you exceed the limit, requests return 429 Too Many Requests with a Retry-After header.
Limits by Tier
| Tier | Requests / Minute (Default) | Max Keys |
|---|---|---|
| Starter (Free) | 60 | 5 |
| PRO | 60 | 5 |
| Ultimate | 60 | 5 |
| Partner | 60 | 5 |
Rate Limit Headers
API requests are rate-limited per API key. When you exceed the limit, requests return 429 Too Many Requests with a Retry-After header.
| Header | Description |
|---|---|
Retry-After | Seconds to wait before retrying (only present on 429 responses) |
Best Practices
- Cache responses locally — stream and tournament data doesn't change every second.
- Subscribe to webhooks for real-time events instead of polling endpoints.
- Batch requests where possible — use filter parameters to get exactly what you need in fewer calls.
Webhooks (EventSub)
Subscribe to real-time push notifications instead of polling. When an event occurs, D1Arena sends an HTTP POST to your callback URL with a JSON payload signed with HMAC-SHA256.
Setup
Create webhook subscriptions in Developer Settings. Each subscription requires:
- Callback URL — A publicly accessible HTTPS endpoint on your server.
- Events — One or more event types to subscribe to.
You'll receive a whsec_ signing secret upon creation. Store it securely — it's shown only once.
Payload Format
Every webhook delivery sends a JSON body with this structure:
Headers
Each delivery includes the following headers for routing and verification:
| Header | Description |
|---|---|
Content-Type | application/json |
X-D1Arena-Event | Event type (e.g. stream.online) |
X-D1Arena-Signature | HMAC-SHA256 hex digest of the raw request body |
X-D1Arena-Signature-Version | Signing-key format: v2 for current subscriptions or v1-hashed-secret for legacy subscriptions |
X-D1Arena-Delivery-Id | Unique delivery UUID — use for deduplication |
X-D1Arena-Timestamp | Unix timestamp of when the event was sent |
Verifying Signatures
Always verify the X-D1Arena-Signature header before processing a webhook. The signature is computed as HMAC-SHA256(raw_body, webhook_secret).
For v2 deliveries, use the whsec_ secret shown when the subscription was created. For a pre-upgrade v1-hashed-secret delivery, first compute SHA256(whsec_secret) from that original secret and use the resulting lowercase hex digest as the HMAC key. Recreate the subscription when practical to move to v2.
Available Events
| Event | Description |
|---|---|
| stream.online | A streamer went live |
| stream.offline | A streamer went offline |
| channel.follow | A user followed a channel |
| channel.subscribe | New supporter subscription on a channel |
| channel.tip | A tip was sent to a streamer |
| tournament.started | A tournament match play has begun |
| tournament.ended | A tournament has concluded |
| tournament.match.completed | A match result was recorded |
| clip.created | A new clip was created from a live stream |
| overdrive.started | D1 Frenzy started on a channel |
| overdrive.level_up | D1 Frenzy advanced to the next level |
| overdrive.ended | D1 Frenzy completed or expired |
Event Payload Examples
stream.online
stream.offline
channel.follow
channel.tip
tournament.match.completed
clip.created
Delivery & Retry Policy
| Attempt | Delay | Notes |
|---|---|---|
| 1st (initial) | Immediate | Sent within seconds of the event |
| 2nd (retry) | 30 seconds | If first attempt fails or times out |
| 3rd (retry) | 2 minutes | Exponential backoff |
| 4th (final) | 10 minutes | Last attempt before marking as failed |
2xx status within 10 seconds. Non-2xx responses or timeouts trigger a retry. After 10 consecutive failures, the subscription is automatically disabled. You'll receive an email notification and can re-enable it in Developer Settings.
Best Practices
- Always verify signatures before processing payloads to prevent spoofed events.
- Use the Delivery-Id for deduplication — retries send the same ID, so store processed IDs to avoid double-processing.
- Respond quickly, process asynchronously — return
200 OKimmediately and handle business logic in a background job. - Use HTTPS endpoints only — webhook URLs must use TLS. HTTP callbacks are rejected.
- Handle unknown events gracefully — new event types may be added. Return
200for unrecognized events rather than erroring.
D1 Frenzy
D1 Frenzy is triggered by rapid tips and subscriptions while a streamer is live. It progresses through 5 levels with increasing targets.
GET /api/overdrive/{streamerId}
Get the active D1 Frenzy for a streamer. Returns {"active": false} if none.
Level Targets
| Level | Points |
|---|---|
| 1 | 100 |
| 2 | 250 |
| 3 | 500 |
| 4 | 1,000 |
| 5 | 2,000 |
D1 Frenzy — Points: Tip $1 → 100; Subscription 500 × Tier. Duration: 5 Minutes; Cooldown: 30 Minutes.
Extension SDK
Build custom panel and overlay extensions that streamers can install on their channel pages. Extensions run in sandboxed iframes and communicate with the host page via postMessage.
Getting Started
- Create an API key in Developer Settings.
- Build your extension as a standalone HTML page hosted on your domain (HTTPS required).
- Submit it for review in the My Extensions section.
- Once approved, streamers can install it from the Extension Marketplace.
Extension Types
| Type | Location | Behavior |
|---|---|---|
panel | Below the stream player | Visible when stream is live. Full-width card, 300px default height. |
overlay | Over the video player | Visible when live. Position/size controlled by the streamer via the overlay positioning tool. |
postMessage API
Your extension receives context data automatically when it loads. Implement these events:
Use the exact D1Arena parent origin for every message. The official SDK derives and validates this origin from the embedding page automatically.
Because extension iframes intentionally use an opaque sandbox origin, the D1Arena host authenticates the exact registered iframe window. Extension code must still authenticate the parent window and exact D1Arena origin before accepting context.
1. Signal readiness
2. Receive context
3. Send actions (optional)
Permission Scopes
Declare what data your extension needs. Reviewers verify your code matches your declared permissions.
| Scope | Grants Access To |
|---|---|
read:stream | Stream status, title, category |
read:viewers | Viewer count and list |
read:chat | Chat messages (via Pusher channel) |
read:clips | Channel clips via /api/clips/{slug} |
read:tournaments | Active match info via /api/active-match/{id} |
read:channel | Channel profile, followers, schedule |
Security Requirements
sandbox="allow-scripts". Your extension cannot access cookies, localStorage, or make authenticated requests to d1arena.com.
- Public HTTPS required — Your iframe URL must use TLS and resolve only to public network addresses.
- Human-readable source — No obfuscated or minified-only JavaScript. Reviewers must be able to read your code.
- No external script loading unless declared in your submission. CDN libraries (jQuery, Chart.js, etc.) are fine.
- No data exfiltration — Extensions must not send viewer data to third-party analytics or tracking services.
- Content policy — No ads, NSFW content, cryptocurrency mining, or malicious behavior.
Review Process
| Status | Meaning |
|---|---|
| pending | Submitted, awaiting admin review (typically 1-3 business days). |
| approved | Approved and visible in the Extension Marketplace. |
| rejected | Rejected with a reason. Fix issues and resubmit. |
| suspended | Temporarily removed for policy violation. Contact support. |
Version Updates
To update an approved extension, delete the current version and submit a new one with an incremented version number. The new version goes through review again.
Changelog
Track API changes and new features. We follow semantic versioning and announce breaking changes at least 30 days in advance.
- Initial public API release with API key authentication.
- Streams: List live streams, get streamer details by slug.
- Categories: Search and list all game categories.
- Users: Public profiles with competitive stats, ELO rating, and medal counts.
- Clips: Browse and retrieve clip details with streamer/creator info.
- Tournaments: List, filter by status/league, get participant counts.
- ELO Leaderboard: Global and per-category ranked leaderboards.
- Leagues: List leagues with standings and point breakdowns.
- D1 Frenzy: Real-time Frenzy status for any streamer.
- Webhooks (EventSub): 12 event types including stream, channel, tournament, clip, and Frenzy events.
- Rate Limits
Need Help?
Questions about the API? Contact us.