Developer Guide
Platform Guide

Platform Integration Guide

Integrate the DanSUGC B-Roll API into your platform with per-customer API keys. Each customer gets their own isolated purchase history and access controls.

Why Customer Keys?

If you're building a platform that serves multiple customers (e.g., a SaaS tool, a marketplace, a white-label product), you need purchase isolation. Without it, a single API key means one purchase serves everyone — and there's no way to track or bill per customer.

Purchase Isolation
Each customer key has its own purchase history. Two customers can independently purchase the same video without deduplication conflicts.
Usage Tracking
Monitor API requests per customer via total_requests and last_used_at. Bill your customers based on their actual usage.
Easy Revocation
Revoke a single customer's access instantly without affecting any other customer. Revoking a root key cascades to all its customer keys.

Key Hierarchy

Architecture
Root Key (keys:manage, broll:read, broll:purchase, broll:billing)
├── Customer Key "Acme Corp"  (broll:read, broll:purchase, broll:billing)
├── Customer Key "Beta Inc"   (broll:read, broll:purchase, broll:billing)
└── Customer Key "Gamma LLC"  (broll:read, broll:purchase, broll:billing)
Root Keys

Created from your dashboard.

Include all scopes including keys:manage.

Can create, list, and revoke customer keys.

See all purchases across all customer keys.

Customer Keys

Created via API or dashboard under a root key.

Only get broll:read, broll:purchase, broll:billing.

Cannot create or manage other keys.

Only see their own purchases.

Quick Start

1. Create a root key
Go to Dashboard → API Keys and create a key. It automatically gets the keys:manage scope.
2. Create customer keys
Use POST /api/v1/keys with your root key to create a key for each customer. Store the returned key securely.
3. Use customer keys
Pass each customer's key in their API calls. Purchases are automatically tracked per key. Credits are deducted from your shared pool.

Key Management API

MethodEndpointDescription
POST
/api/v1/keysCreate a customer key
GET
/api/v1/keysList all customer keys
DELETE
/api/v1/keys?id=:key_idRevoke a customer key
Create a customer key
curl -X POST https://dansugc.com/api/v1/keys \
  -H "Authorization: Bearer dsk_your_root_key" \
  -H "Content-Type: application/json" \
  -d '{"customer_label": "Acme Corp"}'

# Response:
# {
#   "success": true,
#   "api_key": "dsk_abc123...",
#   "details": {
#     "id": "uuid",
#     "customer_label": "Acme Corp",
#     ...
#   }
# }
List customer keys
curl https://dansugc.com/api/v1/keys \
  -H "Authorization: Bearer dsk_your_root_key"
Revoke a customer key
curl -X DELETE "https://dansugc.com/api/v1/keys?id=customer-key-uuid" \
  -H "Authorization: Bearer dsk_your_root_key"

Purchase Isolation

Purchases are deduplicated per API key, not per account. This means:

ActionResult
Customer A purchases Video X
Success
— charged, download URL returned
Customer B purchases Video X
Success
— separate key = separate purchase
Customer A purchases Video X again
Deduplicated
— returns existing URL, no charge
Customer A lists purchasesOnly sees their own purchases
Root key lists purchasesSees all purchases across all customers. Use ?api_key_id= to filter.
Shared billing pool: All customer keys draw credits from your account's balance. You top up once, and all customer purchases deduct from the same pool.

Migration Guide

If you currently use a single API key with customer_email to track customers, here's how to migrate:

1

Create a root API key

Go to Dashboard → API Keys and create a new key. It will include keys:manage by default.

2

Create customer keys

For each customer in your system, call POST /api/v1/keys with their label. Store the returned key in your database.

3

Swap keys in API calls

Instead of using one shared key with customer_email, use each customer's dedicated key. Remove customer_email from request bodies.

4

Existing purchases

Purchases made with the old key remain accessible via your root key. New purchases will be tracked per customer key.

Anti-Redistribution Policy

No Redistribution. You may not redistribute, resell, sublicense, or share downloaded B-roll video files with any third party outside of the end-user for whom the video was purchased. Each purchase grants a single-user license.

Per-Customer Keys Required. Platforms serving multiple end-users MUST use per-customer API keys. Using a single key to purchase once and redistribute to multiple end-users is a violation of these terms.

Penalty. Violation of the anti-redistribution policy will result in a penalty of $50,000 USD per incident, immediate API access revocation, and potential legal action.

Audit Rights. DanSUGC reserves the right to audit API usage logs to detect redistribution patterns.

Questions about platform integration? Contact us. For general API docs, see the Developer Guide.