API Reference
All Specter API endpoints with request/response examples.
Base URL
https://specter.draftlabs.orgAuthentication
Signal ingestion endpoints use API key authentication. Pass your product's API key in the x-api-key header or as a key query parameter.
| Method | How to Pass | Endpoints |
|---|---|---|
| Header | x-api-key: spk_abc123... | /api/signals, /api/proposals |
| Query param | ?key=spk_abc123... | /api/ingest |
Find your API key in Settings → Products after creating a product. Keys are prefixed with spk_.
/api/signalsSend one or more user signals. Supports single objects and batch arrays.
Headers
x-api-keyrequired | string | Product API key |
Content-Typerequired | string | application/json |
Body (single signal)
typerequired | string | Signal type (1–100 chars). E.g. thumbs_up, error |
payload | object | Arbitrary JSON data about the event |
context_id | uuid | Route signal to a specific context |
Example
curl -X POST https://specter.draftlabs.org/api/signals \
-H "Content-Type: application/json" \
-H "x-api-key: spk_your_key_here" \
-d '[
{"type": "swap_completed", "payload": {"token": "ETH", "amount": 1.5}},
{"type": "thumbs_up", "payload": {"feature": "chart"}}
]'{ "received": 2 }Error Responses
401Missing or invalid API key400Invalid JSON or missing signal type429Monthly signal limit exceeded/api/ingestFlexible signal ingestion for automation tools (Zapier, Make.com, n8n). API key via query param or header.
Body
type | event | event_typerequired | string | Signal type (any of these field names accepted) |
payload | data | properties | object | Event data (any of these field names accepted) |
context_id | uuid | Route to a specific context |
curl -X POST "https://specter.draftlabs.org/api/ingest?key=spk_your_key" \
-H "Content-Type: application/json" \
-d '{"event": "purchase", "data": {"amount": 49.99}}'{ "received": 1 }/api/proposalsRetrieve proposals for your product. Supports session auth (dashboard) and API key auth.
Query Parameters
status | string | Filter by status: pending, approved, rejected, deferred |
limit | number | Max results (default: 50) |
curl https://specter.draftlabs.org/api/proposals?status=pending \
-H "x-api-key: spk_your_key_here"[
{
"id": "uuid",
"product_id": "uuid",
"context_id": "uuid",
"status": "pending",
"priority_score": 78,
"diagnosis": "High cart abandonment rate detected...",
"current_state": "Context: checkout-flow\nPositive: 42.5%...",
"proposed_change": "Add progress indicator to checkout steps...",
"evidence_summary": "68% of signals are cart_abandoned...",
"predicted_impact": "Expected 15-20% reduction in abandonment...",
"signal_count": 156,
"created_at": "2026-03-05T12:00:00Z"
}
]/api/productsCreate a new product and receive an API key. Requires session authentication. Enforces plan-based product limits.
Body
namerequired | string | Product name (1–100 chars) |
{
"id": "uuid",
"name": "My DeFi App",
"api_key": "spk_a1b2c3d4e5f6..."
}403Product limit reached for your planContexts API
CRUD operations for contexts. All require session authentication.
/api/contextCreate a new context for a product.
product_idrequired | uuid | Product to attach context to |
namerequired | string | Context label (e.g. checkout-flow) |
contentrequired | string | Description of what this product area does |
positive_signals | string[] | Signal types that indicate success |
negative_signals | string[] | Signal types that indicate failure |
/api/contextList all contexts for the authenticated user.
/api/contextUpdate an existing context. Pass id plus any fields to update.
/api/context?id=uuidPermanently remove a context.
Rate Limits
Signal ingestion is rate-limited by your subscription plan:
| Plan | Signals/mo | Proposals/mo | Products |
|---|---|---|---|
| Free | 500 | 3 | 1 |
| Builder ($29) | 5,000 | 10 | 1 |
| Growth ($99) | 50,000 | Unlimited | 5 |
| Scale ($299) | 500,000 | Unlimited | Unlimited |