{"openapi":"3.1.0","info":{"title":"Smartlead (BYOK) API","version":"0.1.0","description":"Smartlead (BYOK) lets an AI assistant read your own Smartlead data through the Smartlead API with a key you supply (Smartlead API key). Read-only: 9 tools (list_campaigns, get_campaign, list_campaign_leads, get_lead, get_overall_stats, get_day_wise_stats, list_email_accounts, get_email_account_warmup_stats, list_lead_lists). The BYOK key travels with each request, is used for that one call only...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-smartlead.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-smartlead/docs"},"termsOfService":"https://connectorbay.com/byok-smartlead/terms"},"servers":[{"url":"https://byok-smartlead.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-smartlead/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_campaigns":{"post":{"operationId":"list_campaigns","summary":"List campaigns, newest first, with status (ACTIVE, PAUSED, STOPPED, ARCHIVED, DRAFTED), daily lead limit, tracking setti","description":"List campaigns, newest first, with status (ACTIVE, PAUSED, STOPPED, ARCHIVED, DRAFTED), daily lead limit, tracking settings and schedule. Use for \"Which Smartlead campaigns are active\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Only campaigns of this client id (agency accounts).","title":"Client Id"},"include_tags":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include campaign tags.","title":"Include Tags"}},"title":"list_campaignsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_campaign":{"post":{"operationId":"get_campaign","summary":"Get one campaign's name, status, creation time, sending schedule and tracking settings. Use for \"Show Smartlead campaign","description":"Get one campaign's name, status, creation time, sending schedule and tracking settings. Use for \"Show Smartlead campaign 123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_id":{"description":"Smartlead campaign id (a number) from list_campaigns.","title":"Campaign Id","type":"integer"}},"required":["campaign_id"],"title":"get_campaignArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_campaign_leads":{"post":{"operationId":"list_campaign_leads","summary":"List the leads of a campaign with status, category, last sent time and engagement flags, filtered by lead status, email ","description":"List the leads of a campaign with status, category, last sent time and engagement flags, filtered by lead status, email engagement or category. Use for \"Which leads in Smartlead campaign 123 have replied\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"campaign_id":{"description":"Smartlead campaign id (a number) from list_campaigns.","title":"Campaign Id","type":"integer"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging (starts at 0).","title":"Offset"},"status":{"anyOf":[{"enum":["STARTED","INPROGRESS","COMPLETED","PAUSED","STOPPED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only leads with this status.","title":"Status"},"email_status":{"anyOf":[{"enum":["is_opened","is_clicked","is_bounced","is_replied","is_unsubscribed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only leads with this engagement.","title":"Email Status"},"lead_category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Only leads in this lead category id.","title":"Lead Category Id"},"created_at_gt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only leads created after this time, ISO 8601.","title":"Created At Gt"}},"required":["campaign_id"],"title":"list_campaign_leadsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_lead":{"post":{"operationId":"get_lead","summary":"Get one lead by id with name, company, status, category and engagement flags. Use for \"Show Smartlead lead 789\".","description":"Get one lead by id with name, company, status, category and engagement flags. Use for \"Show Smartlead lead 789\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lead_id":{"description":"Smartlead lead id (a number) from list_campaign_leads.","title":"Lead Id","type":"integer"}},"required":["lead_id"],"title":"get_leadArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_overall_stats":{"post":{"operationId":"get_overall_stats","summary":"Get overall sent, opened, replied and bounced totals with open, reply, positive reply and bounce rates for a date range,","description":"Get overall sent, opened, replied and bounced totals with open, reply, positive reply and bounce rates for a date range, optionally for chosen campaigns. Use for \"How did my Smartlead emails perform in the first half of October\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"description":"First day, formatted YYYY-MM-DD.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"Last day, formatted YYYY-MM-DD.","maxLength":200,"title":"End Date","type":"string"},"timezone":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone name, for example 'America/New_York'.","title":"Timezone"},"campaign_ids":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated campaign ids to limit the numbers to.","title":"Campaign Ids"}},"required":["start_date","end_date"],"title":"get_overall_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_day_wise_stats":{"post":{"operationId":"get_day_wise_stats","summary":"Get day-by-day sent, opened, replied and bounced counts for a date range, optionally for chosen campaigns. Use for \"Show","description":"Get day-by-day sent, opened, replied and bounced counts for a date range, optionally for chosen campaigns. Use for \"Show my Smartlead daily sends and replies for the last two weeks\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"description":"First day, formatted YYYY-MM-DD.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"Last day, formatted YYYY-MM-DD.","maxLength":200,"title":"End Date","type":"string"},"timezone":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone name, for example 'America/New_York'.","title":"Timezone"},"campaign_ids":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated campaign ids to limit the numbers to.","title":"Campaign Ids"}},"required":["start_date","end_date"],"title":"get_day_wise_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_email_accounts":{"post":{"operationId":"list_email_accounts","summary":"List the sending email accounts with address, sender name and daily message limit, filtered by warm-up status, SMTP conn","description":"List the sending email accounts with address, sender name and daily message limit, filtered by warm-up status, SMTP connection, provider or address text (credentials are not returned). Use for \"Which Smartlead sending accounts have a failed SMTP connection\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many records to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging (starts at 0).","title":"Offset"},"email_warmup_status":{"anyOf":[{"enum":["ACTIVE","INACTIVE"],"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts with this warm-up status.","title":"Email Warmup Status"},"is_smtp_success":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"Filter by SMTP connection: true for connected, false for failed.","title":"Is Smtp Success"},"is_in_use":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"Filter by whether the account is used in campaigns: true or false.","title":"Is In Use"},"esp":{"anyOf":[{"enum":["GMAIL","OUTLOOK","SMTP"],"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts of this provider.","title":"Esp"},"username":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts whose address contains this text.","title":"Username"}},"title":"list_email_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_email_account_warmup_stats":{"post":{"operationId":"get_email_account_warmup_stats","summary":"Get warm-up statistics of one sending account: total sent, spam count, reputation score and daily counts. Use for \"How i","description":"Get warm-up statistics of one sending account: total sent, spam count, reputation score and daily counts. Use for \"How is the warm-up of Smartlead sending account 123 going\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"email_account_id":{"description":"Sending account id (a number) from list_email_accounts.","title":"Email Account Id","type":"integer"}},"required":["email_account_id"],"title":"get_email_account_warmup_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_lead_lists":{"post":{"operationId":"list_lead_lists","summary":"List the lead lists with name, lead count and creation time, optionally filtered by name. Use for \"What lead lists do I ","description":"List the lead lists with name, lead count and creation time, optionally filtered by name. Use for \"What lead lists do I have in Smartlead\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"list_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only lists whose name contains this text.","title":"List Name"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many lists to return (1 to 1000).","title":"Limit"},"offset":{"anyOf":[{"maximum":1000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many records to skip, for paging (starts at 0).","title":"Offset"}},"title":"list_lead_listsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}