Launch a campaign
launch_campaignCreates the campaign and makes it live at once, charging its flat price from your balance (quote_campaign tells you the price). open_link returns shareUrl — the link to put in front of the people you want to hear from; it closes at responseCap or on expiry. targeted sends one invitation per address in cohortEmails from clearvoyance.ai (a sandbox account gets inviteLinks back instead and nothing is emailed). The flat price for the campaign's size is charged from your balance in full at launch, whatever it receives; it is not refunded for fewer answers. Refused with INSUFFICIENT_BALANCE (shortfallCents) if the balance does not cover the tier, or INVALID_CAMPAIGN (problems[]) if the quote would fail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | open_link: a share link anyone can answer, closing at responseCap — put it in your own post-purchase email. targeted: we email one invitation per address in cohortEmails. | |
| title | Yes | Shown to participants, e.g. 'How was your order?' | |
| apiKey | Yes | Your Clearvoyance API key (cv_live_… or cv_test_…), from create_account | |
| giftText | No | Shown to a participant after answering: a promo code, a thank-you, a link. Optional. | |
| questions | Yes | 1–10 questions participants answer by voice or text. No links or phone numbers. | |
| minPercent | No | targeted only: results unlock once this share of the list has answered. Floored at 50. | |
| senderName | No | Who is asking, as participants see it (your shop or product name). Required for open_link. | |
| description | Yes | What you want to learn. Steers the AI analysis; participants do not see it. | |
| responseCap | No | open_link only: 10, 50, 100 or 200 — the link closes at that many answers. Sets the tier: $4.99 / $17.99 / $29.99 / $49.99. | |
| cohortEmails | No | targeted only: the addresses to invite (10–200). Duplicates are folded. The list is discarded once every invitation is queued; only hashes are kept. | |
| expiresInDays | No | 1–42. Default 14 for open_link, 7 for targeted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |