Create a stream
Streams (campaigns)
Create a stream
One-shot create: accounts + segments + schedule + delivery in one call
POST
Create a stream
Creates a new campaign (stream) in one call. Resolves new handles via ScrapeBadger (upserting tracked accounts + incrementing Stripe quantity), creates inline segments if provided, wires pairs through the segment-cap chokepoint.
Each pair specifies an account (by
OR
Body
| Field | Type | Description |
|---|---|---|
name | string (optional) | Campaign name. If omitted, the server derives one from the resolved pairs: "{segment} · @{handle}" for a single account, "{segment} · N accounts" for several. |
pairs | array | Up to 50 (account, segment) pairs |
syncTimes | array | ["HH:MM"] slots (15-min boundaries). Default: one hash-distributed slot. |
timezone | string | IANA timezone. Default: user’s default or "UTC". |
autoEnrichLinkedin | boolean | Auto-enrich LinkedIn URL on new leads. Default false. |
autoEnrichEmail | boolean | Auto-enrich email on new leads. Default false. |
emailMode | enum | "verified" or "any". Default "any". |
emailDigestOverride | enum | "after_every_sync", "daily", "weekly", "off" |
telegramOverride | boolean | Override team-default Telegram digest setting |
deliveryDestination | enum | "leads_only" or "leads_plus_webhook" |
webhookUrl | string | URL for webhook delivery (when deliveryDestination = "leads_plus_webhook") |
csvEmailRecipients | object | {to, cc?, format} for “email me a CSV after every run” |
accountId OR accountHandle) AND a segment (by segmentId OR inline segment):
Response
Error codes
| Code | HTTP | When |
|---|---|---|
handle_not_found | 404 | X handle didn’t resolve |
handle_protected | 422 | Handle is a private account |
handle_lookup_failed | 503 | X lookup service down |
free_account_limit | 403 | Free user adding 2nd account |
subscription_required | 403 | Paid user with lapsed sub |
stream_cap_exceeded | 400 | Tier cap of automated streams per account exceeded |
stream_multi_segment | 400 | Pairs span more than one segment (a stream targets exactly one segment) |
orphan_label | 400 | Inline segment had labels with no canonical match |