{"openapi":"3.1.0","info":{"title":"NetworkHQ Public API","version":"1.0.0","description":"External REST API for agents, campaigns, leads, LinkedIn accounts, and conversations.\n\n**Authentication** — every request must send a workspace API key as a bearer token: `Authorization: Bearer <api_key>`. API keys are scoped; an endpoint returns 403 when the key is missing the scope it requires (each operation lists its scope below) and 401 when the key is absent, malformed, or revoked.\n\n**Agent workflow** — read the workspace's saved product or extract a new product preview, edit and confirm it by starting a generation, poll until it is `ready` or `manual_input_required`, review the proposed criteria and signals, then create a draft agent with a destination list. Activate the draft with the actions endpoint. Generation handles are workspace-bound and become stale whenever the confirmed product or prepared proposal changes.\n\n**Rate limiting** — requests are capped at 60 per minute per API key using a fixed window. Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (a Unix timestamp in seconds) headers, and exceeding the limit returns 429.\n\n**Pagination** — list endpoints use cursor pagination. Pass `limit` (1–500, default 100) and the `next_cursor` from the previous response's `pagination` object to fetch the next page; `has_more` is `false` on the last page."},"servers":[{"url":"https://api.networkhq.io/api/v1"}],"tags":[{"name":"Agents","description":"Prepare, create, edit, and control lead generation agents. Requires `agents:read` or `agents:write`; existing API keys do not receive these scopes automatically."},{"name":"Campaigns","description":"Read outreach campaign status and performance summary metrics."},{"name":"LinkedIn accounts","description":"Read workspace sender accounts and campaign sender assignments."},{"name":"Lead lists","description":"Create one or more lead lists, list lead lists, and inspect lead lists in the API key workspace."},{"name":"Leads","description":"Import one or more leads, list, retrieve, and enrich leads."},{"name":"Conversations","description":"Read LinkedIn conversations, message history, and send messages into existing threads."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["limit","has_more","next_cursor"]},"CampaignLinkedInAccount":{"type":"object","properties":{"id":{"type":"string"},"profileName":{"type":["string","null"]}},"required":["id","profileName"]},"CampaignLeadList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"CampaignLeadBasicLead":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company":{"type":["string","null"]},"linkedin_url":{"type":["string","null"]}},"required":["id","name","first_name","last_name","company","linkedin_url"]},"CampaignLeadSender":{"type":"object","properties":{"id":{"type":["string","null"]},"profile_name":{"type":["string","null"]},"status":{"type":["string","null"]}},"required":["id","profile_name","status"]},"CampaignLeadCurrentState":{"type":"object","additionalProperties":false,"properties":{"connection_status":{"type":["string","null"],"enum":["connected","sent",null]},"inmail_status":{"type":["string","null"],"enum":["sent","replied",null]},"message_status":{"type":["string","null"],"enum":["sent","replied",null]},"last_action_at":{"type":["string","null"],"format":"date-time"}},"required":["last_action_at"]},"CampaignLeadActionEvent":{"type":"object","description":"A chronological campaign lead action.","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["send_connection_request","send_connection_request_with_note","send_message","send_open_message","send_inmail","send_voice_note","profile_viewed","like_post","follow_lead","comment_post","reply_comment"]},"status":{"type":"string","enum":["pending","scheduled","in_progress","sent","completed","failed","skipped","cancelled"]},"performed_at":{"type":"string","format":"date-time"},"scheduled_for":{"type":"string","format":"date-time"},"accepted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":true}},"required":["id","type","status","metadata"]},"CampaignLead":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"lead_id":{"type":["string","null"]},"current_state":{"$ref":"#/components/schemas/CampaignLeadCurrentState"},"lead":{"$ref":"#/components/schemas/CampaignLeadBasicLead"},"status":{"type":"string","enum":["queued","active","completed","failed","excluded","paused"]},"priority":{"type":"string","enum":["high","medium","low","unknown"]},"intent":{"type":["string","null"]},"intent_source":{"type":["string","null"]},"intent_reason":{"type":["string","null"]},"sender":{"anyOf":[{"$ref":"#/components/schemas/CampaignLeadSender"},{"type":"null"}]},"actions_performed":{"type":"array","items":{"$ref":"#/components/schemas/CampaignLeadActionEvent"}},"parked_reason":{"type":["string","null"]},"enrolled_at":{"type":"string","format":"date-time"},"next_action_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","campaign_id","lead_id","current_state","lead","status","priority","intent","intent_source","intent_reason","sender","actions_performed","parked_reason","enrolled_at","next_action_at","completed_at"]},"CampaignLeadMessageOverrideInput":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"node_type":{"const":"send_message"},"message_stage":{"type":"string","enum":["ice_breaker","follow_up_1","follow_up_2"],"description":"ice_breaker = first message, follow_up_1 = second message, follow_up_2 = third message."},"message":{"type":"string","minLength":1,"maxLength":8000,"description":"Lead-level message text to send instead of AI generation or template text."}},"required":["node_type","message_stage","message"]},{"type":"object","additionalProperties":false,"properties":{"node_type":{"const":"send_connection"},"message_stage":{"const":"ice_breaker"},"message":{"type":"string","minLength":1,"maxLength":200,"description":"Lead-level connection note text."}},"required":["node_type","message_stage","message"]}]},"CampaignLeadMessageOverride":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"lead_id":{"type":"string"},"node_type":{"type":"string","enum":["send_message","send_connection"]},"message_stage":{"type":"string","enum":["ice_breaker","follow_up_1","follow_up_2"]},"message":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","campaign_id","lead_id","node_type","message_stage","message","updated_at"]},"CampaignLeadMessageOverrideResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignLeadMessageOverride"}},"lead_campaign_state":{"type":"string","enum":["enrolled","pending_enrollment"]}},"required":["data","lead_campaign_state"]},"CampaignActionRequest":{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["start","pause","resume"],"description":"`start` starts a draft campaign, `pause` pauses an active campaign, and `resume` resumes a paused campaign."},"proceed_on_session_check_failure":{"type":"boolean","default":false,"description":"Only valid with `start`. Set to true after a `linkedin_session_check_failed` response to proceed despite the advisory LinkedIn health-check failure."}},"required":["action"]},"CampaignActionResult":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}},"required":["data"]},"AiCampaignWait":{"type":"object","additionalProperties":false,"properties":{"duration":{"type":"integer","minimum":1,"description":"Positive wait duration. Maximum is 59 minutes, 23 hours, or 10 days according to unit."},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["duration","unit"],"allOf":[{"if":{"properties":{"unit":{"const":"minutes"}},"required":["unit"]},"then":{"properties":{"duration":{"maximum":59}}}},{"if":{"properties":{"unit":{"const":"hours"}},"required":["unit"]},"then":{"properties":{"duration":{"maximum":23}}}},{"if":{"properties":{"unit":{"const":"days"}},"required":["unit"]},"then":{"properties":{"duration":{"maximum":10}}}}]},"AiCampaignMessageStep":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","enum":[false]}},"required":["enabled"]},{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","enum":[true]},"mode":{"type":"string","enum":["ai"]},"wait":{"$ref":"#/components/schemas/AiCampaignWait"}},"required":["enabled","mode","wait"]},{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","enum":[true]},"mode":{"type":"string","enum":["template"]},"message":{"type":"string","minLength":1,"maxLength":8000},"fallback_message":{"type":["string","null"],"minLength":1,"maxLength":8000},"wait":{"$ref":"#/components/schemas/AiCampaignWait"}},"required":["enabled","mode","message","wait"],"allOf":[{"if":{"properties":{"message":{"pattern":"\\{\\{job_title\\}\\}"}},"required":["message"]},"then":{"required":["fallback_message"],"properties":{"fallback_message":{"type":"string","pattern":"\\S"}}}}]}],"description":"Enabled stages require an app-compatible minimum wait: 3 hours for icebreaker, 3 days for follow_up_1, and 4 days for follow_up_2. A template using {{job_title}} also requires fallback_message."},"AiCampaignSchedule":{"type":"object","additionalProperties":false,"properties":{"timezone":{"type":"string","description":"Recognized IANA timezone."},"start_date":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"start_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"end_time":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"active_days":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]}}},"required":["timezone","start_date","start_time","end_time","active_days"],"description":"end_time must be later than start_time and the active window must span at least eight hours.","x-runtime-constraints":["end_time must be later than start_time","the end_time - start_time window must be at least 480 minutes"]},"AiCampaignEngagement":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":true},"like_after_days":{"type":"integer","minimum":1,"maximum":14,"default":3},"wait_after_like_days":{"type":"integer","minimum":1,"maximum":14,"default":2}},"required":["enabled","like_after_days","wait_after_like_days"],"description":"Matches the app Create-with-AI post-engagement step: wait, like the lead's latest post when still unconnected, then monitor for acceptance."},"AiCampaignConnectionRequest":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","const":"none"}},"required":["mode"]},{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","const":"template"},"message":{"type":"string","minLength":1,"maxLength":200},"fallback_message":{"type":["string","null"],"minLength":1,"maxLength":200}},"required":["mode","message"]}],"description":"Optional campaign-level LinkedIn connection request note. The default is none."},"AiCampaignMessages":{"type":"object","additionalProperties":false,"properties":{"icebreaker":{"$ref":"#/components/schemas/AiCampaignMessageStep"},"follow_up_1":{"$ref":"#/components/schemas/AiCampaignMessageStep"},"follow_up_2":{"$ref":"#/components/schemas/AiCampaignMessageStep"}},"required":["icebreaker","follow_up_1","follow_up_2"]},"AiCampaignStartConversationCta":{"type":"object","additionalProperties":false},"AiCampaignDriveSignupCta":{"type":"object","additionalProperties":false,"properties":{"signup_url":{"type":"string","format":"uri","pattern":"^[hH][tT][tT][pP][sS]?://","maxLength":2048},"signup_type":{"type":"string","enum":["Website/Url","Free trial","Beta","Waitlist","Freemium","App install"]},"trial_length":{"type":"string","pattern":"\\S","minLength":1,"maxLength":100},"friction_removers":{"type":"array","maxItems":3,"items":{"type":"string","pattern":"\\S","minLength":1,"maxLength":200}}},"required":["signup_url"]},"AiCampaignMeetingCta":{"type":"object","additionalProperties":false,"properties":{"cta_text":{"type":"string","pattern":"\\S","minLength":1,"maxLength":500},"calendar_link":{"type":"string","format":"uri","pattern":"^[hH][tT][tT][pP][sS]?://","maxLength":2048},"meeting_duration":{"type":"string","enum":["15 minutes","30 minutes","45 minutes","60 minutes"]},"proposed_times":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","pattern":"\\S","minLength":1}},"use_sender_meeting_link":{"type":"boolean"}},"required":["cta_text"]},"AiCampaignCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":["string","null"],"maxLength":500},"priority":{"type":"string","enum":["high","medium","low"],"default":"medium"},"objective":{"type":"string","enum":["start_conversation","drive_signup","book_online_meeting"],"default":"start_conversation"},"cta_payload":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AiCampaignStartConversationCta"},{"$ref":"#/components/schemas/AiCampaignDriveSignupCta"},{"$ref":"#/components/schemas/AiCampaignMeetingCta"}]},"linkedin_account_ids":{"type":"array","uniqueItems":true,"items":{"type":"string","minLength":1}},"source":{"oneOf":[{"type":"null"},{"type":"object","additionalProperties":false,"properties":{"lead_list_id":{"type":"string","minLength":1}},"required":["lead_list_id"]},{"type":"object","additionalProperties":false,"properties":{"leads":{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/LeadCreateRequest"}}},"required":["leads"]}],"description":"Omit or pass null to use the workspace default My List. Inline leads are atomically added to My List and require leads:write."},"schedule":{"$ref":"#/components/schemas/AiCampaignSchedule"},"auto_approve_ai_messages":{"type":"boolean","default":true,"description":"Applied only when at least one message stage uses AI; template-only sequences store false."},"messages":{"type":"object","additionalProperties":false,"properties":{"icebreaker":{"allOf":[{"$ref":"#/components/schemas/AiCampaignMessageStep"},{"if":{"properties":{"enabled":{"const":true}},"required":["enabled"]},"then":{"properties":{"wait":{"allOf":[{"if":{"properties":{"unit":{"const":"minutes"}}},"then":{"properties":{"duration":{"minimum":180}}}},{"if":{"properties":{"unit":{"const":"hours"}}},"then":{"properties":{"duration":{"minimum":3}}}},{"if":{"properties":{"unit":{"const":"days"}}},"then":{"properties":{"duration":{"minimum":1}}}}]}}}}]},"follow_up_1":{"allOf":[{"$ref":"#/components/schemas/AiCampaignMessageStep"},{"if":{"properties":{"enabled":{"const":true}},"required":["enabled"]},"then":{"properties":{"wait":{"allOf":[{"if":{"properties":{"unit":{"const":"minutes"}}},"then":{"properties":{"duration":{"minimum":4320}}}},{"if":{"properties":{"unit":{"const":"hours"}}},"then":{"properties":{"duration":{"minimum":72}}}},{"if":{"properties":{"unit":{"const":"days"}}},"then":{"properties":{"duration":{"minimum":3}}}}]}}}}]},"follow_up_2":{"allOf":[{"$ref":"#/components/schemas/AiCampaignMessageStep"},{"if":{"properties":{"enabled":{"const":true}},"required":["enabled"]},"then":{"properties":{"wait":{"allOf":[{"if":{"properties":{"unit":{"const":"minutes"}}},"then":{"properties":{"duration":{"minimum":5760}}}},{"if":{"properties":{"unit":{"const":"hours"}}},"then":{"properties":{"duration":{"minimum":96}}}},{"if":{"properties":{"unit":{"const":"days"}}},"then":{"properties":{"duration":{"minimum":4}}}}]}}}}]}},"required":["icebreaker","follow_up_1","follow_up_2"],"description":"When omitted, all three stages use AI with waits of 3 hours, 3 days, and 4 days. When supplied, all three keys are required and follow-ups cannot be enabled after a disabled predecessor.","allOf":[{"if":{"properties":{"icebreaker":{"properties":{"enabled":{"const":false}},"required":["enabled"]}},"required":["icebreaker"]},"then":{"properties":{"follow_up_1":{"properties":{"enabled":{"const":false}},"required":["enabled"]}}}},{"if":{"properties":{"follow_up_1":{"properties":{"enabled":{"const":false}},"required":["enabled"]}},"required":["follow_up_1"]},"then":{"properties":{"follow_up_2":{"properties":{"enabled":{"const":false}},"required":["enabled"]}}}}]},"engagement":{"$ref":"#/components/schemas/AiCampaignEngagement"},"connection_request":{"$ref":"#/components/schemas/AiCampaignConnectionRequest"}},"required":["name","linkedin_account_ids","schedule"],"allOf":[{"if":{"properties":{"objective":{"const":"drive_signup"}},"required":["objective"]},"then":{"required":["cta_payload"],"properties":{"cta_payload":{"$ref":"#/components/schemas/AiCampaignDriveSignupCta"}}},"else":{"if":{"properties":{"objective":{"const":"book_online_meeting"}},"required":["objective"]},"then":{"required":["cta_payload"],"properties":{"cta_payload":{"$ref":"#/components/schemas/AiCampaignMeetingCta"}}},"else":{"properties":{"cta_payload":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AiCampaignStartConversationCta"}]}}}}}]},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"goal":{"type":["string","null"],"description":"The campaign goal shown in the UI. This is the persisted campaign description."},"status":{"type":"string","enum":["draft","started","paused","completed"]},"totalLeads":{"type":"integer"},"connectionsSent":{"type":"integer"},"messagesSent":{"type":"integer"},"repliesReceived":{"type":"integer"},"connectionRequestsAccepted":{"type":"integer"},"linkedinAccounts":{"type":"array","items":{"$ref":"#/components/schemas/CampaignLinkedInAccount"}},"leadList":{"anyOf":[{"$ref":"#/components/schemas/CampaignLeadList"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","goal","status","totalLeads","connectionsSent","messagesSent","repliesReceived","connectionRequestsAccepted","linkedinAccounts","leadList","createdAt","updatedAt"]},"CampaignSetup":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"goal":{"type":["string","null"],"description":"Always equal to description."},"priority":{"type":"string","enum":["high","medium","low"]},"objective":{"type":"string","enum":["start_conversation","drive_signup","book_online_meeting"]},"cta_payload":{"type":["object","null"],"additionalProperties":true},"linkedin_account_ids":{"type":"array","items":{"type":"string"},"uniqueItems":true},"source":{"oneOf":[{"type":"null"},{"type":"object","additionalProperties":false,"properties":{"lead_list_id":{"type":"string"}},"required":["lead_list_id"]}]},"schedule":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AiCampaignSchedule"}]},"auto_approve_ai_messages":{"type":"boolean"},"messages":{"$ref":"#/components/schemas/AiCampaignMessages"},"engagement":{"$ref":"#/components/schemas/AiCampaignEngagement"},"connection_request":{"$ref":"#/components/schemas/AiCampaignConnectionRequest"}},"required":["name","description","goal","priority","objective","cta_payload","linkedin_account_ids","source","schedule","auto_approve_ai_messages","messages","engagement","connection_request"]},"CampaignDetail":{"allOf":[{"$ref":"#/components/schemas/Campaign"},{"type":"object","properties":{"setup":{"$ref":"#/components/schemas/CampaignSetup"}},"required":["setup"]}]},"CampaignSetupPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":["string","null"],"maxLength":500},"priority":{"type":"string","enum":["high","medium","low"]},"objective":{"type":"string","enum":["start_conversation","drive_signup","book_online_meeting"]},"cta_payload":{"type":["object","null"],"additionalProperties":true},"linkedin_account_ids":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","minLength":1}},"auto_approve_ai_messages":{"type":"boolean"},"schedule":{"$ref":"#/components/schemas/AiCampaignSchedule"},"messages":{"$ref":"#/components/schemas/AiCampaignMessages"},"engagement":{"$ref":"#/components/schemas/AiCampaignEngagement"},"connection_request":{"$ref":"#/components/schemas/AiCampaignConnectionRequest"}},"allOf":[{"if":{"properties":{"objective":{"const":"drive_signup"}},"required":["objective"]},"then":{"required":["cta_payload"],"properties":{"cta_payload":{"$ref":"#/components/schemas/AiCampaignDriveSignupCta"}}},"else":{"if":{"properties":{"objective":{"const":"book_online_meeting"}},"required":["objective"]},"then":{"required":["cta_payload"],"properties":{"cta_payload":{"$ref":"#/components/schemas/AiCampaignMeetingCta"}}},"else":{"if":{"properties":{"objective":{"const":"start_conversation"}},"required":["objective"]},"then":{"properties":{"cta_payload":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AiCampaignStartConversationCta"}]}}}}}}]},"MessageApproval":{"type":"object","properties":{"id":{"type":"string"},"campaign_id":{"type":"string"},"lead_id":{"type":"string"},"node_type":{"type":"string"},"message_stage":{"type":["string","null"],"enum":["ice_breaker","follow_up_1","follow_up_2",null]},"sequence_index":{"type":"integer"},"subject":{"type":["string","null"]},"message":{"type":"string"},"approval_status":{"type":["string","null"],"enum":["pending","approved","rejected",null]},"approval_requested_at":{"type":["string","null"],"format":"date-time"},"approval_resolved_at":{"type":["string","null"],"format":"date-time"},"approval_resolved_by_user_id":{"type":["string","null"]},"approval_resolution_source":{"type":["string","null"],"enum":["manual","auto",null]},"rejection_reason":{"type":["string","null"],"enum":["MESSAGE_QUALITY","NOT_FIT","BAD_TIMING","EXISTING_RELATIONSHIP","OTHER",null]},"rejection_note":{"type":["string","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"is_override":{"type":"boolean"},"regeneration_count":{"type":"integer"},"generated_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","campaign_id","lead_id","node_type","message_stage","sequence_index","subject","message","approval_status","approval_requested_at","approval_resolved_at","approval_resolved_by_user_id","approval_resolution_source","rejection_reason","rejection_note","scheduled_at","is_override","regeneration_count","generated_at","updated_at"]},"LinkedInAccountSendingLimits":{"type":"object","properties":{"max_follows_per_day":{"type":"integer"},"max_messages_per_day":{"type":"integer"},"max_inmails_per_day":{"type":"integer"},"max_connection_requests_per_day":{"type":"integer"},"max_profile_views_per_day":{"type":"integer"},"max_post_likes_per_day":{"type":"integer"},"max_comments_per_day":{"type":"integer"},"warmup_enabled":{"type":"boolean"}},"required":["max_follows_per_day","max_messages_per_day","max_inmails_per_day","max_connection_requests_per_day","max_profile_views_per_day","max_post_likes_per_day","max_comments_per_day","warmup_enabled"]},"LinkedInAccountSendingLimitsUpdateRequest":{"type":"object","description":"Manual limits can be changed only while warm-up is disabled or when this request disables it.","properties":{"warmup_enabled":{"type":"boolean"},"max_follows_per_day":{"type":"integer","minimum":0,"maximum":40},"max_messages_per_day":{"type":"integer","minimum":0,"maximum":40},"max_inmails_per_day":{"type":"integer","minimum":0,"maximum":40},"max_connection_requests_per_day":{"type":"integer","minimum":0,"maximum":40},"max_profile_views_per_day":{"type":"integer","minimum":0,"maximum":40},"max_post_likes_per_day":{"type":"integer","minimum":0,"maximum":40},"max_comments_per_day":{"type":"integer","minimum":0,"maximum":40}},"minProperties":1,"additionalProperties":false},"LinkedInAccount":{"type":"object","properties":{"id":{"type":"string"},"profile_name":{"type":["string","null"]},"profile_url":{"type":["string","null"]},"profile_picture_url":{"type":["string","null"]},"status":{"type":"string","enum":["connecting","connected","disconnected","error","awaiting_code"]},"account_tier":{"type":"string","enum":["regular","premium","sales_navigator"]},"sending_limits":{"$ref":"#/components/schemas/LinkedInAccountSendingLimits"},"connection_count":{"type":["integer","null"]},"pending_invite_count":{"type":["integer","null"],"description":"Connection requests this workspace's campaigns sent from the account that nobody has answered yet. Campaign sends only — invitations the account owner sent by hand on LinkedIn are not counted."},"last_ran_at":{"type":["string","null"],"format":"date-time"},"cooldown_until":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","profile_name","profile_url","profile_picture_url","status","account_tier","sending_limits","connection_count","pending_invite_count","last_ran_at","cooldown_until","created_at","updated_at"]},"CompanyDetails":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"tagline":{"type":["string","null"]},"description":{"type":["string","null"]},"website":{"type":["string","null"]},"linkedin_url":{"type":["string","null"]},"industry":{"type":["string","null"]},"employee_count":{"type":["integer","null"]},"employee_count_range_min":{"type":["integer","null"]},"employee_count_range_max":{"type":["integer","null"]},"hq_city":{"type":["string","null"]},"hq_country":{"type":["string","null"]},"founded_year":{"type":["integer","null"]},"specialties":{"type":["array","null"],"items":{"type":"string"}},"logo_url":{"type":["string","null"]},"follower_count":{"type":["integer","null"]},"company_type":{"type":["string","null"]},"phone":{"type":["string","null"]},"active":{"type":["boolean","null"]},"top_companies_rank":{"type":["integer","null"]},"top_companies_list_name":{"type":["string","null"]},"enriched_at":{"type":"string","format":"date-time"}},"required":["id","enriched_at"]},"LeadList":{"type":"object","properties":{"id":{"type":"string"},"workspace_name":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"is_default":{"type":"boolean"},"is_campaign_eligible":{"type":"boolean"},"created_by":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"lead_count":{"type":"integer"}},"required":["id","workspace_name","name","is_default","is_campaign_eligible","created_by","created_at","updated_at"]},"Lead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]},"company":{"type":["string","null"]},"company_id":{"type":["string","null"]},"company_linkedin_url":{"type":["string","null"]},"job_title":{"type":["string","null"]},"headline":{"type":["string","null"]},"summary":{"type":["string","null"]},"industry":{"type":["string","null"]},"skills":{"type":["array","null"],"items":{"type":"string"}},"linkedin_url":{"type":["string","null"]},"phone":{"type":["string","null"]},"location":{"type":["string","null"]},"gender":{"type":["string","null"]},"date_of_birth":{"type":["string","null"],"format":"date-time"},"notes":{"type":["string","null"]},"profile_picture_url":{"type":["string","null"]},"profile_enriched_at":{"type":["string","null"],"format":"date-time"},"company_enriched_at":{"type":["string","null"],"format":"date-time"},"enrichment_requested_at":{"type":["string","null"],"format":"date-time"},"company_details":{"anyOf":[{"$ref":"#/components/schemas/CompanyDetails"},{"type":"null"}]},"enrichment_failed":{"type":"boolean"},"is_open_to_work":{"type":["boolean","null"]},"fitment_status":{"type":"string","enum":["OPEN","REJECTED"]},"fitment_rejection_note":{"type":["string","null"]},"fitment_rejected_at":{"type":["string","null"],"format":"date-time"},"first_matched_at":{"type":["string","null"],"format":"date-time"},"lead_heat_tier":{"type":["string","null"],"enum":["hot","warmer","warm","low",null]},"lead_heat_reason":{"type":["string","null"]},"lead_heat_raw_score":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","first_name","last_name","email","company","company_id","company_linkedin_url","job_title","headline","summary","industry","skills","linkedin_url","phone","location","gender","date_of_birth","notes","profile_picture_url","profile_enriched_at","company_enriched_at","enrichment_requested_at","company_details","enrichment_failed","is_open_to_work","fitment_status","fitment_rejection_note","fitment_rejected_at","first_matched_at","lead_heat_tier","lead_heat_reason","lead_heat_raw_score","created_at","updated_at"]},"LeadWithLists":{"allOf":[{"$ref":"#/components/schemas/Lead"},{"type":"object","properties":{"lead_list_ids":{"type":"array","items":{"type":"string"}}},"required":["lead_list_ids"]}]},"LeadCreateRequest":{"type":"object","additionalProperties":false,"required":["first_name","last_name","linkedin_url"],"properties":{"first_name":{"type":"string","minLength":1,"example":"First"},"last_name":{"type":"string","minLength":1,"example":"Prospect"},"email":{"type":["string","null"],"example":"first.prospect@example.com"},"company":{"type":["string","null"],"example":"Acme"},"company_linkedin_url":{"type":["string","null"],"example":"https://www.linkedin.com/company/acme"},"job_title":{"type":["string","null"],"example":"VP Sales"},"headline":{"type":["string","null"],"example":"VP Sales at Acme"},"summary":{"type":["string","null"],"example":"Revenue leader focused on enterprise growth."},"industry":{"type":["string","null"],"example":"Software"},"skills":{"type":["array","null"],"items":{"type":"string"},"example":["Sales","GTM"]},"linkedin_url":{"type":"string","example":"https://www.linkedin.com/in/first-prospect"},"phone":{"type":["string","null"],"example":"+1 415 555 0101"},"location":{"type":["string","null"],"example":"San Francisco, CA"},"gender":{"type":["string","null"],"example":"unknown"},"date_of_birth":{"type":["string","null"],"format":"date-time","example":"1990-01-15T00:00:00.000Z"},"notes":{"type":["string","null"],"example":"Met at SaaS Summit."},"profile_picture_url":{"type":["string","null"],"example":"https://example.com/first-prospect.jpg"}},"example":{"first_name":"First","last_name":"Prospect","email":"first.prospect@example.com","company":"Acme","company_linkedin_url":"https://www.linkedin.com/company/acme","job_title":"VP Sales","headline":"VP Sales at Acme","summary":"Revenue leader focused on enterprise growth.","industry":"Software","skills":["Sales","GTM"],"linkedin_url":"https://www.linkedin.com/in/first-prospect","phone":"+1 415 555 0101","location":"San Francisco, CA","gender":"unknown","date_of_birth":"1990-01-15T00:00:00.000Z","notes":"Met at SaaS Summit.","profile_picture_url":"https://example.com/first-prospect.jpg"}},"LeadListCreateInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":500}},"required":["name"],"additionalProperties":false},"LeadListCreateBatchRequest":{"type":"object","properties":{"lead_lists":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/LeadListCreateInput"}}},"required":["lead_lists"],"additionalProperties":false},"LeadListCreateValidationError":{"type":"object","properties":{"index":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["index","errors"]},"LeadListCreateBatchResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadList"}},"malformed":{"type":"array","items":{"$ref":"#/components/schemas/LeadListCreateValidationError"}},"summary":{"type":"object","properties":{"attempted":{"type":"integer"},"created":{"type":"integer"},"malformed":{"type":"integer"}},"required":["attempted","created","malformed"]}},"required":["data","malformed","summary"]},"LeadCreateValidationError":{"type":"object","properties":{"index":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["index","errors"]},"LeadCreateProcessingError":{"type":"object","properties":{"index":{"type":"integer"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["processing_failed"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["index","error"]},"LeadEnrichment":{"type":"object","properties":{"status":{"type":"string","enum":["already_enriched","enriched","failed","insufficient_credits"]},"charged":{"type":"boolean"},"credits_remaining":{"type":"integer"}},"required":["status","charged","credits_remaining"]},"ConversationLead":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"linkedin_url":{"type":["string","null"]}},"required":["id","first_name","last_name","linkedin_url"]},"ConversationLinkedInAccount":{"type":"object","properties":{"id":{"type":"string"},"profile_name":{"type":["string","null"]}},"required":["id","profile_name"]},"ConversationLastMessage":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"sent_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["sent","received"]}},"required":["id","content","sent_at","direction"]},"ConversationAttachment":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["image","file","external_media","audio","video","unsupported"]},"proxy_path":{"type":"string","description":"Authenticated public API path for streaming supported media."},"asset_urn":{"type":["string","null"]},"name":{"type":"string"},"media_type":{"type":["string","null"]},"title":{"type":["string","null"]},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"byte_size":{"type":["number","null"]},"duration_ms":{"type":["number","null"]},"content_types":{"type":"array","items":{"type":"string"}}},"required":["type"]},"ConversationMessage":{"type":"object","properties":{"id":{"type":"string"},"linkedin_message_id":{"type":"string"},"content":{"type":"string"},"direction":{"type":"string","enum":["sent","received"]},"sent_at":{"type":"string","format":"date-time"},"content_type":{"type":"string","enum":["text"]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ConversationAttachment"}}},"required":["id","linkedin_message_id","content","direction","sent_at","content_type","attachments"]},"SendConversationMessageRequest":{"type":"object","additionalProperties":false,"properties":{"content":{"type":"string","minLength":1,"maxLength":8000,"description":"Plain-text message body to send into the existing LinkedIn conversation."}},"required":["content"]},"SendConversationMessageResult":{"type":"object","properties":{"ok":{"type":"boolean"},"pending":{"type":"boolean","description":"True when LinkedIn accepted the send but did not return a message id immediately. The message will appear after the next inbox sync."},"message":{"anyOf":[{"$ref":"#/components/schemas/ConversationMessage"},{"type":"null"}]}},"required":["ok","pending","message"]},"Conversation":{"type":"object","properties":{"id":{"type":"string"},"linkedin_conversation_id":{"type":"string"},"intent":{"type":["string","null"],"enum":["INTERESTED","CURIOUS","NOT_INTERESTED","DEFERRED","NEEDS_LABEL","CONVERTED","NOT_PURSUING",null]},"is_unread":{"type":"boolean"},"lead":{"$ref":"#/components/schemas/ConversationLead"},"linkedin_account":{"$ref":"#/components/schemas/ConversationLinkedInAccount"},"last_message":{"anyOf":[{"$ref":"#/components/schemas/ConversationLastMessage"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","linkedin_conversation_id","intent","is_unread","lead","linkedin_account","last_message","created_at","updated_at"]},"ConversationDetail":{"type":"object","properties":{"id":{"type":"string"},"linkedin_conversation_id":{"type":"string"},"intent":{"type":["string","null"],"enum":["INTERESTED","CURIOUS","NOT_INTERESTED","DEFERRED","NEEDS_LABEL","CONVERTED","NOT_PURSUING",null]},"is_unread":{"type":"boolean"},"lead":{"$ref":"#/components/schemas/ConversationLead"},"linkedin_account":{"$ref":"#/components/schemas/ConversationLinkedInAccount"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","linkedin_conversation_id","intent","is_unread","lead","linkedin_account","messages","created_at","updated_at"]},"AgentProduct":{"type":"object","additionalProperties":false,"properties":{"website_url":{"type":"string","format":"uri"},"company_linkedin_url":{"type":["string","null"],"format":"uri"},"name":{"type":"string"},"value_proposition":{"type":"string"},"pain_points":{"type":"array","items":{"type":"string"}},"proof_points":{"type":"array","items":{"type":"string"}},"proof_point_sources":{"type":"array","items":{"type":"string","enum":["SOURCE_VERIFIED","GENERATED_GENERIC","USER_PROVIDED"]}},"proof_point_archetype_types":{"type":"array","items":{"type":"string","enum":["ROLE","INDUSTRY_TEAM","RECOGNIZABLE_COMPANY","UNCLASSIFIED"]}},"generated_at":{"type":["string","null"],"format":"date-time"}},"required":["website_url","company_linkedin_url","name","value_proposition","pain_points","proof_points","proof_point_sources","proof_point_archetype_types","generated_at"]},"AgentProductConfirmation":{"type":"object","additionalProperties":false,"properties":{"website_url":{"type":"string","format":"uri"},"company_linkedin_url":{"type":["string","null"],"format":"uri"},"name":{"type":"string"},"value_proposition":{"type":"string"},"pain_points":{"type":"array","items":{"type":"string"}},"proof_points":{"type":"array","items":{"type":"string"}},"proof_point_sources":{"type":"array","items":{"type":"string","enum":["SOURCE_VERIFIED","GENERATED_GENERIC","USER_PROVIDED"]}},"proof_point_archetype_types":{"type":"array","items":{"type":"string","enum":["ROLE","INDUSTRY_TEAM","RECOGNIZABLE_COMPANY","UNCLASSIFIED"]}},"generated_at":{"type":["string","null"],"format":"date-time"},"replace_existing_product":{"type":"boolean","default":false}},"required":["website_url","company_linkedin_url","name","value_proposition","pain_points","proof_points","generated_at","replace_existing_product"]},"AgentIcpCriteria":{"type":"object","additionalProperties":false,"properties":{"job_titles":{"type":"array","items":{"type":"string"}},"industries":{"type":"array","items":{"type":"string"}},"locations":{"type":"array","items":{"type":"string"}},"functions":{"type":"array","items":{"type":"string"}},"seniorities":{"type":"array","items":{"type":"string"}},"company_locations":{"type":"array","items":{"type":"string"}},"company_sizes":{"type":"array","items":{"type":"string"}},"company_types":{"type":"array","items":{"type":"string"}},"exclude_companies":{"type":"array","items":{"type":"string"}},"excluded_company_urls":{"type":"array","items":{"type":"string"}},"exclusions":{"type":"array","items":{"type":"string"}},"mandatory_keywords":{"type":"array","items":{"type":"string"}},"profile_languages":{"type":"array","items":{"type":"string"}},"schools":{"type":"array","items":{"type":"string"}},"min_years_experience":{"type":["integer","null"],"minimum":0},"max_years_experience":{"type":["integer","null"],"minimum":0},"additional_criteria":{"type":"string"},"matching_mode":{"type":"string","enum":["discovery","high_precision"]},"exclude_service_providers":{"type":"boolean"},"include_open_to_work":{"type":"boolean"}}},"AgentSignal":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"type":{"const":"profile_visitors"},"linkedin_account_ids":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["type","linkedin_account_ids"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"company_visitors"},"linkedin_account_id":{"type":"string"},"company_linkedin_url":{"type":"string","format":"uri"}},"required":["type","linkedin_account_id","company_linkedin_url"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"company_followers"},"linkedin_account_id":{"type":"string"},"company_linkedin_url":{"type":"string","format":"uri"}},"required":["type","linkedin_account_id","company_linkedin_url"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"own_company_engagement"},"company_linkedin_url":{"type":"string","format":"uri"}},"required":["type","company_linkedin_url"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"own_profile_engagement"},"profile_linkedin_url":{"type":"string","format":"uri"}},"required":["type","profile_linkedin_url"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"tracked_company_engagement"},"company_linkedin_url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["type","company_linkedin_url"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"tracked_profile_engagement"},"profile_linkedin_url":{"type":"string","format":"uri"},"name":{"type":"string"},"category":{"type":"string","enum":["competitor","influencer"]},"competitor_company_linkedin_url":{"type":"string","format":"uri"}},"required":["type","profile_linkedin_url","category"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"keywords"},"keywords":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string"}}},"required":["type","keywords"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"job_changes"},"within_days":{"type":"integer","minimum":1,"maximum":365}},"required":["type","within_days"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"funding"}},"required":["type"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"linkedin_activity"}},"required":["type"]}],"discriminator":{"propertyName":"type"},"description":"One of eleven targeting signals. The combined effective signal count is limited to 18; keywords are limited to five and standalone influencer profiles to three."},"AgentProposal":{"type":"object","properties":{"criteria":{"$ref":"#/components/schemas/AgentIcpCriteria"},"signals":{"type":"array","items":{"$ref":"#/components/schemas/AgentSignal"}}},"required":["criteria","signals"]},"AgentGeneration":{"type":"object","properties":{"generation_id":{"type":"string"},"status":{"type":"string","enum":["preparing","ready","manual_input_required"]},"product":{"$ref":"#/components/schemas/AgentProduct"},"proposal":{"anyOf":[{"$ref":"#/components/schemas/AgentProposal"},{"type":"null"}]}},"required":["generation_id","status","product","proposal"]},"AgentSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"description":{"type":["string","null"],"maxLength":280},"status":{"type":"string","enum":["draft","active","paused"]},"destination_list_id":{"type":"string"},"smart_finder_enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","status","destination_list_id","smart_finder_enabled","created_at","updated_at"]},"Agent":{"allOf":[{"$ref":"#/components/schemas/AgentSummary"},{"type":"object","properties":{"criteria":{"$ref":"#/components/schemas/AgentIcpCriteria"},"signals":{"type":"array","items":{"$ref":"#/components/schemas/AgentSignal"}}},"required":["criteria","signals"]}]},"AgentCreateRequest":{"type":"object","additionalProperties":false,"properties":{"generation_id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":["string","null"],"maxLength":280},"destination_list_id":{"type":"string"},"criteria":{"$ref":"#/components/schemas/AgentIcpCriteria"},"signals":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AgentSignal"}},"smart_finder_enabled":{"type":"boolean","default":false}},"required":["generation_id","name","destination_list_id","criteria","signals"]},"AgentPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"allOf":[{"not":{"required":["signals","add_signals"]}}],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":["string","null"],"maxLength":280},"destination_list_id":{"type":"string"},"criteria":{"$ref":"#/components/schemas/AgentIcpCriteria"},"signals":{"type":"array","items":{"$ref":"#/components/schemas/AgentSignal"}},"add_signals":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AgentSignal"},"description":"Append signals without replacing the existing signal configuration."},"smart_finder_enabled":{"type":"boolean"}}}}},"paths":{"/agents/product":{"get":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Get the saved workspace product","description":"Returns the canonical complete product currently saved in the API key workspace. Pass this product unchanged to the generation endpoint with `replace_existing_product` set to false to prepare an agent without replacing the workspace product. Requires `agents:read`.","responses":{"200":{"description":"Saved product","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AgentProduct"}},"required":["data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["product_not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:read"}},"/agents/product-previews":{"post":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Extract an editable product preview","description":"Extracts product details without persisting them. Review and edit the result before starting a generation. Requires `agents:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"website_url":{"type":"string","format":"uri"},"company_linkedin_url":{"type":["string","null"],"format":"uri"}},"required":["website_url"]},"examples":{"website":{"value":{"website_url":"https://example.com","company_linkedin_url":"https://www.linkedin.com/company/example"}}}}}},"responses":{"200":{"description":"Editable product preview","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AgentProduct"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["product_extraction_failed"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:write"}},"/agents/generations":{"post":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Confirm product details and prepare agent suggestions","description":"Persists the reviewed product atomically and starts or reuses ICP, competitor, and keyword preparation. Set `replace_existing_product` to true when intentionally replacing a different saved product. Requires `agents:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProductConfirmation"},"examples":{"confirmed":{"value":{"website_url":"https://example.com","company_linkedin_url":"https://www.linkedin.com/company/example","name":"Example","value_proposition":"Helps revenue teams find buyers","pain_points":["Pipeline gaps"],"proof_points":["2x faster research"],"proof_point_sources":["SOURCE_VERIFIED"],"generated_at":"2026-08-17T00:00:00.000Z","replace_existing_product":false}}}}}},"responses":{"202":{"description":"Generation started or reused","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AgentGeneration"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["product_replacement_required","stale_generation"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:write"}},"/agents/generations/{generation_id}":{"get":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Poll agent suggestion preparation","description":"Returns `preparing`, `ready`, or `manual_input_required`. A manual-input result can still be used to create an agent when complete reviewed criteria and signals are supplied. Requires `agents:read`.","parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current generation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AgentGeneration"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_generation"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["stale_generation"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:read"}},"/agents":{"get":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"List lead generation agents","description":"Cursor-paginated agents in the API key workspace, optionally filtered by lifecycle status. Requires `agents:read`.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","active","paused"]}}],"responses":{"200":{"description":"Agents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor","invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:read"},"post":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Create a draft lead generation agent","description":"Creates a draft from a current ready or manual-input generation and the caller's reviewed targeting. The destination must be a normal lead list in the API key workspace. Requires `agents:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"},"examples":{"reviewed":{"value":{"generation_id":"v1.signed-generation","name":"Enterprise intent","description":"Find enterprise buyers showing intent","destination_list_id":"list_123","criteria":{"job_titles":["VP Sales"],"matching_mode":"discovery"},"signals":[{"type":"linkedin_activity"}]}}}}}},"responses":{"201":{"description":"Draft agent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Agent"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_generation"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["generation_not_ready","stale_generation","invalid_agent_state"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:write"}},"/agents/{agent_id}":{"get":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Get an agent's editable configuration","description":"Returns complete criteria and signals for an agent in the API key workspace. Requires `agents:read`.","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Agent"}},"required":["data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:read"},"patch":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Update an agent without changing its status","description":"Updates scalar fields. Supplied `criteria` or `signals` replace that entire section; `add_signals` appends to the existing signal configuration without requiring callers to resubmit it. `signals` and `add_signals` cannot be combined. Omitted sections remain unchanged. Active agents are rescheduled atomically and cannot be left without a runnable signal. Requires `agents:write`.","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPatchRequest"},"examples":{"append_signal":{"value":{"add_signals":[{"type":"own_company_engagement","company_linkedin_url":"https://www.linkedin.com/company/acme"}]}}}}}},"responses":{"200":{"description":"Updated agent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Agent"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["agent_not_runnable","invalid_agent_state"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:write"}},"/agents/{agent_id}/actions":{"post":{"tags":["Agents"],"security":[{"bearerAuth":[]}],"summary":"Activate, pause, or resume an agent","description":"Valid transitions are draft → active (`activate`), active → paused (`pause`), and paused → active (`resume`). Requires `agents:write`.","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["activate","pause","resume"]}},"required":["action"]},"examples":{"activate":{"value":{"action":"activate"}}}}}},"responses":{"200":{"description":"Transitioned agent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Agent"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_agent_state","agent_not_runnable"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"agents:write"}},"/campaigns":{"get":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"List campaigns for the API key workspace","description":"Returns every outreach campaign in the API key workspace, newest first. Each campaign includes its lifecycle `status` (`draft`, `started`, `paused`, `completed`), aggregate performance metrics (total leads, connection requests sent and accepted, messages sent, replies received), the LinkedIn sender accounts assigned to it, and the source lead list when one is configured. Results are cursor-paginated (`limit` 1–500, default 100). Requires the `campaigns:read` scope.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaigns","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:read"},"post":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"Create a complete Create-with-AI campaign draft","description":"Creates a draft using the app-compatible Create with AI workflow. Launch it separately with the campaign action endpoint. Requires `campaigns:write`; inline lead imports also require `leads:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiCampaignCreateRequest"},"examples":{"start_conversation":{"summary":"Start conversations with an existing lead list","value":{"name":"Founder conversations","description":"Introduce NetworkHQ to B2B founders","priority":"medium","objective":"start_conversation","linkedin_account_ids":["linkedin_account_123"],"source":{"lead_list_id":"lead_list_123"},"schedule":{"timezone":"Asia/Kolkata","start_date":"2026-08-17","start_time":"09:00","end_time":"17:00","active_days":["monday","tuesday","wednesday","thursday","friday"]},"auto_approve_ai_messages":true,"messages":{"icebreaker":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"hours"}},"follow_up_1":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"days"}},"follow_up_2":{"enabled":true,"mode":"ai","wait":{"duration":4,"unit":"days"}}},"engagement":{"enabled":true,"like_after_days":3,"wait_after_like_days":2}}},"drive_signup":{"summary":"Drive sign-ups while importing leads into My List","value":{"name":"Product trial sign-ups","priority":"high","objective":"drive_signup","cta_payload":{"signup_url":"https://networkhq.io/signup","signup_type":"Free trial","trial_length":"14 days"},"linkedin_account_ids":["linkedin_account_123"],"source":{"leads":[{"first_name":"Ada","last_name":"Lovelace","linkedin_url":"https://www.linkedin.com/in/ada-lovelace"}]},"schedule":{"timezone":"Asia/Kolkata","start_date":"2026-08-17","start_time":"09:00","end_time":"17:00","active_days":["monday","tuesday","wednesday","thursday","friday"]},"auto_approve_ai_messages":true,"messages":{"icebreaker":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"hours"}},"follow_up_1":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"days"}},"follow_up_2":{"enabled":true,"mode":"ai","wait":{"duration":4,"unit":"days"}}},"engagement":{"enabled":true,"like_after_days":3,"wait_after_like_days":2}}},"book_online_meeting":{"summary":"Book meetings with a campaign calendar link","value":{"name":"Discovery meetings","priority":"medium","objective":"book_online_meeting","cta_payload":{"cta_text":"Book a 30-minute discovery call","calendar_link":"https://cal.example.com/discovery","meeting_duration":"30 minutes"},"linkedin_account_ids":["linkedin_account_123"],"source":{"lead_list_id":"lead_list_123"},"schedule":{"timezone":"Asia/Kolkata","start_date":"2026-08-17","start_time":"09:00","end_time":"17:00","active_days":["monday","tuesday","wednesday","thursday","friday"]},"auto_approve_ai_messages":true,"messages":{"icebreaker":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"hours"}},"follow_up_1":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"days"}},"follow_up_2":{"enabled":true,"mode":"ai","wait":{"duration":4,"unit":"days"}}},"engagement":{"enabled":true,"like_after_days":3,"wait_after_like_days":2}}},"mixed_ai_template":{"summary":"Mix AI-personalized messages with templates and a connection note","value":{"name":"Mixed founder outreach","description":"Use fixed copy around one AI-personalized follow-up","priority":"medium","objective":"start_conversation","linkedin_account_ids":["linkedin_account_123"],"source":{"lead_list_id":"lead_list_123"},"schedule":{"timezone":"Asia/Kolkata","start_date":"2026-08-17","start_time":"09:00","end_time":"17:00","active_days":["monday","tuesday","wednesday","thursday","friday"]},"auto_approve_ai_messages":false,"messages":{"icebreaker":{"enabled":true,"mode":"template","message":"Hi {{first_name}}, I noticed your work at {{company}}.","wait":{"duration":3,"unit":"hours"}},"follow_up_1":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"days"}},"follow_up_2":{"enabled":true,"mode":"template","message":"Hi {{first_name}}, should I close the loop?","wait":{"duration":4,"unit":"days"}}},"engagement":{"enabled":true,"like_after_days":3,"wait_after_like_days":2},"connection_request":{"mode":"template","message":"Hi {{first_name}}, let's connect."}}}}}}},"responses":{"201":{"description":"Created campaign draft","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CampaignDetail"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_token","invalid_token"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope","subscription_expired"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["default_lead_list_missing","ai_product_details_missing","invalid_request","linkedin_account_required"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]},"examples":{"linkedin_account_required":{"summary":"LinkedIn account setup required","value":{"error":{"code":"linkedin_account_required","message":"Connect your LinkedIn account before creating a campaign.","action":{"label":"Connect your LinkedIn account here","url":"https://app.networkhq.io/dashboard/accounts"}}}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:write"}},"/campaigns/{campaign_id}":{"get":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"Get a campaign","description":"Returns lifecycle metrics plus the complete persisted Create-with-AI setup, including objective, schedule, approval preference, message sequence, engagement, and connection request. Requires `campaigns:read`.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaign","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CampaignDetail"}},"required":["data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:read"},"patch":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"Edit Create-with-AI campaign setup","description":"Updates one or more campaign setup sections using the same persisted campaign, schedule, workflow, cache-invalidation, and approval rules as the app. Schedule and workflow fields require a draft or paused campaign; pause an active campaign first. Requires `campaigns:write`.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSetupPatchRequest"},"examples":{"setup":{"summary":"Update objective, schedule, approval, and connection note","value":{"description":"Start useful conversations with founders","objective":"start_conversation","auto_approve_ai_messages":true,"connection_request":{"mode":"template","message":"Hi {{first_name}}, let's connect."}}},"mixed_message_sequence":{"summary":"Replace the message sequence with mixed AI and template modes","value":{"auto_approve_ai_messages":false,"messages":{"icebreaker":{"enabled":true,"mode":"template","message":"Hi {{first_name}}, I noticed your work at {{company}}.","wait":{"duration":3,"unit":"hours"}},"follow_up_1":{"enabled":true,"mode":"ai","wait":{"duration":3,"unit":"days"}},"follow_up_2":{"enabled":true,"mode":"template","message":"Hi {{first_name}}, should I close the loop?","wait":{"duration":4,"unit":"days"}}},"connection_request":{"mode":"template","message":"Hi {{first_name}}, let's connect."}}}}}}},"responses":{"200":{"description":"Updated campaign setup","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CampaignDetail"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_token","invalid_token"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope","subscription_expired"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_campaign_state","linkedin_account_required"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:write"}},"/campaigns/{campaign_id}/actions":{"post":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"Run a campaign lifecycle action","description":"Starts, pauses, or resumes one campaign in the API key workspace using the same lifecycle boundaries as the campaign settings UI. `start` is only valid for draft campaigns and requires a configured lead list, schedule, connected LinkedIn sender account, and message setup; it enrolls every lead from the source lead list. LinkedIn session health is checked first. A failed or unavailable check returns `linkedin_session_check_failed`, keeps the campaign in draft, and includes per-account health plus an explicit Proceed Anyway request. Send that request only when the caller chooses to accept the risk. `pause` is only valid for active campaigns. `resume` is only valid for paused campaigns and reactivates both the campaign and its paused leads. Requires the `campaigns:write` scope.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["start","pause","resume"]},"proceed_on_session_check_failure":{"type":"boolean","default":false,"description":"Only valid for start after an advisory session-check failure."}},"required":["action"],"example":{"action":"start"}},"examples":{"start":{"summary":"Start a draft campaign","value":{"action":"start"}},"proceed_anyway":{"summary":"Start despite a reported LinkedIn session issue","value":{"action":"start","proceed_on_session_check_failure":true}},"pause":{"summary":"Pause an active campaign","value":{"action":"pause"}},"resume":{"summary":"Resume a paused campaign","value":{"action":"resume"}}}}}},"responses":{"200":{"description":"Updated campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignActionResult"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_token","invalid_token"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope","subscription_expired"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_campaign_state","linkedin_session_check_failed"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]},"examples":{"linkedin_session_check_failed":{"summary":"One or more LinkedIn sessions could not be verified","value":{"error":{"code":"linkedin_session_check_failed","message":"Could not verify one or more LinkedIn sessions.","details":{"can_proceed":true,"accounts":[{"linkedin_account_id":"linkedin_account_123","profile_name":"Ada Lovelace","email":"ada@example.com","status":"failed","reason":"session_expired"}]},"action":{"label":"Proceed anyway","method":"POST","url":"/campaigns/campaign_123/actions","body":{"action":"start","proceed_on_session_check_failure":true}}}}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:write"}},"/campaigns/{campaign_id}/leads":{"get":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"List campaign leads with status-table fields","description":"Lists the leads enrolled in a campaign with the same fields shown in the campaign status table, newest enrollment first. Each row includes the lead's current funnel state (connection, InMail, and message status with the last-action timestamp), enrollment `status` and `priority`, reply `intent` and its source, the assigned LinkedIn sender, and a chronological `actions_performed` timeline of every action taken or scheduled for that lead. Cursor-paginated (`limit` 1–500, default 100). Returns 404 when the campaign does not exist in the API key workspace. Requires the `campaigns:read` scope.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campaign leads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignLead"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:read"}},"/campaigns/{campaign_id}/leads/{lead_id}/message-overrides":{"put":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"Save lead-level campaign message overrides","description":"Sets the exact text to send to one lead for an AI-personalized or template-backed campaign message slot. The lead-level override takes precedence over the campaign slot's AI generation or template text. `send_message` supports all three stages with an 8000-character limit. `send_connection` supports only the `ice_breaker` stage with a 200-character limit. The shared override service preserves the app's locking, approval, and protected-token rules. Requires `campaigns:write`.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"messages":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/CampaignLeadMessageOverrideInput"},"example":[{"node_type":"send_message","message_stage":"ice_breaker","message":"Hi Rushabh, noticed ToolPioneers is helping teams automate outreach. Open to connecting?"},{"node_type":"send_message","message_stage":"follow_up_1","message":"Following up because teams like yours often need cleaner campaign operations before scaling outbound."},{"node_type":"send_message","message_stage":"follow_up_2","message":"Last note from me. Happy to share a concise workflow if outbound quality is a priority this quarter."}]}},"required":["messages"],"example":{"messages":[{"node_type":"send_message","message_stage":"ice_breaker","message":"Hi Rushabh, noticed ToolPioneers is helping teams automate outreach. Open to connecting?"},{"node_type":"send_message","message_stage":"follow_up_1","message":"Following up because teams like yours often need cleaner campaign operations before scaling outbound."},{"node_type":"send_message","message_stage":"follow_up_2","message":"Last note from me. Happy to share a concise workflow if outbound quality is a priority this quarter."}]}},"examples":{"message_sequence":{"summary":"Override a personalized message sequence","value":{"messages":[{"node_type":"send_message","message_stage":"ice_breaker","message":"Hi Rushabh, noticed ToolPioneers is helping teams automate outreach. Open to connecting?"},{"node_type":"send_message","message_stage":"follow_up_1","message":"Following up because teams like yours often need cleaner campaign operations before scaling outbound."},{"node_type":"send_message","message_stage":"follow_up_2","message":"Last note from me. Happy to share a concise workflow if outbound quality is a priority this quarter."}]}},"connection_note":{"summary":"Override the connection note for one lead","value":{"messages":[{"node_type":"send_connection","message_stage":"ice_breaker","message":"Hi {{first_name}}, let's connect."}]}}}}}},"responses":{"200":{"description":"Saved message overrides","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignLeadMessageOverrideResult"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:write"}},"/campaigns/{campaign_id}/message-approvals":{"get":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"List persisted AI message approvals for a campaign","description":"Lists persisted pending, approved, and rejected message rows for one campaign. Cursor-paginated newest first. Requires `campaigns:read`.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Message approvals","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageApproval"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_token","invalid_token"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope","subscription_expired"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:read"}},"/campaigns/{campaign_id}/message-approvals/{message_id}/actions":{"post":{"tags":["Campaigns"],"security":[{"bearerAuth":[]}],"summary":"Approve or reject a campaign AI message","description":"Resolves one pending approval using the same campaign lock, audit fields, lead release, and rejection exclusion behavior as the app. Requires `campaigns:write`.","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","const":"approve"}},"required":["action"]},{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","const":"reject"},"rejection_reason":{"type":"string","enum":["MESSAGE_QUALITY","NOT_FIT","BAD_TIMING","EXISTING_RELATIONSHIP","OTHER"]},"rejection_note":{"type":["string","null"],"maxLength":1000}},"required":["action","rejection_reason"]}]},"examples":{"approve":{"value":{"action":"approve"}},"reject":{"value":{"action":"reject","rejection_reason":"MESSAGE_QUALITY","rejection_note":"Needs a clearer opening."}}}}}},"responses":{"200":{"description":"Resolved approval","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MessageApproval"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_token","invalid_token"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope","subscription_expired"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["approval_locked"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"campaigns:write"}},"/linkedin_accounts":{"get":{"tags":["LinkedIn accounts"],"security":[{"bearerAuth":[]}],"summary":"List LinkedIn accounts for the API key workspace","description":"Lists the LinkedIn sender accounts connected to the API key workspace, newest first. Each account includes its connection `status` (`connecting`, `connected`, `disconnected`, `error`, `awaiting_code`), `account_tier` (`regular`, `premium`, `sales_navigator`), the configured daily sending limits and warm-up flag, current connection and pending-invite counts, and the last-run and cooldown timestamps. Cursor-paginated (`limit` 1–500, default 100). Requires the `linkedin_accounts:read` scope.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"LinkedIn accounts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LinkedInAccount"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"linkedin_accounts:read"}},"/linkedin_accounts/{linkedin_account_id}":{"patch":{"tags":["LinkedIn accounts"],"security":[{"bearerAuth":[]}],"summary":"Configure LinkedIn account sending limits","description":"Turns warm-up on or off and configures daily sending limits for an existing LinkedIn account in the API key workspace. Disabling warm-up without supplying limits sets every daily limit to 10; re-enabling it restores the warm-up-controlled defaults. Manual limits can be changed only while warm-up is off or when the same request turns it off. Requires the `linkedin_accounts:write` scope.","parameters":[{"name":"linkedin_account_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInAccountSendingLimitsUpdateRequest"},"examples":{"disable_with_limits":{"summary":"Turn warm-up off and set manual limits","value":{"warmup_enabled":false,"max_connection_requests_per_day":10,"max_messages_per_day":15}},"update_manual_limits":{"summary":"Update limits after warm-up is off","value":{"max_messages_per_day":15,"max_profile_views_per_day":20}}}}}},"responses":{"200":{"description":"Updated LinkedIn account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LinkedInAccount"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["missing_token","invalid_token"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["insufficient_scope","subscription_expired"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"linkedin_accounts:write"}},"/lead_lists":{"get":{"tags":["Lead lists"],"security":[{"bearerAuth":[]}],"summary":"List lead lists for the API key workspace","description":"Lists every lead list in the API key workspace, newest first, each with its current member count. Cursor-paginated (`limit` 1–500, default 100). Requires the `lead_lists:read` scope.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lead lists","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadList"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"lead_lists:read"},"post":{"tags":["Lead lists"],"security":[{"bearerAuth":[]}],"summary":"Create one or more lead lists for the API key workspace","description":"Creates one or more lead lists in the API key workspace from either a single lead-list object or the `lead_lists` batch array. List names are made unique automatically — a name that collides with an existing list is suffixed (for example `Founders (Copy ...)`). The response returns the created lists in `data`, any rejected entries in `malformed`, and a `summary` of attempted/created/malformed counts. Returns 201 when every list was created and 207 when some entries were malformed but others succeeded. Requires the `lead_lists:write` scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LeadListCreateInput"},{"$ref":"#/components/schemas/LeadListCreateBatchRequest"}]},"examples":{"single":{"summary":"Create one lead list","value":{"name":"Founders","description":"Founder prospects"}},"batch":{"summary":"Create multiple lead lists","value":{"lead_lists":[{"name":"Founders","description":"Founder prospects"},{"name":"Operators","description":"Operations leaders"}]}}}}}},"responses":{"201":{"description":"Lead lists created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListCreateBatchResult"}}}},"207":{"description":"Some lead lists were created and some were malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListCreateBatchResult"}}}},"400":{"description":"All submitted lead lists were malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListCreateBatchResult"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"lead_lists:write"}},"/lead_lists/{lead_list_id}":{"get":{"tags":["Lead lists"],"security":[{"bearerAuth":[]}],"summary":"Get a lead list from the API key workspace","description":"Returns a single lead list in the API key workspace, including its current member count. Returns 404 when the list does not exist in the workspace. Requires the `lead_lists:read` scope.","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lead list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LeadList"}},"required":["data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"lead_lists:read"}},"/lead_lists/{lead_list_id}/leads":{"get":{"tags":["Leads"],"security":[{"bearerAuth":[]}],"summary":"List leads in a lead list from the API key workspace","description":"Lists the leads that are members of a specific lead list, newest membership first, each with enriched company details plus lead heat score and reason when available. Cursor-paginated (`limit` 1–500, default 100). Returns 404 when the list does not exist in the API key workspace. Requires the `leads:read` scope.","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Leads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"leads:read"},"post":{"tags":["Leads"],"security":[{"bearerAuth":[]}],"summary":"Create one or more leads in a lead list","description":"Imports leads into a lead list. Accepts either a single lead object or a batch via the `leads` array (up to 100 per request). Leads are de-duplicated against the workspace, and each result is reported as `created` (a new lead was created and added), `added_existing` (an existing workspace lead was added to this list), or `already_in_list` (the lead was already a member).\n\nFor a single-lead request the response is the lead plus its `result`, returning 200 when the lead was `already_in_list` and 201 otherwise. For a batch request the response includes per-item `data`, `malformed` entries that failed validation, `failed` entries that errored during processing, and a `summary`; the status is 201 when leads were created or attached with no problems, 207 when some entries were malformed or failed, and 200 when nothing new was added. Returns 404 when the list does not exist in the workspace. Requires the `leads:write` scope.","parameters":[{"name":"lead_list_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LeadCreateRequest"},{"type":"object","properties":{"leads":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/LeadCreateRequest"},"example":[{"first_name":"First","last_name":"Prospect","email":"first.prospect@example.com","company":"Acme","company_linkedin_url":"https://www.linkedin.com/company/acme","job_title":"VP Sales","headline":"VP Sales at Acme","summary":"Revenue leader focused on enterprise growth.","industry":"Software","skills":["Sales","GTM"],"linkedin_url":"https://www.linkedin.com/in/first-prospect","phone":"+1 415 555 0101","location":"San Francisco, CA","gender":"unknown","date_of_birth":"1990-01-15T00:00:00.000Z","notes":"Met at SaaS Summit.","profile_picture_url":"https://example.com/first-prospect.jpg"},{"first_name":"Second","last_name":"Prospect","email":"second.prospect@example.com","company":"Globex","company_linkedin_url":"https://www.linkedin.com/company/globex","job_title":"Head of Operations","headline":"Head of Operations at Globex","summary":"Operations leader scaling global teams.","industry":"Manufacturing","skills":["Operations","Process improvement"],"linkedin_url":"https://www.linkedin.com/in/second-prospect","phone":"+1 212 555 0102","location":"New York, NY","gender":"unknown","date_of_birth":"1988-06-20T00:00:00.000Z","notes":"Requested follow-up after webinar.","profile_picture_url":"https://example.com/second-prospect.jpg"}]}},"required":["leads"],"additionalProperties":false,"example":{"leads":[{"first_name":"First","last_name":"Prospect","email":"first.prospect@example.com","company":"Acme","company_linkedin_url":"https://www.linkedin.com/company/acme","job_title":"VP Sales","headline":"VP Sales at Acme","summary":"Revenue leader focused on enterprise growth.","industry":"Software","skills":["Sales","GTM"],"linkedin_url":"https://www.linkedin.com/in/first-prospect","phone":"+1 415 555 0101","location":"San Francisco, CA","gender":"unknown","date_of_birth":"1990-01-15T00:00:00.000Z","notes":"Met at SaaS Summit.","profile_picture_url":"https://example.com/first-prospect.jpg"},{"first_name":"Second","last_name":"Prospect","email":"second.prospect@example.com","company":"Globex","company_linkedin_url":"https://www.linkedin.com/company/globex","job_title":"Head of Operations","headline":"Head of Operations at Globex","summary":"Operations leader scaling global teams.","industry":"Manufacturing","skills":["Operations","Process improvement"],"linkedin_url":"https://www.linkedin.com/in/second-prospect","phone":"+1 212 555 0102","location":"New York, NY","gender":"unknown","date_of_birth":"1988-06-20T00:00:00.000Z","notes":"Requested follow-up after webinar.","profile_picture_url":"https://example.com/second-prospect.jpg"}]}}]},"examples":{"single":{"summary":"Import one lead","value":{"first_name":"First","last_name":"Prospect","email":"first.prospect@example.com","company":"Acme","company_linkedin_url":"https://www.linkedin.com/company/acme","job_title":"VP Sales","headline":"VP Sales at Acme","summary":"Revenue leader focused on enterprise growth.","industry":"Software","skills":["Sales","GTM"],"linkedin_url":"https://www.linkedin.com/in/first-prospect","phone":"+1 415 555 0101","location":"San Francisco, CA","gender":"unknown","date_of_birth":"1990-01-15T00:00:00.000Z","notes":"Met at SaaS Summit.","profile_picture_url":"https://example.com/first-prospect.jpg"}},"batch":{"summary":"Import multiple leads","value":{"leads":[{"first_name":"First","last_name":"Prospect","email":"first.prospect@example.com","company":"Acme","company_linkedin_url":"https://www.linkedin.com/company/acme","job_title":"VP Sales","headline":"VP Sales at Acme","summary":"Revenue leader focused on enterprise growth.","industry":"Software","skills":["Sales","GTM"],"linkedin_url":"https://www.linkedin.com/in/first-prospect","phone":"+1 415 555 0101","location":"San Francisco, CA","gender":"unknown","date_of_birth":"1990-01-15T00:00:00.000Z","notes":"Met at SaaS Summit.","profile_picture_url":"https://example.com/first-prospect.jpg"},{"first_name":"Second","last_name":"Prospect","email":"second.prospect@example.com","company":"Globex","company_linkedin_url":"https://www.linkedin.com/company/globex","job_title":"Head of Operations","headline":"Head of Operations at Globex","summary":"Operations leader scaling global teams.","industry":"Manufacturing","skills":["Operations","Process improvement"],"linkedin_url":"https://www.linkedin.com/in/second-prospect","phone":"+1 212 555 0102","location":"New York, NY","gender":"unknown","date_of_birth":"1988-06-20T00:00:00.000Z","notes":"Requested follow-up after webinar.","profile_picture_url":"https://example.com/second-prospect.jpg"}]}}}}}},"responses":{"200":{"description":"Lead already belonged to the lead list","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"result":{"type":"string","enum":["already_in_list"]}},"required":["data","result"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"result":{"type":"string","enum":["already_in_list"]},"lead":{"$ref":"#/components/schemas/Lead"}},"required":["index","result","lead"]}},"malformed":{"type":"array","items":{"$ref":"#/components/schemas/LeadCreateValidationError"}},"failed":{"type":"array","items":{"$ref":"#/components/schemas/LeadCreateProcessingError"}},"summary":{"type":"object","properties":{"attempted":{"type":"integer"},"created":{"type":"integer"},"added_existing":{"type":"integer"},"already_in_list":{"type":"integer"},"malformed":{"type":"integer"},"failed":{"type":"integer"}},"required":["attempted","created","added_existing","already_in_list","malformed","failed"]}},"required":["data","malformed","failed","summary"]}]}}}},"201":{"description":"Lead created or existing lead attached to the lead list","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"result":{"type":"string","enum":["created","added_existing"]}},"required":["data","result"]},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"result":{"type":"string","enum":["created","added_existing","already_in_list"]},"lead":{"$ref":"#/components/schemas/Lead"}},"required":["index","result","lead"]}},"malformed":{"type":"array","items":{"$ref":"#/components/schemas/LeadCreateValidationError"}},"failed":{"type":"array","items":{"$ref":"#/components/schemas/LeadCreateProcessingError"}},"summary":{"type":"object","properties":{"attempted":{"type":"integer"},"created":{"type":"integer"},"added_existing":{"type":"integer"},"already_in_list":{"type":"integer"},"malformed":{"type":"integer"},"failed":{"type":"integer"}},"required":["attempted","created","added_existing","already_in_list","malformed","failed"]}},"required":["data","malformed","failed","summary"]}]}}}},"207":{"description":"Some leads were created or attached and some were malformed or failed to process","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"result":{"type":"string","enum":["created","added_existing","already_in_list"]},"lead":{"$ref":"#/components/schemas/Lead"}},"required":["index","result","lead"]}},"malformed":{"type":"array","items":{"$ref":"#/components/schemas/LeadCreateValidationError"}},"failed":{"type":"array","items":{"$ref":"#/components/schemas/LeadCreateProcessingError"}},"summary":{"type":"object","properties":{"attempted":{"type":"integer"},"created":{"type":"integer"},"added_existing":{"type":"integer"},"already_in_list":{"type":"integer"},"malformed":{"type":"integer"},"failed":{"type":"integer"}},"required":["attempted","created","added_existing","already_in_list","malformed","failed"]}},"required":["data","malformed","failed","summary"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"leads:write"}},"/leads":{"get":{"tags":["Leads"],"security":[{"bearerAuth":[]}],"summary":"List all leads for the API key workspace","description":"Lists every lead in the API key workspace, newest first, each with enriched company details, the IDs of the lead lists it belongs to, plus lead heat score and reason when available. Pass `query` to full-text search across first name, last name, company, job title, location, and email (space-separated terms are AND-matched, case-insensitive). Pass `list_ids` (comma-separated lead list IDs) to return only leads that belong to those lists. Cursor-paginated (`limit` 1–500, default 100). Requires the `leads:read` scope.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"list_ids","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated lead list IDs to filter by."}}],"responses":{"200":{"description":"Leads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadWithLists"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"leads:read"}},"/leads/{lead_id}":{"get":{"tags":["Leads"],"security":[{"bearerAuth":[]}],"summary":"Get a lead from the API key workspace","description":"Returns a single lead in the API key workspace, including enriched company details, the IDs of the lead lists it belongs to, plus lead heat score and reason when available. Returns 404 when the lead does not exist in the workspace. Requires the `leads:read` scope.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lead","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LeadWithLists"}},"required":["data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"leads:read"}},"/leads/{lead_id}/enrich":{"post":{"tags":["Leads"],"security":[{"bearerAuth":[]}],"summary":"Enrich Lead Profile","description":"Enriches a lead's profile and company details from the enrichment provider. The `enrichment.status` reports the outcome: `enriched` (newly enriched), `already_enriched` (returned existing data without re-charging), `insufficient_credits` (not enough credits to enrich), or `failed` (the provider could not enrich the lead). `charged` indicates whether a credit was consumed, and `credits_remaining` reports the workspace balance after the call. Returns 404 when the lead does not exist in the workspace, 502 when the enrichment provider errors, and 503 when the automation service is unavailable. Requires the `leads:write` scope.","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lead profile enrichment result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"},"enrichment":{"$ref":"#/components/schemas/LeadEnrichment"}},"required":["data","enrichment"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"leads:write"}},"/conversations":{"get":{"tags":["Conversations"],"security":[{"bearerAuth":[]}],"summary":"List conversations for the API key workspace","description":"Lists LinkedIn conversations across the API key workspace, ordered by most recent message. Each conversation includes the associated lead, the LinkedIn sender account, the reply `intent` when one has been classified, an unread flag, and a preview of the latest message. Filter with `unread_only=true` to return only unread threads and `linkedin_account_id` to scope results to a single sender account. Cursor-paginated (`limit` 1–500, default 100). Requires the `conversations:read` scope.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"linkedin_account_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Conversations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"conversations:read"}},"/conversations/{conversation_id}":{"get":{"tags":["Conversations"],"security":[{"bearerAuth":[]}],"summary":"Get a conversation and its messages","description":"Returns a single conversation with its message history in chronological order (oldest first), plus the associated lead, LinkedIn sender account, and reply `intent`. Messages are cursor-paginated (`limit` 1–500, default 100). Returns 404 when the conversation does not exist in the API key workspace, 502 when delegated history contains an invalid cursor, and 503 when conversation history is temporarily unavailable. Requires the `conversations:read` scope.","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Conversation messages","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConversationDetail"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_cursor"]},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"conversations:read"}},"/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_index}":{"get":{"tags":["Conversations"],"security":[{"bearerAuth":[]}],"summary":"Stream a conversation message attachment","description":"Streams supported LinkedIn image, external-media, audio, or video content through the authenticated API without exposing provider credentials. Range requests are forwarded for audio and video playback. Returns 416 when the Range header is invalid. Requires the `conversations:read` scope.","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"attachment_index","in":"path","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Attachment media"},"206":{"description":"Partial attachment media"},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"416":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"conversations:read"}},"/conversations/{conversation_id}/messages":{"post":{"tags":["Conversations"],"security":[{"bearerAuth":[]}],"summary":"Send a message to a conversation","description":"Sends a plain-text message into an existing LinkedIn conversation through the workspace's automation sender (maximum 8000 characters). On success the response reports `ok: true`; `pending: true` means LinkedIn accepted the send but did not immediately return a message id, in which case the message will appear after the next inbox sync. Returns 404 when the conversation does not exist in the workspace, 409 when the conversation is still syncing, 502 when the send fails, and 503 when message sending is temporarily unavailable. Requires the `conversations:write` scope.","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendConversationMessageRequest"}}}},"responses":{"200":{"description":"Message send result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SendConversationMessageResult"}},"required":["data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"action":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"method":{"type":"string","enum":["POST"]},"body":{"type":"object","additionalProperties":true}},"required":["label","url"]},"details":{"type":"object","additionalProperties":true}},"required":["code","message"]}},"required":["error"]}}}}},"x-required-scope":"conversations:write"}}}}