Custom API Integration
Build custom integrations with any platform using Continuata's REST API for complete control over digital product delivery.
Common Integration Patterns
Order Processing
Create purchases when payments are confirmed.
- Payment webhook → purchase creation
- Download link minted automatically
- Email delivery integration
Customer Portal
Build download libraries for returning customers.
- Purchase history API
- Download link generation
- Usage analytics display
Basic Workflow
Here's a typical integration workflow for generating download tokens after a purchase:
Customer Completes Purchase
Your payment processor (Stripe, PayPal, etc.) confirms the transaction.
Create the Purchase
POST to /api/purchases — Continuata creates the customer, the purchase record, and the download link in one step.
Deliver to Customer
Set sendEmail=true and Continuata emails the link for you; customers can also always self-serve at continuata.io/my.
API Endpoints
Create Purchase (mints the download link)
Form-based endpoint (the same one the dashboard uses). Send multipart/form-data or URL-encoded fields — not JSON. The response is an HTML fragment; treat any 2xx as success.
POST /api/purchases
customerId=new # or an existing customer id
newCustomer.name=Jane Doe
newCustomer.email=jane@example.com
productId=3f6c9a1e-8d2b-4c7a-9e1f-2a5b8c3d7e90 # Continuata product ID (UUID)
amount=49.99 # whole currency units
currency=USD
paymentMethod=custom
sendEmail=true # Continuata emails the download link
Notes: returns 422 if a customer with that email already exists — look the customer up first for repeat buyers. A previously documented POST /api/generate-download-url endpoint does not work with the current storage pipeline; do not use it. Download links stay valid for 48 hours and refresh automatically when opened.
List Org Purchases
Returns every purchase recorded against your organisation. There is currently no customerEmail filter — filter client-side, or point the customer at continuata.io/my for self-service.
GET /api/purchases
Download Sessions Report (CSV)
GET /api/reports/downloads?from=2026-04-01&to=2026-04-30
Admin-only. Returns CSV. See Downloads API for full parameters.
Example: Node.js Integration
Minimal example creating a purchase after a payment confirmation:
const express = require('express');
const app = express();
app.post('/payment-confirmed', express.json(), async (req, res) => {
const { email, name, productId, amount, currency } = req.body;
const body = new FormData();
body.set('customerId', 'new');
body.set('newCustomer.name', name);
body.set('newCustomer.email', email);
body.set('productId', productId); // Continuata product ID (UUID)
body.set('amount', String(amount)); // whole currency units
body.set('currency', currency || 'USD');
body.set('paymentMethod', 'custom');
body.set('sendEmail', 'true');
const r = await fetch('https://continuata.io/api/purchases', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.CONTINUATA_API_KEY}` },
body,
});
if (r.status === 401) return res.status(500).send('Invalid API key — refresh in Settings → API Key');
if (r.status === 403) return res.status(500).send('Key has no organization, or subscription expired');
if (r.status === 422) return res.status(500).send('Customer email already exists — look the customer up first');
if (!r.ok) return res.status(500).send(`Continuata API ${r.status}`);
res.send('OK — download link emailed to customer');
});
app.listen(3000);
Error Handling
JSON endpoints return an error field with the status code. The form-based purchase endpoint responds with HTML fragments — key on the HTTP status: 401 invalid key, 403 no organization or expired subscription, 422 duplicate customer email, 400 missing fields. The admin-only reports endpoint returns plain-text errors (e.g. Admin required).
Need Help? Check the Authentication docs for API setup, or contact support@continuata.com for integration assistance.