Campaigns & Drafts

Preview Email

Before creating a campaign, use preview_email with a sample lead from preview_leads to see what the first email will look like.

{
  "jsonrpc":"2.0","id":3,"method":"tools/call",
  "params":{"name":"preview_email","arguments":{
    "product_id": 5806253,
    "persona_id": 3678920,
    "sample_lead":{
      "name":"Jane Smith",
      "title":"VP of Sales",
      "company":"Acme Corp"
    },
    "outreach":{
      "language":"English",
      "framework":"classic"
    }
  }}
}

Returns: subject line and generated HTML email body.

Create Campaign (Final)

Final campaigns require product_id and persona_id. If workflow is omitted, RocketSDR uses a 4-step email workflow (0, 3, 4, 5 days).

{
  "jsonrpc":"2.0","id":4,"method":"tools/call",
  "params":{"name":"create_campaign","arguments":{
    "name":"VP Sales - SF",
    "product_id": 5806253,
    "persona_id": 3678920,
    "locations":["San Francisco"],
    "job_titles":["Vice President of Sales"],
    "functions":["Sales"],
    "seniority":["Vice President"],
    "sender_ids":["EMAIL_ACCOUNT_ID"],
    "max_leads": 2500,
    "autopilot": false,
    "outreach":{
      "language":"English",
      "framework":"classic"
    },
    "qualifiers":[
      {"type":"company","text":"B2B SaaS"},
      {"type":"lead","text":"VP+ in Sales or RevOps"}
    ]
  }}
}

Signatures

Two modes — pick one:

Campaign-Level Signature

Set structured fields under outreach.signature. Applied uniformly to all senders.

"outreach":{
  "framework":"classic",
  "signature":{
    "fullName":"John Smith",
    "title":"CEO",
    "organization":"Acme Corp",
    "website":"https://acme.com"
  }
}

Per-Sender Signatures

Pass sender_signatures keyed by sender ID or email. Automatically enables per-sender mode. Every resolved sender must have an entry — partial config is rejected.

"sender_signatures":{
  "SENDER_UUID_1":"Best,\nJohn Smith\nCEO, Acme Corp",
  "jane@acme.com":"Best,\nJane Doe\nVP Sales, Acme Corp"
}

CSV Campaigns

CSV campaigns are intended for small, programmatically generated lists (scripts, integrations). You can either pass raw CSV in csv_content or use the stateless upload flow:get_csv_upload_url then pass returned gcsUrl as csv_url. Pre-upload accepts only .csv and enforces a maximum size of 2 MB. For large CRM exports or bulk imports, use the web UI instead.

{
  "jsonrpc":"2.0","id":3,"method":"tools/call",
  "params":{"name":"get_csv_upload_url","arguments":{"filename":"leads.csv"}}
}

Upload your CSV to the returned uploadUrl with multipart HTTP POST using all returnedformFields, then create/finalize the campaign using csv_url:

{
  "jsonrpc":"2.0","id":4,"method":"tools/call",
  "params":{"name":"create_campaign","arguments":{
    "name":"CSV Outreach Batch 1",
    "type":"csv",
    "product_id": 5806253,
    "persona_id": 3678920,
    "csv_url":"https://storage.googleapis.com/YOUR_BUCKET/campaigns/ACCOUNT_ID/UUID-leads.csv"
  }}
}

Workflow Step Instructions

Each step can carry its own instructions via emailConfig.content (or linkedinConfig.content for LinkedIn steps).

"workflow":[
  {"type":"email","step":1,"waitDays":0,"emailConfig":{"mode":"instruction","content":"Intro email instructions."}},
  {"type":"email","step":2,"waitDays":3,"emailConfig":{"mode":"instruction","content":"Follow-up 1 instructions."}},
  {"type":"email","step":3,"waitDays":4,"emailConfig":{"mode":"instruction","content":"Follow-up 2 instructions."}},
  {"type":"email","step":4,"waitDays":5,"emailConfig":{"mode":"instruction","content":"Final follow-up instructions."}}
]

Draft Campaigns

Drafts are useful when you want to save partial state and finalize later after testing targeting, choosing assets, or confirming workflow.

Create Draft

{
  "jsonrpc":"2.0","id":5,"method":"tools/call",
  "params":{"name":"create_campaign_draft","arguments":{
    "name":"Draft: VP Sales SF",
    "locations":["San Francisco"],
    "job_titles":["Vice President of Sales"]
  }}
}

Finalize Draft

Finalizing a draft performs full validation (including required product_id/persona_id and strict targeting resolution).

{
  "jsonrpc":"2.0","id":6,"method":"tools/call",
  "params":{"name":"finalize_campaign_draft","arguments":{
    "campaign_id":"DRAFT_ID",
    "name":"VP Sales SF (Final)",
    "product_id": 5806253,
    "persona_id": 3678920,
    "locations":["San Francisco"],
    "job_titles":["Vice President of Sales"],
    "sender_ids":["EMAIL_ACCOUNT_ID"]
  }}
}

Products & Personas

Products describe what you sell. Personas define writing style and tone.

List Products

{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"list_products","arguments":{}}}

Create Product

{
  "jsonrpc":"2.0","id":8,"method":"tools/call",
  "params":{"name":"create_product","arguments":{
    "name":"My Product",
    "url":"https://example.com",
    "description":"One sentence positioning.",
    "features":[{"painPoint":"Manual outreach","solution":"Automated targeting and personalization"}],
    "proof_points":["Trusted by X teams"],
    "coaching_points":["Keep outreach short and direct"],
    "insights":["Best for B2B SaaS teams"],
    "documentation_urls":["https://example.com/docs"]
  }}
}

List Personas

{"jsonrpc":"2.0","id":9,"method":"tools/call","params":{"name":"list_personas","arguments":{}}}

Create Persona

{
  "jsonrpc":"2.0","id":10,"method":"tools/call",
  "params":{"name":"create_persona","arguments":{
    "name":"Founder - Direct",
    "description":"Direct, concise founder voice.",
    "traits":[{"trait":"Concise","example":"Two short sentences","context":"Cold outreach"}],
    "voice_tone":["direct","confident","friendly"],
    "insights":["Avoid buzzwords"]
  }}
}

Senders

Use list_senders to discover email account IDs and LinkedIn usernames.

{"jsonrpc":"2.0","id":11,"method":"tools/call","params":{"name":"list_senders","arguments":{}}}
  • sender_ids → email account IDs
  • sender_emails → resolves to email or LinkedIn senders
  • sender_usernames → LinkedIn login emails
  • sender_signatures → per-sender signature strings (keyed by sender ID or email)