Products API

Programmatically manage your digital products, versions, and download tokens using the Continuata REST API.

List Products

Retrieve all products in your organization with pagination support.

GET /api/products

Query Parameters

  • status - Filter by status (draft, published, archived)
  • limit - Number of results (default: 50, max: 100)
  • offset - Pagination offset
  • search - Search product names and descriptions

Response

{
  "success": true,
  "data": {
    "products": [
      {
        "id": "epic-drums-v1",
        "name": "Epic Drum Kit Vol. 1",
        "slug": "epic-drums-v1",
        "status": "published",
        "activeVersion": {
          "id": "version_abc123",
          "version": "1.0.0",
          "size": 2147483648,
          "fileCount": 128,
          "status": "ready"
        },
        "createdAt": "2025-01-01T00:00:00Z",
        "updatedAt": "2025-01-15T00:00:00Z"
      }
    ],
    "pagination": {
      "total": 25,
      "limit": 50,
      "offset": 0,
      "hasMore": false
    }
  }
}

Create Product

Create a new product in your organization.

POST /api/products

Request Body

{
  "name": "Epic Drum Kit Vol. 2",
  "slug": "epic-drums-v2",
  "description": "High-energy drum samples for electronic music",
  "metadata": {
    "category": "drums",
    "tags": ["electronic", "edm", "trap"],
    "requirements": ["DAW with WAV support"]
  }
}

Response

{
  "success": true,
  "data": {
    "product": {
      "id": "epic-drums-v2",
      "name": "Epic Drum Kit Vol. 2",
      "slug": "epic-drums-v2",
      "status": "draft",
      "orgId": "audio-company",
      "createdAt": "2025-01-01T00:00:00Z"
    }
  }
}

Generate Download Token

Create secure download tokens for customers who have purchased your products.

POST /api/products/{productId}/tokens

Request Body

{
  "customerEmail": "customer@example.com",
  "expiresAt": "2025-02-01T00:00:00Z",
  "maxDownloads": null,
  "metadata": {
    "orderId": "order_abc123",
    "customerName": "John Doe",
    "licenseType": "standard"
  }
}

Field Descriptions

  • customerEmail - Customer's email address (optional, for analytics)
  • expiresAt - Token expiration (optional, defaults to 30 days)
  • maxDownloads - Download limit (optional, null = unlimited)
  • metadata - Additional data for tracking and analytics

Response

{
  "success": true,
  "data": {
    "token": {
      "id": "token_xyz789",
      "token": "ct_download_abc123def456",
      "downloadUrl": "https://continuata.io/download?token=ct_download_abc123def456",
      "expiresAt": "2025-02-01T00:00:00Z",
      "maxDownloads": null,
      "usedCount": 0,
      "product": {
        "id": "epic-drums-v1",
        "name": "Epic Drum Kit Vol. 1",
        "version": "1.0.0"
      }
    }
  }
}

Upload New Version

Upload a new version of an existing product using multipart upload.

POST /api/products/{productId}/versions

Request Body

{
  "version": "1.1.0",
  "changelog": "Added 5 new kick samples, improved snare processing",
  "files": [
    {
      "path": "samples/kick_01.wav",
      "size": 8388608,
      "sha256": "a1b2c3d4e5f6789..."
    },
    {
      "path": "samples/kick_03.wav",
      "size": 7654321,
      "sha256": "x9y8z7w6v5u4321..."
    }
  ]
}

File Upload Process

After creating the version, you'll need to upload the actual file data using the multipart upload endpoints. See Uploading Products for detailed instructions.

SDK Examples

JavaScript/Node.js

import { ContinuataClient } from '@continuata/sdk';

const client = new ContinuataClient({
  apiKey: process.env.CONTINUATA_API_KEY,
  orgId: 'your-org-id'
});

// Generate download token
const token = await client.products.createToken('epic-drums-v1', {
  customerEmail: 'customer@example.com',
  expiresAt: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
  metadata: {
    orderId: 'order_123',
    source: 'website'
  }
});

console.log('Download URL:', token.downloadUrl);

Python

import continuata
from datetime import datetime, timedelta

client = continuata.Client(
    api_key=os.environ['CONTINUATA_API_KEY'],
    org_id='your-org-id'
)

# Generate download token
token = client.products.create_token(
    product_id='epic-drums-v1',
    customer_email='customer@example.com',
    expires_at=datetime.now() + timedelta(days=30),
    metadata={
        'order_id': 'order_123',
        'source': 'python_app'
    }
)

print(f"Download URL: {token.download_url}")

Complete API Reference

See the full Downloads API andWebhooks documentation for complete integration options.