Skip to main content

Types Reference

Complete request and response schemas for the Orchestraight API.

Request & Response Schemas

Both /v1/generate and /v1/coach use a discriminated union on content_type. Each type has its own request context and response content shape — expand any type below to see the full, copy-pasteable interfaces.

Sales & Business Development

cold_emailCold Email

Request

TypeScript
interface ColdEmailRequest {
  content_type: "cold_email";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ColdEmailResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
follow_up_emailFollow-up Email

Request

TypeScript
interface FollowUpEmailRequest {
  content_type: "follow_up_email";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints: string[];
      specific_trigger?: string;
    };
    objective: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface FollowUpEmailResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
landing_pageLanding Page

Request

TypeScript
interface LandingPageRequest {
  content_type: "landing_page";
  context: {
    sender: {
      company: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    additional_context?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  output_preferences?: {
    tone_intensity?: "passive" | "moderate" | "aggressive";
  };
  requested_at?: string;
  external_id?: string;
}

ResponseLanding Page

TypeScript
interface LandingPageResponse {
  external_id?: string;
  content: {
    headline: string;
    subheadline?: string;
    body: string;
    cta_text: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
objection_handlerObjection Handler

Request

TypeScript
interface ObjectionHandlerRequest {
  content_type: "objection_handler";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      company?: string;
      objection: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseScript

TypeScript
interface ObjectionHandlerResponse {
  external_id?: string;
  content: {
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
sales_scriptSales Script (coming soon)

Request

TypeScript
interface SalesScriptRequest {
  content_type: "sales_script";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseScript

TypeScript
interface SalesScriptResponse {
  external_id?: string;
  content: {
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
proposal_coverProposal Cover Letter

Request

TypeScript
interface ProposalCoverRequest {
  content_type: "proposal_cover";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    proposal_summary: string;
    key_deliverables?: string[];
    proposed_timeline?: string;
    investment_range?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ProposalCoverResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
meeting_confirmationMeeting Confirmation

Request

TypeScript
interface MeetingConfirmationRequest {
  content_type: "meeting_confirmation";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    meeting_details: {
      date: string;
      time: string;
      duration?: string;
      location_or_link?: string;
      agenda_items?: string[];
    };
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface MeetingConfirmationResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
partnership_outreachPartnership Outreach

Request

TypeScript
interface PartnershipOutreachRequest {
  content_type: "partnership_outreach";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    partnership_type: "referral" | "reseller" | "integration" | "co_marketing" | "strategic_alliance" | "other";
    mutual_benefits?: string[];
    shared_audience?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PartnershipOutreachResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
investor_outreachInvestor Outreach

Request

TypeScript
interface InvestorOutreachRequest {
  content_type: "investor_outreach";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect: {
      name?: string;
      firm?: string;
      role?: string;
      investment_focus?: string[];
      portfolio_companies?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    funding_details: {
      stage: "pre_seed" | "seed" | "series_a" | "series_b" | "series_c" | "growth" | "other";
      amount_seeking?: string;
      use_of_funds?: string;
    };
    traction_highlights?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface InvestorOutreachResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}

Collections & Accounts Receivable

payment_reminderPayment Reminder

Request

TypeScript
interface PaymentReminderRequest {
  content_type: "payment_reminder";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    account: {
      customer_name: string;
      customer_company?: string;
      account_number?: string;
      invoice_number?: string;
      amount_due: string;
      original_due_date: string;
      days_overdue?: number;
      payment_history?: "good" | "mixed" | "poor" | "first_issue";
      relationship_value?: "high" | "medium" | "low";
    };
    objective: string;
    payment_options?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PaymentReminderResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
past_due_noticePast Due Notice

Request

TypeScript
interface PastDueNoticeRequest {
  content_type: "past_due_notice";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    account: {
      customer_name: string;
      customer_company?: string;
      account_number?: string;
      invoice_number?: string;
      amount_due: string;
      original_due_date: string;
      days_overdue: number;
      payment_history?: "good" | "mixed" | "poor" | "first_issue";
      relationship_value?: "high" | "medium" | "low";
      late_fees_applied?: string;
      service_impact?: string;
    };
    objective: string;
    payment_options?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PastDueNoticeResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
collections_scriptCollections Script (coming soon)

Request

TypeScript
interface CollectionsScriptRequest {
  content_type: "collections_script";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    account: {
      customer_name: string;
      customer_company?: string;
      account_number?: string;
      invoice_number?: string;
      amount_due: string;
      original_due_date: string;
      days_overdue?: number;
      payment_history?: "good" | "mixed" | "poor" | "first_issue";
      relationship_value?: "high" | "medium" | "low";
      previous_collection_attempts?: string[];
      customer_excuses_given?: string[];
      escalation_level?: "initial" | "follow_up" | "escalated" | "final";
    };
    objective: string;
    negotiation_authority?: {
      can_offer_payment_plan?: boolean;
      can_waive_fees?: boolean;
      max_discount_percent?: number;
    };
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseScript

TypeScript
interface CollectionsScriptResponse {
  external_id?: string;
  content: {
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
payment_arrangementPayment Arrangement

Request

TypeScript
interface PaymentArrangementRequest {
  content_type: "payment_arrangement";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    account: {
      customer_name: string;
      customer_company?: string;
      account_number?: string;
      invoice_number?: string;
      amount_due: string;
      original_due_date: string;
      days_overdue?: number;
      payment_history?: "good" | "mixed" | "poor" | "first_issue";
      relationship_value?: "high" | "medium" | "low";
    };
    objective: string;
    arrangement_options?: {
      installment_plans?: string[];
      settlement_options?: string[];
      extended_terms?: string;
    };
    customer_situation?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PaymentArrangementResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
final_noticeFinal Notice

Request

TypeScript
interface FinalNoticeRequest {
  content_type: "final_notice";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    account: {
      customer_name: string;
      customer_company?: string;
      account_number?: string;
      invoice_number?: string;
      amount_due: string;
      original_due_date: string;
      days_overdue?: number;
      payment_history?: "good" | "mixed" | "poor" | "first_issue";
      relationship_value?: "high" | "medium" | "low";
      total_with_fees?: string;
    };
    objective: string;
    consequences?: {
      service_termination_date?: string;
      collections_agency_referral?: boolean;
      legal_action_warning?: boolean;
      credit_reporting_warning?: boolean;
    };
    final_deadline: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface FinalNoticeResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}

Customer Retention & Success

renewal_requestRenewal Request

Request

TypeScript
interface RenewalRequestRequest {
  content_type: "renewal_request";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      current_plan: string;
      renewal_date: string;
      contract_length?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    renewal_incentives?: string[];
    value_delivered?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface RenewalRequestResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
contract_renewalContract Renewal

Request

TypeScript
interface ContractRenewalRequest {
  content_type: "contract_renewal";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      current_contract_value: string;
      contract_end_date: string;
      contract_terms?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    proposed_changes?: {
      price_adjustment?: string;
      term_changes?: string;
      scope_changes?: string;
    };
    success_metrics?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ContractRenewalResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
win_back_campaignWin-back Campaign

Request

TypeScript
interface WinBackCampaignRequest {
  content_type: "win_back_campaign";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      churned_date: string;
      previous_plan?: string;
      churn_reason?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    win_back_offer?: {
      discount?: string;
      free_trial_period?: string;
      new_features_since_churn?: string[];
      special_incentive?: string;
    };
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface WinBackCampaignResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
churn_preventionChurn Prevention

Request

TypeScript
interface ChurnPreventionRequest {
  content_type: "churn_prevention";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      churn_risk_score?: "high" | "medium" | "low";
      risk_indicators?: string[];
      last_login?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    intervention_type?: "re_engagement" | "success_check_in" | "value_reminder" | "save_offer" | "executive_outreach";
    retention_offers?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ChurnPreventionResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
upsell_cross_sellUpsell / Cross-sell

Request

TypeScript
interface UpsellCrossSellRequest {
  content_type: "upsell_cross_sell";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    offer_type: "upsell" | "cross_sell" | "add_on" | "upgrade";
    recommended_product: {
      name: string;
      value_proposition: string;
      price?: string;
      relevance_reason?: string;
    };
    usage_trigger?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface UpsellCrossSellResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
reactivation_offerReactivation Offer

Request

TypeScript
interface ReactivationOfferRequest {
  content_type: "reactivation_offer";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      inactive_since: string;
      last_activity?: string;
      previous_engagement_level?: "high" | "medium" | "low";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    reactivation_incentive?: {
      offer_type: "discount" | "free_period" | "bonus_credits" | "exclusive_access" | "other";
      offer_details: string;
      expiration?: string;
    };
    product_updates?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ReactivationOfferResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}

Customer Engagement & Advocacy

referral_requestReferral Request

Request

TypeScript
interface ReferralRequestRequest {
  content_type: "referral_request";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    referral_program?: {
      referrer_reward?: string;
      referee_reward?: string;
      how_it_works?: string;
    };
    success_story?: string;
    ideal_referral_profile?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ReferralRequestResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
testimonial_requestTestimonial Request

Request

TypeScript
interface TestimonialRequestRequest {
  content_type: "testimonial_request";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    testimonial_type?: "written_quote" | "video_testimonial" | "case_study" | "logo_usage" | "reference_call";
    specific_results?: string[];
    usage_context?: string;
    time_commitment?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface TestimonialRequestResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
review_requestReview Request

Request

TypeScript
interface ReviewRequestRequest {
  content_type: "review_request";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    review_platform?: "g2" | "capterra" | "trustpilot" | "google" | "app_store" | "play_store" | "yelp" | "other";
    direct_link?: string;
    recent_positive_experience?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ReviewRequestResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
survey_requestSurvey Request

Request

TypeScript
interface SurveyRequestRequest {
  content_type: "survey_request";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    survey_details?: {
      type?: "nps" | "csat" | "ces" | "product_feedback" | "market_research" | "other";
      estimated_time?: string;
      incentive?: string;
      deadline?: string;
    };
    why_their_feedback_matters?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface SurveyRequestResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
onboarding_sequenceOnboarding Sequence

Request

TypeScript
interface OnboardingSequenceRequest {
  content_type: "onboarding_sequence";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      signup_date?: string;
      plan_purchased?: string;
      onboarding_stage?: "welcome" | "setup" | "first_value" | "advanced_features" | "success_check";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    key_actions?: string[];
    resources_to_share?: string[];
    success_milestone?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface OnboardingSequenceResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
loyalty_programLoyalty Program

Request

TypeScript
interface LoyaltyProgramRequest {
  content_type: "loyalty_program";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
      loyalty_tier?: string;
      points_balance?: number;
      tier_progress?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    program_details?: {
      tier_benefits?: string[];
      upcoming_rewards?: string[];
      exclusive_offers?: string[];
    };
    milestone_celebration?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface LoyaltyProgramResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
event_invitationEvent Invitation

Request

TypeScript
interface EventInvitationRequest {
  content_type: "event_invitation";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    prospect?: {
      name?: string;
      company?: string;
      role: string;
      industry: string;
      pain_points?: string[];
      goals?: string[];
    };
    customer?: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    event_details: {
      name: string;
      type: "webinar" | "conference" | "workshop" | "networking" | "product_launch" | "roundtable" | "demo_day" | "other";
      date: string;
      time?: string;
      location_or_link?: string;
      duration?: string;
    };
    speakers_or_guests?: string[];
    key_takeaways?: string[];
    registration_deadline?: string;
    limited_spots?: boolean;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface EventInvitationResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}

Sensitive Communications

price_increasePrice Increase

Request

TypeScript
interface PriceIncreaseRequest {
  content_type: "price_increase";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    price_change: {
      current_price: string;
      new_price: string;
      effective_date: string;
      percentage_increase?: string;
    };
    justification?: string[];
    grandfather_option?: string;
    value_additions?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PriceIncreaseResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
service_discontinuationService Discontinuation

Request

TypeScript
interface ServiceDiscontinuationRequest {
  content_type: "service_discontinuation";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    discontinuation_details: {
      service_name: string;
      end_date: string;
      reason?: string;
    };
    migration_path?: {
      alternative_service?: string;
      migration_support?: string;
      data_export_options?: string;
    };
    transition_timeline?: string;
    support_contact?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ServiceDiscontinuationResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
policy_changePolicy Change

Request

TypeScript
interface PolicyChangeRequest {
  content_type: "policy_change";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer?: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    policy_change: {
      policy_name: string;
      summary_of_changes: string[];
      effective_date: string;
      reason_for_change?: string;
    };
    impact_on_customer?: string;
    action_required?: string;
    opt_out_options?: string;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PolicyChangeResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
decline_or_rejectionDecline / Rejection

Request

TypeScript
interface DeclineOrRejectionRequest {
  content_type: "decline_or_rejection";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    recipient: {
      name: string;
      company?: string;
      role?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    rejection_details: {
      type: "application" | "proposal" | "partnership" | "feature_request" | "refund_request" | "price_negotiation" | "other";
      what_was_declined: string;
      reason?: string;
    };
    alternative_offered?: string;
    door_open_for_future?: boolean;
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface DeclineOrRejectionResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
bad_news_deliveryBad News Delivery

Request

TypeScript
interface BadNewsDeliveryRequest {
  content_type: "bad_news_delivery";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    recipient: {
      name: string;
      company?: string;
      role?: string;
      relationship_context?: string;
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    bad_news: {
      category: "delay" | "cancellation" | "error" | "failure" | "budget_cut" | "team_change" | "other";
      description: string;
      impact: string;
    };
    mitigation?: {
      immediate_actions?: string[];
      compensation_offered?: string;
      timeline_for_resolution?: string;
    };
    next_steps?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface BadNewsDeliveryResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
apology_recoveryApology & Recovery

Request

TypeScript
interface ApologyRecoveryRequest {
  content_type: "apology_recovery";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      customer_name: string;
      customer_company?: string;
      account_tier?: "free" | "starter" | "professional" | "enterprise";
      customer_since?: string;
      lifetime_value?: string;
      usage_level?: "heavy" | "moderate" | "light" | "declining" | "inactive";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    incident: {
      type: "service_outage" | "billing_error" | "data_issue" | "support_failure" | "delivery_problem" | "quality_issue" | "communication_failure" | "other";
      description: string;
      customer_impact: string;
      duration?: string;
    };
    remediation?: {
      immediate_fix?: string;
      compensation?: string;
      preventive_measures?: string[];
    };
    accountability_level?: "full" | "partial" | "explanation_only";
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface ApologyRecoveryResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}

B2C Marketing

promotional_emailPromotional Email

Request

TypeScript
interface PromotionalEmailRequest {
  content_type: "promotional_email";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    audience: {
      segment: string;
      demographics?: string;
      purchase_history?: string;
      preferences?: string[];
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    promotion: {
      type: "discount" | "flash_sale" | "bundle" | "bogo" | "free_shipping" | "loyalty_exclusive" | "seasonal" | "new_product" | "other";
      offer_details: string;
      discount_code?: string;
      expiration?: string;
      terms_and_conditions?: string;
    };
    urgency_level?: "low" | "medium" | "high";
    featured_products?: string[];
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface PromotionalEmailResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}
cart_abandonmentCart Abandonment

Request

TypeScript
interface CartAbandonmentRequest {
  content_type: "cart_abandonment";
  context: {
    sender: {
      name?: string;
      company: string;
      role?: string;
      value_proposition: string;
      credibility_markers?: string[];
    };
    customer: {
      name?: string;
      email_history?: "first_abandon" | "repeat_abandoner" | "first_time_visitor";
    };
    relationship: {
      stage: "cold" | "warm" | "hot";
      previous_touchpoints?: string[];
      specific_trigger?: string;
    };
    objective: string;
    abandoned_cart: {
      items: Array<{
        name: string;
        price?: string;
        quantity?: number;
      }>;
      cart_total?: string;
      abandonment_time?: string;
    };
    recovery_incentive?: {
      discount_offered?: string;
      free_shipping?: boolean;
      bonus_item?: string;
      limited_time?: string;
    };
    sequence_position?: "first" | "second" | "final";
  };
  constraints?: {
    max_words?: number;
    must_include?: string[];
  };
  voice_profile?: {
    formality?: "casual" | "professional" | "formal";
    tone?: string;
    style_notes?: string;
  };
  requested_at?: string;
  external_id?: string;
}

ResponseEmail

TypeScript
interface CartAbandonmentResponse {
  external_id?: string;
  content: {
    subject_line: string;
    body: string;
    word_count: number;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    optimization_score?: number;
    score_rationale?: string;
    response_time_seconds?: number;
  };
}

Coach Response

The /v1/coach endpoint returns prompts and guidance:

TypeScript
interface CoachResponse {
  coaching: {
    content_type: string;
    system_prompt: string;
    user_prompt: string;
  };
  metadata: {
    content_type: string;
    generated_at: string;
    response_time_seconds?: number;
  };
}

Error Responses

All errors follow a consistent flat structure:

TypeScript
interface ErrorResponse {
  error: string;
  message: string;
  code: string;
  details?: Array<{
    path: string;
    message: string;
  }>;
}