Skip to content
Lead and account services

Lead and account services

Package pulse.v1. Every method needs a bearer token. See Leads and Connections.

LeadService

MethodRequest → ResponseNotes
SyncLeadsSyncLeadsRequest → SyncLeadsResponseplatform must be hubspot (the default). Needs a HubSpot connection.
ListLeadsListLeadsRequest → ListLeadsResponsePaginated. Filter by HubSpot lifecycle stage.
CreateLeadCreateLeadRequest → LeadNeeds at least a name, email, or company. source defaults to manual.
UpdateLeadStageUpdateLeadStageRequest → Leadnew, contacted, qualified, won, or lost
GenerateOutreachGenerateOutreachRequest → stream StreamChunkchannel: email, call_script, or linkedin_dm. Saved, not sent.
ListOutreachListOutreachRequest → ListOutreachResponse
CallLeadCallLeadRequest → CallLeadResponseNeeds Asterisk ARI and a phone number. Moves the lead to contacted.
ScrapeLeadsScrapeLeadsRequest → stream StreamChunkniche is required. max_results defaults to 10; values above 25 fall back to 10. Pushes to HubSpot when connected.
message SyncLeadsRequest {
  string platform = 1; // "hubspot" — the only supported source today
}

message SyncLeadsResponse {
  int32 synced_count = 1;
  google.protobuf.Timestamp synced_at = 2;
}

message ListLeadsRequest {
  PaginationRequest pagination = 1;
  string lifecycle_stage_filter = 2; // e.g. "lead", "marketingqualifiedlead" — empty = all
}

message ListLeadsResponse {
  repeated Lead leads = 1;
  PaginationResponse pagination = 2;
}

message Lead {
  string id = 1;
  string platform = 2;          // "hubspot"
  string external_id = 3;       // the CRM's own contact ID
  string email = 4;
  string first_name = 5;
  string last_name = 6;
  string company = 7;
  string lifecycle_stage = 8;   // CRM's own lifecycle stage string, shown as-is
  string lead_status = 9;
  google.protobuf.Timestamp crm_created_at = 10;
  google.protobuf.Timestamp last_synced_at = 11;
  string pipeline_stage = 12;
  string phone = 13;
  string title = 14;            // job title / role
  string notes = 15;
  string source = 16;           // "hubspot","manual","webform"
}

message CreateLeadRequest {
  string first_name = 1;
  string last_name = 2;
  string email = 3;
  string company = 4;
  string phone = 5;
  string title = 6;
  string notes = 7;
  string source = 8;            // default "manual"
}

message UpdateLeadStageRequest {
  string id = 1;
  string pipeline_stage = 2;
}

message GenerateOutreachRequest {
  string lead_id = 1;
  string channel = 2;           // "email","call_script","linkedin_dm"
  string diagnostic_id = 3;     // optional — grounds the pitch in a diagnosis
  string additional_context = 4;
  string tone = 5;              // "professional","casual","bold","consultative"
  string language = 6;          // e.g. "en", "pt-BR"
}

message LeadOutreach {
  string id = 1;
  string lead_id = 2;
  string channel = 3;
  string subject = 4;           // populated for email
  string body = 5;
  google.protobuf.Timestamp created_at = 6;
}

message ListOutreachRequest {
  string lead_id = 1;
}

message ListOutreachResponse {
  repeated LeadOutreach outreach = 1;
}

message CallLeadRequest {
  string lead_id = 1;
}

message CallLeadResponse {
  string call_id = 1;   // Asterisk channel id
  string status = 2;    // "dialing"
  string message = 3;
}

message ScrapeLeadsRequest {
  string niche = 1;          // what to prospect for, e.g. "logistics SaaS"
  string region = 2;         // optional geographic focus
  int32 max_results = 3;     // cap on new leads to pull (default 10)
  string diagnostic_id = 4;  // ground the outreach drafts in this diagnosis
}

IntegrationService

The Accounts tab. HubSpot and GitHub are managed through the shared ConnectionsService instead; see Shared components.

MethodRequest → ResponseNotes
ListIntegrationsListIntegrationsRequest → ListIntegrationsResponse
ConfigureIntegrationConfigureIntegrationRequest → IntegrationTokens are sealed before they are stored
TestConnectionTestConnectionRequest → TestConnectionResponseReal client checks for HubSpot, Google Analytics, Google Ads; a profile-endpoint call for the others
DisconnectIntegrationDisconnectIntegrationRequest → Empty
message Integration {
  string id = 1;
  string user_id = 2;
  string platform = 3;        // "linkedin", "instagram", "meta_business", "google_analytics", "mailchimp"
  IntegrationStatus status = 4;
  string account_name = 5;
  string account_id = 6;
  map<string, string> config = 7; // platform-specific configuration
  google.protobuf.Timestamp connected_at = 8;
  google.protobuf.Timestamp last_sync_at = 9;
  string error_message = 10;
}

message ListIntegrationsRequest {
  string user_id = 1;
}

message ListIntegrationsResponse {
  repeated Integration integrations = 1;
}

message ConfigureIntegrationRequest {
  string platform = 1;
  string access_token = 2;
  string refresh_token = 3;
  string account_id = 4;
  map<string, string> config = 5;
}

message TestConnectionRequest {
  string integration_id = 1;
}

message TestConnectionResponse {
  bool success = 1;
  string message = 2;
  int32 latency_ms = 3;
}

message DisconnectIntegrationRequest {
  string integration_id = 1;
}

InfluencerService

MethodRequest → Response
ListInfluencersEmpty → ListInfluencersResponse
SaveInfluencerSaveInfluencerRequest → Influencer
message Influencer {
  string id = 1;
  string name = 2;
  string handle = 3;
  string platform = 4;
  double score = 5;
  string notes = 6;
}

message ListInfluencersResponse {
  repeated Influencer influencers = 1;
}

message SaveInfluencerRequest {
  string name = 1;
  string handle = 2;
  string platform = 3;
  double score = 4;
  string notes = 5;
}