Features

Browse automation types, get performance stats, and prefill campaign inputs.

List Features

GET /v1/features
GET /v1/features?implemented=true
X-API-Key: dist_YOUR_KEY

Returns all available automation features. Filter with implemented=true to see only features with active workflows.

Get Feature

GET /v1/features/:slug
X-API-Key: dist_YOUR_KEY

Returns full feature details including inputs, outputs, charts, and entities.

Prefill Inputs

POST /v1/features/:dynastySlug/prefill?format=text
Content-Type: application/json
X-API-Key: dist_YOUR_KEY

{
  "brandIds": ["brand_abc123"]
}

Pre-fills a feature's input fields using brand data. Returns suggested values for each input based on the brand's website analysis.

Feature Stats

GET /v1/features/:dynastySlug/stats
GET /v1/features/:dynastySlug/stats?groupBy=brand
GET /v1/features/:dynastySlug/stats?groupBy=campaign&brandId=brand_abc123
X-API-Key: dist_YOUR_KEY

Returns performance statistics for a feature — total cost, completed runs, active campaigns, and custom stats. Use groupBy to break down by brand, campaign, or workflow.

Global Stats

GET /v1/features/stats
GET /v1/features/stats?groupBy=feature
X-API-Key: dist_YOUR_KEY

Aggregate performance statistics across all features.

Stats Registry

GET /v1/features/stats/registry
X-API-Key: dist_YOUR_KEY

Returns the stats key registry — maps stat keys to their type (count, rate, currency) and human-readable label.

TypeScript Client

const { features } = await client.listFeatures({ implemented: true });
const { feature } = await client.getFeature("sales-email-cold-outreach");
const prefilled = await client.prefillFeatureInputs("sales-email-cold-outreach", ["brand_abc"]);
const stats = await client.getFeatureStats("sales-email-cold-outreach", { groupBy: "brand" });